소스 검색

replaced email by user name in header's user tools

bach 2 년 전
부모
커밋
fc1124b696

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.css


BIN
web/themes/custom/materiotheme/assets/dist/main.css.gz


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
web/themes/custom/materiotheme/assets/dist/main.js


BIN
web/themes/custom/materiotheme/assets/dist/main.js.gz


+ 1 - 1
web/themes/custom/materiotheme/assets/styles/main.scss

@@ -230,7 +230,7 @@ header[role="banner"]{
     }
     .mdi-logout::before {
       margin: -0.25em 0 0 0;
-      vertical-align: top;
+      vertical-align: baseline;
     }
   }
 

+ 2 - 2
web/themes/custom/materiotheme/vuejs/components/User/UserTools.vue

@@ -4,8 +4,8 @@
 
     > -->
     <a class="mdi mdi-account" href="/user">
-      <span v-if="name">{{ name }}</span>
-      <span v-else>{{ mail }}</span>
+      <span>{{ name }}</span>
+      <!-- <span v-else>{{ mail }}</span> -->
     </a>
     <!-- </h4> -->
     <a href="/admin/content/materials"

+ 23 - 22
web/themes/custom/materiotheme/vuejs/store/modules/user.js

@@ -65,6 +65,7 @@ export default {
     setUser (state, data) {
       state.mail = data.mail[0].value
       state.uuid = data.uuid[0].value
+      state.name = data.name[0].value
       // with session_limit, only here we are certain that the user is logged
       state.isloggedin = true
     },
@@ -93,10 +94,10 @@ export default {
         state.hasDBAccess = true
       }
     },
-    setName (state, name) {
-      console.log('setName', name)
-      state.name = name
-    },
+    // setName (state, name) {
+    //   console.log('setName', name)
+    //   state.name = name
+    // },
     setLoggedOut (state) {
       console.log('setLoggedOut state', state)
       state.uid = null
@@ -248,10 +249,10 @@ export default {
               if (data.roles) {
                 commit('setRoles', data.roles)
               }
-              console.log('customer_profiles', data.customer_profiles.length)
-              if (data.customer_profiles.length) {
-                dispatch('getUserProfiles', data.customer_profiles[data.customer_profiles.length - 1].target_id)
-              }
+              // console.log('customer_profiles', data.customer_profiles.length)
+              // if (data.customer_profiles.length) {
+              //   dispatch('getUserProfiles', data.customer_profiles[data.customer_profiles.length - 1].target_id)
+              // }
               dispatch('getUserFlagColls')
               resolve()
             })
@@ -262,20 +263,20 @@ export default {
         })
       })
     },
-    getUserProfiles ({ dispatch, commit, state }, pid) {
-      const params = {
-        token: state.csrf_token
-      }
-      REST.get(`/profile/${pid}?_format=json`, params).then(({ data }) => {
-        console.log('profile', data)
-        if (data.address.length) {
-          commit('setName', `${data.address[0].given_name} ${data.address[0].family_name} `)
-        }
-      }).catch(error => {
-        console.warn('Issue with getUser', error)
-        Promise.reject(error)
-      })
-    },
+    // getUserProfiles ({ dispatch, commit, state }, pid) {
+    //   const params = {
+    //     token: state.csrf_token
+    //   }
+    //   REST.get(`/profile/${pid}?_format=json`, params).then(({ data }) => {
+    //     console.log('profile', data)
+    //     if (data.address.length) {
+    //       commit('setName', `${data.address[0].given_name} ${data.address[0].family_name} `)
+    //     }
+    //   }).catch(error => {
+    //     console.warn('Issue with getUser', error)
+    //     Promise.reject(error)
+    //   })
+    // },
     getUserFlagColls ({ dispatch, commit, state }) {
       // flags
       // REST.get('/flagging_collection/1?_format=json')

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.