File tree Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Expand file tree Collapse file tree 3 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ export default {
122122 }
123123
124124 // update loading status
125- function updateImagesUploading (index , percent , url ) {
125+ const updateImagesUploading = (index , percent , url ) => {
126126 // on successful update
127127 if (percent) {
128128 // update images' progress sum
Original file line number Diff line number Diff line change @@ -349,6 +349,7 @@ export default {
349349 breadcrumbs: [{label: ' Home' , state: ' #' , opts: {}}]
350350 })
351351
352+ watch (() => $auth .user , u => v .currentUser = u, { deep: true })
352353 watch (() => $route .path , p => v .hideAnnnouncement = v .motdData ? .main_view_only && p !== ' ' && p !== ' /' )
353354 watch (() => NotificationsStore .messages , c => v .notificationMessages = c)
354355 watch (() => NotificationsStore .mentions , c => v .notificationMentions = c)
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ import Modal from '@/components/layout/Modal.vue'
3636import { reactive , toRefs , inject } from ' vue'
3737import { usersApi } from ' @/api'
3838import { cloneDeep } from ' lodash'
39+ import { AuthStore } from ' @/composables/stores/auth'
3940
4041export default {
4142 name: ' update-avatar-modal' ,
@@ -55,6 +56,7 @@ export default {
5556 v .userCopy .avatar = data .avatar
5657 $alertStore .success (` Successfully updated avatar for user ${ params .username } ` )
5758 Object .assign (v .userReactive , v .userCopy )
59+ $auth .reauthenticate ()
5860 })
5961 .catch (() => v .errorMessage = ' There was an error updating avatar.' )
6062 .finally (() => v .errorMessage ? null : close ())
@@ -69,6 +71,7 @@ export default {
6971 const uploadError = err => v .errorMessage = err
7072 /* Internal Data */
7173 const $alertStore = inject (' $alertStore' )
74+ const $auth = inject (AuthStore)
7275
7376 /* Template Data */
7477 const v = reactive ({
You can’t perform that action at this time.
0 commit comments