feat (client): sort "select a widget" dropdown (closes #10973)
This commit is contained in:
parent
caab676984
commit
888e472157
1 changed files with 7 additions and 1 deletions
|
@ -9,7 +9,7 @@
|
|||
>
|
||||
<template #label>{{ i18n.ts.selectWidget }}</template>
|
||||
<option
|
||||
v-for="widget in widgetDefs"
|
||||
v-for="widget in sortedWidgets"
|
||||
:key="widget"
|
||||
:value="widget"
|
||||
>
|
||||
|
@ -101,6 +101,12 @@ const emit = defineEmits<{
|
|||
(ev: "exit"): void;
|
||||
}>();
|
||||
|
||||
const sortedWidgets = computed(() =>
|
||||
widgetDefs.sort((a, b) =>
|
||||
i18n.t(`_widgets.${a}`).localeCompare(i18n.t(`_widgets.${b}`)),
|
||||
),
|
||||
);
|
||||
|
||||
const widgetRefs = {};
|
||||
const configWidget = (id: string) => {
|
||||
widgetRefs[id].configure();
|
||||
|
|
Loading…
Reference in a new issue