refactor: update user image handling and disabled profile menu options
This commit is contained in:
parent
7b78c95292
commit
7faef797cc
2 changed files with 31 additions and 28 deletions
|
|
@ -18,26 +18,29 @@ const inputFile = document.createElement('input');
|
|||
inputFile.type = 'file';
|
||||
inputFile.accept = 'image/*';
|
||||
|
||||
const options = ref([
|
||||
const options = [
|
||||
{
|
||||
icon: 'mdi-account',
|
||||
label: 'menu.profile.editPersonalInfo',
|
||||
value: 'op1',
|
||||
value: 'updateProfile',
|
||||
color: 'grey',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
icon: 'mdi-signature-freehand',
|
||||
label: 'menu.profile.signature',
|
||||
value: 'op2',
|
||||
value: 'signature',
|
||||
color: 'grey',
|
||||
disabled: true,
|
||||
},
|
||||
{
|
||||
icon: 'mdi-brightness-6',
|
||||
label: 'menu.profile.mode',
|
||||
value: 'op3',
|
||||
value: 'mode',
|
||||
color: 'grey',
|
||||
disabled: false,
|
||||
},
|
||||
]);
|
||||
];
|
||||
|
||||
const themeMode = ref([
|
||||
{
|
||||
|
|
@ -263,14 +266,15 @@ onMounted(async () => {
|
|||
<q-list
|
||||
:dense="true"
|
||||
v-for="op in options"
|
||||
:key="op.label"
|
||||
:id="op.label"
|
||||
:key="op.value"
|
||||
:id="op.value"
|
||||
>
|
||||
<q-item
|
||||
v-if="op.label !== 'menu.profile.mode'"
|
||||
v-if="op.value !== 'mode'"
|
||||
clickable
|
||||
:id="`btn-${op.label}`"
|
||||
@click="$emit(op.label)"
|
||||
:disable="op.disabled"
|
||||
:id="`btn-${op.value}`"
|
||||
@click="$emit(op.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="op.icon" :color="op.color" size="20px" />
|
||||
|
|
@ -280,12 +284,12 @@ onMounted(async () => {
|
|||
</q-item-section>
|
||||
</q-item>
|
||||
|
||||
<q-separator v-if="op.label === 'menu.profile.mode'" />
|
||||
<q-separator v-if="op.value === 'mode'" />
|
||||
<q-item
|
||||
v-if="op.label === 'menu.profile.mode'"
|
||||
v-if="op.value === 'mode'"
|
||||
clickable
|
||||
:id="`btn-${op.label}`"
|
||||
@click="$emit(op.label)"
|
||||
:id="`btn-${op.value}`"
|
||||
@click="$emit(op.value)"
|
||||
>
|
||||
<q-item-section avatar>
|
||||
<q-icon :name="op.icon" :color="op.color" size="20px" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue