Browse Source

refactor(gui-v2): move language switcher

pull/3023/head
braks 2 years ago
parent
commit
5318376f3c
  1. 11
      packages/nc-gui-v2/app.vue
  2. 2
      packages/nc-gui-v2/components/general/Language.vue

11
packages/nc-gui-v2/app.vue

@ -73,6 +73,13 @@ const logout = () => {
<MdiDatabase class="cursor-pointer transform hover:scale-105 text-2xl" /> <MdiDatabase class="cursor-pointer transform hover:scale-105 text-2xl" />
</div> </div>
<a-tooltip placement="right">
<template #title> Switch language </template>
<div class="flex w-full justify-center items-center h-12 group p-2">
<general-language class="cursor-pointer text-2xl" />
</div>
</a-tooltip>
<div class="flex w-full justify-center items-center h-12 group p-2"> <div class="flex w-full justify-center items-center h-12 group p-2">
<MdiLightningBoltOutline class="cursor-not-allowed text-2xl text-gray-400" /> <MdiLightningBoltOutline class="cursor-not-allowed text-2xl text-gray-400" />
</div> </div>
@ -111,10 +118,6 @@ const logout = () => {
</a-tooltip> </a-tooltip>
</div> </div>
</div> </div>
<div class="flex justify-end gap-4">
<general-language class="mr-3" />
</div>
</a-layout-header> </a-layout-header>
<div class="w-full h-full"> <div class="w-full h-full">

2
packages/nc-gui-v2/components/general/Language.vue

@ -34,7 +34,7 @@ onMounted(() => {
<template> <template>
<v-menu class="select-none"> <v-menu class="select-none">
<template #activator="{ props }"> <template #activator="{ props }">
<MaterialSymbolsTranslate class="md:text-xl cursor-pointer nc-menu-translate" @click="props.onClick" /> <MaterialSymbolsTranslate v-bind="$attrs" class="md:text-xl cursor-pointer nc-menu-translate" @click="props.onClick" />
</template> </template>
<v-list class="scrollbar min-w-50 max-h-90vh overflow-auto !py-0 dark:(!bg-gray-800 !text-white)"> <v-list class="scrollbar min-w-50 max-h-90vh overflow-auto !py-0 dark:(!bg-gray-800 !text-white)">

Loading…
Cancel
Save