Skip to content

Commit 4d69dba

Browse files
committed
feat(settings): add debug no animation option in settings
1 parent fb87cab commit 4d69dba

File tree

6 files changed

+18
-0
lines changed

6 files changed

+18
-0
lines changed

frontend/src/assets/styles/custom.less

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ body[debug-outline='true'] {
44
}
55
}
66

7+
body[debug-no-animation='true'] {
8+
* {
9+
transition: none !important;
10+
}
11+
}
12+
713
body {
814
margin: 0;
915
color: var(--color);

frontend/src/lang/locale/en.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ export default {
598598
multipleInstance: 'Allow Multiple APP Instances',
599599
rollingRelease: 'Enable Rolling Release',
600600
debugOutline: 'Show interface outline',
601+
debugNoAnimation: 'Disable Animation',
601602
startup: {
602603
name: 'Startup on boot',
603604
delay: 'Delay(s)',

frontend/src/lang/locale/zh.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,7 @@ export default {
597597
multipleInstance: '允许多APP实例运行',
598598
rollingRelease: '启用滚动发行',
599599
debugOutline: '显示界面轮廓',
600+
debugNoAnimation: '禁用动画',
600601
startup: {
601602
name: '开机时启动',
602603
delay: '延迟(秒)',

frontend/src/stores/appSettings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ export const useAppSettingsStore = defineStore('app-settings', () => {
8383
multipleInstance: false,
8484
rollingRelease: true,
8585
debugOutline: false,
86+
debugNoAnimation: false,
8687
pages: ['Overview', 'Profiles', 'Subscriptions', 'Plugins'],
8788
})
8889

@@ -156,6 +157,7 @@ export const useAppSettingsStore = defineStore('app-settings', () => {
156157
document.documentElement.style.setProperty('--secondary-color', secondary)
157158
document.body.style.fontFamily = settings.fontFamily
158159
document.body.setAttribute('debug-outline', String(settings.debugOutline))
160+
document.body.setAttribute('debug-no-animation', String(settings.debugNoAnimation))
159161
}
160162

161163
watch(

frontend/src/types/app.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ type AppSettings = {
9090
multipleInstance: boolean
9191
rollingRelease: boolean
9292
debugOutline: boolean
93+
debugNoAnimation: boolean
9394
pages: string[]
9495
}
9596

frontend/src/views/SettingsView/components/GeneralSettings.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,5 +321,12 @@ if (envStore.env.os === 'windows') {
321321
</div>
322322
<Switch v-model="appSettings.app.debugOutline" />
323323
</div>
324+
<div class="px-16 py-8">
325+
<div class="text-18 font-bold pt-8 pb-16">
326+
{{ t('settings.debugNoAnimation') }}
327+
<span class="font-normal text-12">(debug)</span>
328+
</div>
329+
<Switch v-model="appSettings.app.debugNoAnimation" />
330+
</div>
324331
</div>
325332
</template>

0 commit comments

Comments
 (0)