-
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
160 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
...admin/src/layouts/setting/components/SettingDrawer/components/SettingTransition/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<script setup lang="ts"> | ||
import { RouterTransitionConstants } from "@celeris/constants"; | ||
import { SettingMenu } from "~/layouts/setting/components/SettingDrawer/components"; | ||
import { useTransitionSetting } from "~/composables"; | ||
const { t } = useI18n(); | ||
const { | ||
getShouldEnableTransition, | ||
setShouldEnableTransition, | ||
getShouldOpenNProgress, | ||
setShouldOpenNProgress, | ||
getShouldOpenPageLoading, | ||
setShouldOpenPageLoading, | ||
getRouterBasicTransition, | ||
setRouterBasicTransition, | ||
} = useTransitionSetting(); | ||
function convertTransitionConstantsToOptions<T extends Record<string, string>>(transitionConstants: T): { label: string; value: T[keyof T] }[] { | ||
const options: { label: string; value: T[keyof T] }[] = []; | ||
for (const key in transitionConstants) { | ||
if (Number.isNaN(Number(key))) { | ||
options.push({ | ||
label: key, | ||
value: transitionConstants[key as keyof T], | ||
}); | ||
} | ||
} | ||
return options; | ||
} | ||
</script> | ||
|
||
<template> | ||
<NDivider title-placement="center"> | ||
{{ t('layouts.header.transitionSetting.title') }} | ||
</NDivider> | ||
<NSpace vertical size="large"> | ||
<SettingMenu :label="t('layouts.header.transitionSetting.enableTransition')"> | ||
<NSwitch :value="getShouldEnableTransition" @update:value="setShouldEnableTransition" /> | ||
</SettingMenu> | ||
<SettingMenu :label="t('layouts.header.transitionSetting.enableProgressBar')"> | ||
<NSwitch :disabled="!getShouldEnableTransition" :value="getShouldOpenNProgress" @update:value="setShouldOpenNProgress" /> | ||
</SettingMenu> | ||
<SettingMenu :label="t('layouts.header.transitionSetting.enablePageLoadingTransition')"> | ||
<NSwitch :disabled="!getShouldEnableTransition" :value="getShouldOpenPageLoading" @update:value="setShouldOpenPageLoading" /> | ||
</SettingMenu> | ||
<SettingMenu :label="t('layouts.header.transitionSetting.routeTransition')"> | ||
<NSelect | ||
class="w-1/2" | ||
size="small" | ||
:disabled="!getShouldEnableTransition" | ||
:value="getRouterBasicTransition" | ||
:options="convertTransitionConstantsToOptions(RouterTransitionConstants)" | ||
@update:value="setRouterBasicTransition" | ||
/> | ||
</SettingMenu> | ||
</NSpace> | ||
</template> | ||
|
||
<style scoped> | ||
</style> |
3 changes: 2 additions & 1 deletion
3
apps/admin/src/layouts/setting/components/SettingDrawer/components/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import DarkMode from "./DarkMode/index.vue"; | ||
import SettingMenu from "./SettingMenu/index.vue"; | ||
import SettingTransition from "./SettingTransition/index.vue"; | ||
import ThemeBackup from "./ThemeBackup/index.vue"; | ||
import ThemeColor from "./ThemeColor/index.vue"; | ||
|
||
export { DarkMode, SettingMenu, ThemeBackup, ThemeColor }; | ||
export { DarkMode, SettingMenu, SettingTransition, ThemeBackup, ThemeColor }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
import "@kirklin/reset-css/kirklin.css"; | ||
import "./src/index.css"; | ||
import "uno.css"; | ||
import "animate.css"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
@import "variables.css"; | ||
@import "transition.css"; | ||
|
||
html{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
f300891
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
celeris-web – ./apps/admin
celeris-web.vercel.app
celeris-web-git-master-kirklin.vercel.app
celeris-web-kirklin.vercel.app
f300891
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
celeris-web-api – ./services/admin
celeris-web-api-kirklin.vercel.app
celeris-web-api-git-master-kirklin.vercel.app
celeris-web-api.vercel.app