fix(front): fixes in EditIdentity view
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
bde7206a1c
commit
7e13e2baa7
|
@ -65,9 +65,15 @@ body {
|
||||||
.field-label {
|
.field-label {
|
||||||
@apply block text-gray-700 dark:text-gray-100 text-base font-bold mb-2;
|
@apply block text-gray-700 dark:text-gray-100 text-base font-bold mb-2;
|
||||||
}
|
}
|
||||||
|
.o-field--horizontal.field {
|
||||||
|
@apply items-center;
|
||||||
|
}
|
||||||
.o-field__horizontal-label .field-label {
|
.o-field__horizontal-label .field-label {
|
||||||
@apply mb-0;
|
@apply mb-0;
|
||||||
}
|
}
|
||||||
|
.o-field__horizontal-body > .field {
|
||||||
|
@apply mt-0;
|
||||||
|
}
|
||||||
.field-danger {
|
.field-danger {
|
||||||
@apply text-red-500;
|
@apply text-red-500;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,24 +2,23 @@
|
||||||
<div>
|
<div>
|
||||||
<breadcrumbs-nav :links="breadcrumbsLinks" />
|
<breadcrumbs-nav :links="breadcrumbsLinks" />
|
||||||
<div v-if="identity">
|
<div v-if="identity">
|
||||||
<h1>
|
<h1 class="flex justify-center">
|
||||||
<span v-if="isUpdate" class="line-clamp-2">{{
|
<span v-if="isUpdate" class="line-clamp-2">{{
|
||||||
displayName(identity)
|
displayName(identity)
|
||||||
}}</span>
|
}}</span>
|
||||||
<span v-else>{{ $t("I create an identity") }}</span>
|
<span v-else>{{ t("I create an identity") }}</span>
|
||||||
</h1>
|
</h1>
|
||||||
<o-field horizontal :label="t('Avatar')">
|
<o-field horizontal :label="t('Avatar')">
|
||||||
<picture-upload
|
<picture-upload
|
||||||
v-model="avatarFile"
|
v-model="avatarFile"
|
||||||
:defaultImage="identity.avatar"
|
:defaultImage="identity.avatar"
|
||||||
:maxSize="avatarMaxSize"
|
:maxSize="avatarMaxSize"
|
||||||
class="picture-upload"
|
|
||||||
/>
|
/>
|
||||||
</o-field>
|
</o-field>
|
||||||
|
|
||||||
<o-field
|
<o-field
|
||||||
horizontal
|
horizontal
|
||||||
:label="$t('Display name')"
|
:label="t('Display name')"
|
||||||
label-for="identity-display-name"
|
label-for="identity-display-name"
|
||||||
>
|
>
|
||||||
<o-input
|
<o-input
|
||||||
|
@ -34,14 +33,15 @@
|
||||||
|
|
||||||
<o-field
|
<o-field
|
||||||
horizontal
|
horizontal
|
||||||
custom-class="username-field"
|
class="username-field"
|
||||||
expanded
|
:label="t('Username')"
|
||||||
:label="$t('Username')"
|
|
||||||
label-for="identity-username"
|
label-for="identity-username"
|
||||||
:message="message"
|
:message="message"
|
||||||
>
|
>
|
||||||
<o-field expanded>
|
<o-field class="!mt-0">
|
||||||
<o-input
|
<o-input
|
||||||
|
expanded
|
||||||
|
class="!mt-0"
|
||||||
aria-required="true"
|
aria-required="true"
|
||||||
required
|
required
|
||||||
v-model="identity.preferredUsername"
|
v-model="identity.preferredUsername"
|
||||||
|
@ -60,7 +60,7 @@
|
||||||
|
|
||||||
<o-field
|
<o-field
|
||||||
horizontal
|
horizontal
|
||||||
:label="$t('Description')"
|
:label="t('Description')"
|
||||||
label-for="identity-summary"
|
label-for="identity-summary"
|
||||||
>
|
>
|
||||||
<o-input
|
<o-input
|
||||||
|
@ -82,29 +82,29 @@
|
||||||
>{{ error }}</o-notification
|
>{{ error }}</o-notification
|
||||||
>
|
>
|
||||||
|
|
||||||
<o-field class="submit">
|
<o-field class="flex justify-center !my-6">
|
||||||
<div class="control">
|
<div class="control">
|
||||||
<o-button type="button" variant="primary" @click="submit()">
|
<o-button type="button" variant="primary" @click="submit()">
|
||||||
{{ $t("Save") }}
|
{{ t("Save") }}
|
||||||
</o-button>
|
</o-button>
|
||||||
</div>
|
</div>
|
||||||
</o-field>
|
</o-field>
|
||||||
|
|
||||||
<o-field class="delete-identity">
|
<o-field class="flex justify-center">
|
||||||
<o-button
|
<o-button
|
||||||
v-if="isUpdate"
|
v-if="isUpdate"
|
||||||
@click="openDeleteIdentityConfirmation()"
|
@click="openDeleteIdentityConfirmation()"
|
||||||
variant="text"
|
variant="text"
|
||||||
>
|
>
|
||||||
{{ $t("Delete this identity") }}
|
{{ t("Delete this identity") }}
|
||||||
</o-button>
|
</o-button>
|
||||||
</o-field>
|
</o-field>
|
||||||
|
|
||||||
<section v-if="isUpdate">
|
<section v-if="isUpdate">
|
||||||
<h2>{{ $t("Profile feeds") }}</h2>
|
<h2>{{ t("Profile feeds") }}</h2>
|
||||||
<p>
|
<p>
|
||||||
{{
|
{{
|
||||||
$t(
|
t(
|
||||||
"These feeds contain event data for the events for which this specific profile is a participant or creator. You should keep these private. You can find feeds for all of your profiles into your notification settings."
|
"These feeds contain event data for the events for which this specific profile is a participant or creator. You should keep these private. You can find feeds for all of your profiles into your notification settings."
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
:key="feedToken.token"
|
:key="feedToken.token"
|
||||||
>
|
>
|
||||||
<o-tooltip
|
<o-tooltip
|
||||||
:label="$t('URL copied to clipboard')"
|
:label="t('URL copied to clipboard')"
|
||||||
:active="showCopiedTooltip.atom"
|
:active="showCopiedTooltip.atom"
|
||||||
always
|
always
|
||||||
variant="success"
|
variant="success"
|
||||||
|
@ -131,11 +131,11 @@
|
||||||
"
|
"
|
||||||
:href="tokenToURL(feedToken.token, 'atom')"
|
:href="tokenToURL(feedToken.token, 'atom')"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>{{ $t("RSS/Atom Feed") }}</o-button
|
>{{ t("RSS/Atom Feed") }}</o-button
|
||||||
>
|
>
|
||||||
</o-tooltip>
|
</o-tooltip>
|
||||||
<o-tooltip
|
<o-tooltip
|
||||||
:label="$t('URL copied to clipboard')"
|
:label="t('URL copied to clipboard')"
|
||||||
:active="showCopiedTooltip.ics"
|
:active="showCopiedTooltip.ics"
|
||||||
always
|
always
|
||||||
variant="success"
|
variant="success"
|
||||||
|
@ -150,14 +150,14 @@
|
||||||
icon-left="calendar-sync"
|
icon-left="calendar-sync"
|
||||||
:href="tokenToURL(feedToken.token, 'ics')"
|
:href="tokenToURL(feedToken.token, 'ics')"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
>{{ $t("ICS/WebCal Feed") }}</o-button
|
>{{ t("ICS/WebCal Feed") }}</o-button
|
||||||
>
|
>
|
||||||
</o-tooltip>
|
</o-tooltip>
|
||||||
<o-button
|
<o-button
|
||||||
icon-left="refresh"
|
icon-left="refresh"
|
||||||
variant="text"
|
variant="text"
|
||||||
@click="openRegenerateFeedTokensConfirmation"
|
@click="openRegenerateFeedTokensConfirmation"
|
||||||
>{{ $t("Regenerate new links") }}</o-button
|
>{{ t("Regenerate new links") }}</o-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
icon-left="refresh"
|
icon-left="refresh"
|
||||||
variant="text"
|
variant="text"
|
||||||
@click="generateFeedTokens"
|
@click="generateFeedTokens"
|
||||||
>{{ $t("Create new links") }}</o-button
|
>{{ t("Create new links") }}</o-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
@ -176,28 +176,14 @@
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@use "@/styles/_mixins" as *;
|
@use "@/styles/_mixins" as *;
|
||||||
h1 {
|
// h1 {
|
||||||
display: flex;
|
// display: flex;
|
||||||
justify-content: center;
|
// justify-content: center;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.picture-upload {
|
// .username-field + .field {
|
||||||
margin: 30px 0;
|
// margin-bottom: 0;
|
||||||
}
|
// }
|
||||||
|
|
||||||
.submit,
|
|
||||||
.delete-identity {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submit {
|
|
||||||
margin: 30px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.username-field + .field {
|
|
||||||
margin-bottom: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.buttons > *:not(:last-child) .button) {
|
:deep(.buttons > *:not(:last-child) .button) {
|
||||||
@include margin-right(0.5rem);
|
@include margin-right(0.5rem);
|
||||||
|
@ -286,12 +272,12 @@ const baseIdentity: IPerson = {
|
||||||
suspended: false,
|
suspended: false,
|
||||||
};
|
};
|
||||||
|
|
||||||
const identity = ref(baseIdentity);
|
const identity = ref<IPerson>(baseIdentity);
|
||||||
|
|
||||||
watch(person, () => {
|
watch(person, () => {
|
||||||
console.debug("person changed", person.value);
|
console.debug("person changed", person.value);
|
||||||
if (person.value) {
|
if (person.value) {
|
||||||
identity.value = person.value;
|
identity.value = { ...person.value };
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue