refactor: refactor locales, separate locales within apps,fixed #12
This commit is contained in:
@@ -43,10 +43,10 @@
|
||||
"@vben-core/colorful": "workspace:*",
|
||||
"@vben-core/design": "workspace:*",
|
||||
"@vben-core/iconify": "workspace:*",
|
||||
"@vben-core/locales": "workspace:*",
|
||||
"@vben-core/preferences": "workspace:*",
|
||||
"@vben-core/shadcn-ui": "workspace:*",
|
||||
"@vben-core/toolkit": "workspace:*",
|
||||
"@vben/locales": "workspace:*",
|
||||
"@vueuse/core": "^10.11.0",
|
||||
"vue": "^3.4.31",
|
||||
"vue-router": "^4.4.0"
|
||||
|
@@ -51,19 +51,19 @@ onUnmounted(() => {
|
||||
});
|
||||
</script>
|
||||
<template>
|
||||
<div ref="wrapperEl" class="coze-assistant"></div>
|
||||
<div ref="wrapperEl" class="coze-vben-admin-assistant"></div>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
.coze-assistant {
|
||||
.coze-vben-admin-assistant {
|
||||
position: fixed;
|
||||
right: 30px;
|
||||
bottom: 60px;
|
||||
z-index: 1000;
|
||||
|
||||
img {
|
||||
width: 42px !important;
|
||||
height: 42px !important;
|
||||
width: 50px !important;
|
||||
height: 50px !important;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
@@ -3,7 +3,6 @@ import type { MenuRecordRaw } from '@vben/types';
|
||||
|
||||
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import {
|
||||
IcRoundArrowDownward,
|
||||
IcRoundArrowUpward,
|
||||
@@ -11,6 +10,7 @@ import {
|
||||
IcRoundSubdirectoryArrowLeft,
|
||||
MdiKeyboardEsc,
|
||||
} from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
|
@@ -4,8 +4,8 @@ import type { MenuRecordRaw } from '@vben/types';
|
||||
import { nextTick, onMounted, ref, shallowRef, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { IcRoundClose, IcRoundSearchOff } from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import { VbenIcon, VbenScrollbar } from '@vben-core/shadcn-ui';
|
||||
import { mapTree, traverseTreeValues, uniqueByField } from '@vben-core/toolkit';
|
||||
|
||||
|
@@ -1,8 +1,8 @@
|
||||
<script setup lang="ts">
|
||||
import type { SupportedLanguagesType } from '@vben/types';
|
||||
|
||||
import { loadLocaleMessages } from '@vben/locales';
|
||||
import { IcBaselineLanguage } from '@vben-core/iconify';
|
||||
import { loadLocaleMessages } from '@vben-core/locales';
|
||||
import {
|
||||
SUPPORT_LANGUAGES,
|
||||
preferences,
|
||||
|
@@ -1,11 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import type { NotificationItem } from './interface';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import {
|
||||
IcRoundMarkEmailRead,
|
||||
IcRoundNotificationsNone,
|
||||
} from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import {
|
||||
VbenButton,
|
||||
VbenIconButton,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import { SUPPORT_LANGUAGES } from '@vben-core/preferences';
|
||||
|
||||
import SelectItem from '../select-item.vue';
|
||||
|
@@ -3,7 +3,7 @@ import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
import ToggleItem from '../toggle-item.vue';
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { type Component, computed } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import { ContentCompact, ContentWide } from '../../icons';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import InputItem from '../input-item.vue';
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { LayoutHeaderModeType, SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SelectItem from '../select-item.vue';
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
|
@@ -3,8 +3,8 @@ import type { LayoutType } from '@vben/types';
|
||||
|
||||
import { type Component, computed } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { MdiQuestionMarkCircleOutline } from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import { VbenTooltip } from '@vben-core/shadcn-ui';
|
||||
|
||||
import {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { SelectListItem } from '@vben/types';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
import ToggleItem from '../toggle-item.vue';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import NumberFieldItem from '../number-field-item.vue';
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import { isWindowsOs } from '@vben-core/toolkit';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
@@ -3,9 +3,9 @@ import type { BuiltinThemeType } from '@vben/types';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { TinyColor, convertToHsl } from '@vben-core/colorful';
|
||||
import { MdiEditBoxOutline } from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import {
|
||||
BUILT_IN_THEME_PRESETS,
|
||||
type BuiltinThemePreset,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
|
@@ -3,12 +3,12 @@ import type { ThemeModeType } from '@vben-core/preferences';
|
||||
|
||||
import type { Component } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import {
|
||||
IcRoundMotionPhotosAuto,
|
||||
IcRoundWbSunny,
|
||||
MdiMoonAndStars,
|
||||
} from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
|
||||
import SwitchItem from '../switch-item.vue';
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script lang="ts" setup>
|
||||
import { loadLocaleMessages } from '@vben/locales';
|
||||
import { loadLocaleMessages } from '@vben-core/locales';
|
||||
import { preferences, updatePreferences } from '@vben-core/preferences';
|
||||
|
||||
import Preferences from './preferences.vue';
|
||||
|
@@ -15,8 +15,8 @@ import type { SegmentedItem } from '@vben-core/shadcn-ui';
|
||||
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { $t, loadLocaleMessages } from '@vben/locales';
|
||||
import { IcRoundFolderCopy, IcRoundRestartAlt } from '@vben-core/iconify';
|
||||
import { $t, loadLocaleMessages } from '@vben-core/locales';
|
||||
import {
|
||||
clearPreferencesCache,
|
||||
preferences,
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { $t } from '@vben/locales';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import { VbenButton } from '@vben-core/shadcn-ui';
|
||||
|
||||
import IconSetting from './icons/setting.vue';
|
||||
|
@@ -1,10 +1,10 @@
|
||||
<script lang="ts" setup>
|
||||
import { $t } from '@vben/locales';
|
||||
import {
|
||||
IcRoundMotionPhotosAuto,
|
||||
IcRoundWbSunny,
|
||||
MdiMoonAndStars,
|
||||
} from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import {
|
||||
type ThemeModeType,
|
||||
preferences,
|
||||
|
@@ -4,8 +4,8 @@ import type { AnyFunction } from '@vben/types';
|
||||
import type { Component } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
|
||||
import { $t } from '@vben/locales';
|
||||
import { IcRoundLogout, IcRoundSettingsSuggest } from '@vben-core/iconify';
|
||||
import { $t } from '@vben-core/locales';
|
||||
import { preferences, usePreferences } from '@vben-core/preferences';
|
||||
import {
|
||||
Badge,
|
||||
|
Reference in New Issue
Block a user