chore: more cleanup
This commit is contained in:
@@ -23,8 +23,6 @@
|
||||
:label="
|
||||
$t('PROFILE_SETTINGS.FORM.AUDIO_NOTIFICATIONS_SECTION.CONDITIONS.TITLE')
|
||||
"
|
||||
:play-audio-when-tab-is-inactive="playAudioWhenTabIsInactive"
|
||||
:alert-if-unread-conversation-exist="alertIfUnreadConversationExist"
|
||||
@change="handleAudioAlertConditions"
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -13,21 +13,11 @@
|
||||
</div>
|
||||
<div v-if="$slots.settingsItem" class="flex flex-col w-full gap-6">
|
||||
<slot name="settingsItem" />
|
||||
<form-button
|
||||
v-if="showActionButton"
|
||||
type="submit"
|
||||
color-scheme="primary"
|
||||
variant="solid"
|
||||
size="large"
|
||||
>
|
||||
{{ buttonText }}
|
||||
</form-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import FormButton from 'v3/components/Form/Button.vue';
|
||||
defineProps({
|
||||
header: {
|
||||
type: String,
|
||||
@@ -37,13 +27,5 @@ defineProps({
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
showActionButton: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
buttonText: {
|
||||
type: String,
|
||||
default: 'Save',
|
||||
},
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -24,12 +24,11 @@
|
||||
/>
|
||||
</div>
|
||||
|
||||
<base-personal-i-item
|
||||
<base-personal-item
|
||||
:header="$t('PROFILE_SETTINGS.FORM.MESSAGE_SIGNATURE_SECTION.TITLE')"
|
||||
:description="
|
||||
$t('PROFILE_SETTINGS.FORM.MESSAGE_SIGNATURE_SECTION.NOTE')
|
||||
"
|
||||
:show-action-button="false"
|
||||
>
|
||||
<template #settingsItem>
|
||||
<message-signature
|
||||
@@ -37,12 +36,11 @@
|
||||
@update-signature="updateProfile"
|
||||
/>
|
||||
</template>
|
||||
</base-personal-i-item>
|
||||
</base-personal-item>
|
||||
|
||||
<base-personal-i-item
|
||||
<base-personal-item
|
||||
:header="$t('PROFILE_SETTINGS.FORM.SEND_MESSAGE.TITLE')"
|
||||
:description="$t('PROFILE_SETTINGS.FORM.SEND_MESSAGE.NOTE')"
|
||||
:show-action-button="false"
|
||||
>
|
||||
<template #settingsItem>
|
||||
<div
|
||||
@@ -63,30 +61,28 @@
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
</base-personal-i-item>
|
||||
</base-personal-item>
|
||||
<change-password v-if="!globalConfig.disableUserProfileUpdate" />
|
||||
<base-personal-i-item
|
||||
<base-personal-item
|
||||
:header="
|
||||
$t('PROFILE_SETTINGS.FORM.AUDIO_NOTIFICATIONS_SECTION.TITLE')
|
||||
"
|
||||
:description="
|
||||
$t('PROFILE_SETTINGS.FORM.AUDIO_NOTIFICATIONS_SECTION.NOTE')
|
||||
"
|
||||
:show-action-button="false"
|
||||
>
|
||||
<template #settingsItem>
|
||||
<audio-notifications />
|
||||
</template>
|
||||
</base-personal-i-item>
|
||||
<base-personal-i-item
|
||||
</base-personal-item>
|
||||
<base-personal-item
|
||||
:header="$t('PROFILE_SETTINGS.FORM.NOTIFICATIONS.TITLE')"
|
||||
:show-action-button="false"
|
||||
>
|
||||
<template #settingsItem>
|
||||
<notification-preferences />
|
||||
</template>
|
||||
</base-personal-i-item>
|
||||
<base-personal-i-item
|
||||
</base-personal-item>
|
||||
<base-personal-item
|
||||
:header="$t('PROFILE_SETTINGS.FORM.ACCESS_TOKEN.TITLE')"
|
||||
:description="
|
||||
useInstallationName(
|
||||
@@ -94,7 +90,6 @@
|
||||
globalConfig.installationName
|
||||
)
|
||||
"
|
||||
:show-action-button="false"
|
||||
>
|
||||
<template #settingsItem>
|
||||
<access-token
|
||||
@@ -102,7 +97,7 @@
|
||||
@on-copy="onCopyToken"
|
||||
/>
|
||||
</template>
|
||||
</base-personal-i-item>
|
||||
</base-personal-item>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -125,12 +120,12 @@ import MessageSignature from './MessageSignature.vue';
|
||||
import HotKeyCard from './HotKeyCard.vue';
|
||||
import ChangePassword from './ChangePassword.vue';
|
||||
import AccessToken from './AccessToken.vue';
|
||||
import BasePersonalIItem from './BasePersonalIItem.vue';
|
||||
import BasePersonalItem from './BasePersonalIItem.vue';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
MessageSignature,
|
||||
BasePersonalIItem,
|
||||
BasePersonalItem,
|
||||
HotKeyCard,
|
||||
ChangePassword,
|
||||
AccessToken,
|
||||
|
||||
@@ -5,12 +5,7 @@
|
||||
v-bind="$attrs"
|
||||
@click="handleClick"
|
||||
>
|
||||
<fluent-icon
|
||||
v-if="icon"
|
||||
:size="iconSize"
|
||||
:icon="icon"
|
||||
class="flex-shrink-0"
|
||||
/>
|
||||
<fluent-icon v-if="icon" size="1.16em" :icon="icon" class="flex-shrink-0" />
|
||||
<span
|
||||
v-if="$slots.default"
|
||||
class="text-sm font-medium truncate ltr:text-left rtl:text-right"
|
||||
@@ -93,13 +88,6 @@ const sizeClass = computed(() => {
|
||||
return 'h-10 px-4 py-2.5 text';
|
||||
});
|
||||
|
||||
const iconSize = computed(() => {
|
||||
if (props.size === 'medium') {
|
||||
return '1em';
|
||||
}
|
||||
return '1.2em';
|
||||
});
|
||||
|
||||
const buttonClasses = computed(() => [colorClass.value, sizeClass.value]);
|
||||
|
||||
const handleClick = event => {
|
||||
|
||||
Reference in New Issue
Block a user