Skip to content

Commit b347ddd

Browse files
committed
feat(debug): add option to disable rounded corners
1 parent 251b043 commit b347ddd

File tree

6 files changed

+26
-8
lines changed

6 files changed

+26
-8
lines changed

frontend/src/assets/styles/custom.less

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,19 @@ body[debug-no-animation='true'] {
1010
}
1111
}
1212

13+
body[debug-no-rounded='true'] {
14+
.rounded-2,
15+
.rounded-4,
16+
.rounded-6,
17+
.rounded-8,
18+
.rounded-16,
19+
.rounded-32,
20+
.rounded-9999,
21+
.rounded-full {
22+
border-radius: 0;
23+
}
24+
}
25+
1326
body[debug-border='true'] {
1427
box-shadow: inset 0 0 1px var(--color);
1528
}

frontend/src/lang/locale/en.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ export default {
269269
rulesets: 'Rulesets',
270270
plugins: 'Plugins',
271271
settings: 'Settings',
272-
debug: 'Debug',
273-
components: 'Components',
274272
about: 'About',
275273
profiles: 'Profiles',
276274
kernel: 'Kernel',
@@ -559,7 +557,7 @@ export default {
559557
behavior: 'Behavior',
560558
systemProxy: 'System Proxy',
561559
advanced: 'Advanced',
562-
debug: 'Debug',
560+
features: 'Features',
563561
general: 'General',
564562
theme: {
565563
name: 'Theme',
@@ -622,7 +620,8 @@ export default {
622620
multipleInstance: 'Allow multiple app instances',
623621
rollingRelease: 'Enable Rolling Release',
624622
debugOutline: 'Show interface outline',
625-
debugNoAnimation: 'Disable Animation',
623+
debugNoAnimation: 'Disable animations',
624+
debugNoRounded: 'Disable rounded corners',
626625
debugBorder: 'Show window border',
627626
startup: {
628627
name: 'Run at startup',

frontend/src/lang/locale/zh.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,8 +269,6 @@ export default {
269269
rulesets: '规则集',
270270
plugins: '插件',
271271
settings: '设置',
272-
debug: '调试',
273-
components: '组件预览',
274272
about: '关于',
275273
profiles: '配置',
276274
kernel: '内核',
@@ -558,7 +556,7 @@ export default {
558556
behavior: '行为',
559557
systemProxy: '系统代理',
560558
advanced: '高级',
561-
debug: '调试',
559+
features: '特性',
562560
general: '通用',
563561
theme: {
564562
name: '主题',
@@ -622,6 +620,7 @@ export default {
622620
rollingRelease: '启用滚动发行',
623621
debugOutline: '显示界面轮廓',
624622
debugNoAnimation: '禁用动画',
623+
debugNoRounded: '禁用圆角',
625624
debugBorder: '显示窗口边框',
626625
startup: {
627626
name: '自启动',

frontend/src/stores/appSettings.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ export const useAppSettingsStore = defineStore('app-settings', () => {
9292
rollingRelease: true,
9393
debugOutline: false,
9494
debugNoAnimation: false,
95+
debugNoRounded: false,
9596
debugBorder: false,
9697
pages: ['Overview', 'Profiles', 'Subscriptions', 'Plugins'],
9798
})
@@ -189,6 +190,7 @@ export const useAppSettingsStore = defineStore('app-settings', () => {
189190
document.body.style.fontFamily = settings.fontFamily
190191
document.body.setAttribute('debug-outline', String(settings.debugOutline))
191192
document.body.setAttribute('debug-no-animation', String(settings.debugNoAnimation))
193+
document.body.setAttribute('debug-no-rounded', String(settings.debugNoRounded))
192194
document.body.setAttribute('debug-border', String(settings.debugBorder))
193195
}
194196

frontend/src/types/app.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ type AppSettings = {
9595
rollingRelease: boolean
9696
debugOutline: boolean
9797
debugNoAnimation: boolean
98+
debugNoRounded: boolean
9899
debugBorder: boolean
99100
pages: string[]
100101
}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const appSettings = useAppSettingsStore()
44
</script>
55

66
<template>
7-
<div class="px-8 py-12 text-18 font-bold">{{ $t('settings.debug') }}</div>
7+
<div class="px-8 py-12 text-18 font-bold">{{ $t('settings.features') }}</div>
88

99
<Card>
1010
<div class="px-8 py-12 flex items-center justify-between">
@@ -19,5 +19,9 @@ const appSettings = useAppSettingsStore()
1919
<div class="text-16 font-bold">{{ $t('settings.debugNoAnimation') }}</div>
2020
<Switch v-model="appSettings.app.debugNoAnimation" />
2121
</div>
22+
<div class="px-8 py-12 flex items-center justify-between">
23+
<div class="text-16 font-bold">{{ $t('settings.debugNoRounded') }}</div>
24+
<Switch v-model="appSettings.app.debugNoRounded" />
25+
</div>
2226
</Card>
2327
</template>

0 commit comments

Comments
 (0)