]> source.dussan.org Git - nextcloud-server.git/commitdiff
Show user/displayname when backend does not offer saving
authorJulius Härtl <jus@bitgrid.net>
Tue, 18 Feb 2020 21:27:22 +0000 (22:27 +0100)
committerJulius Härtl <jus@bitgrid.net>
Tue, 3 Mar 2020 14:54:57 +0000 (15:54 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/settings/src/components/UserList/UserRow.vue

index e7c039376f5a3b28754b9fa2fb549ae1ad0faf43..201ab8b77284fafbe2e213b371689c8278ab4ff5 100644 (file)
                                width="32">
                </div>
                <!-- dirty hack to ellipsis on two lines -->
-               <div class="displayName">
+               <div v-if="user.backendCapabilities.setDisplayName" class="displayName">
                        <form
                                :class="{'icon-loading-small': loading.displayName}"
                                class="displayName"
                                @submit.prevent="updateDisplayName">
-                               <template v-if="user.backendCapabilities.setDisplayName">
-                                       <input v-if="user.backendCapabilities.setDisplayName"
-                                               :id="'displayName'+user.id+rand"
-                                               ref="displayName"
-                                               :disabled="loading.displayName||loading.all"
-                                               :value="user.displayname"
-                                               autocapitalize="off"
-                                               autocomplete="new-password"
-                                               autocorrect="off"
-                                               spellcheck="false"
-                                               type="text">
-                                       <input v-if="user.backendCapabilities.setDisplayName"
-                                               class="icon-confirm"
-                                               type="submit"
-                                               value="">
-                               </template>
-                               <div v-else
-                                       v-tooltip.auto="t('settings', 'The backend does not support changing the display name')"
-                                       class="name" />
+                               <input
+                                       :id="'displayName'+user.id+rand"
+                                       ref="displayName"
+                                       :disabled="loading.displayName||loading.all"
+                                       :value="user.displayname"
+                                       autocapitalize="off"
+                                       autocomplete="off"
+                                       autocorrect="off"
+                                       spellcheck="false"
+                                       type="text">
+                               <input
+                                       class="icon-confirm"
+                                       type="submit"
+                                       value="">
                        </form>
                </div>
+               <div v-else class="name">
+                       {{ user.id }}
+                       <div class="displayName subtitle">
+                               <div v-tooltip="user.displayname.length > 20 ? user.displayname : ''" class="cellText">
+                                       {{ user.displayname }}
+                               </div>
+                       </div>
+               </div>
                <form v-if="settings.canChangePassword && user.backendCapabilities.setPassword"
                        :class="{'icon-loading-small': loading.password}"
                        class="password"