Show user/displayname when backend does not offer saving

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-02-18 22:27:22 +01:00
parent 3be571cd05
commit fd2cfce417
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 23 additions and 20 deletions

View File

@ -76,32 +76,35 @@
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"