Skip to content

Commit

Permalink
feat: Purple color
Browse files Browse the repository at this point in the history
  • Loading branch information
Ayideyia committed Nov 11, 2024
1 parent 4b56f7c commit 6cef757
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 3 deletions.
7 changes: 6 additions & 1 deletion frontend/src/constant/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export enum Color {
Pink = 'pink',
Red = 'red',
Skyblue = 'skyblue',
Green = 'green'
Green = 'green',
Purple = 'purple'
}

export const Colors = {
Expand All @@ -71,6 +72,10 @@ export const Colors = {
[Color.Green]: {
primary: 'green',
secondary: '#025f02'
},
[Color.Purple]: {
primary: 'purple',
secondary: '#6a0f9c'
}
}

Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lang/locale/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ export default {
pink: 'Pink',
red: 'Red',
skyblue: 'Skyblue',
green: 'Green'
green: 'Green',
purple: 'Purple'
},
fontFamily: 'Font-Family',
resetFont: 'Reset Font-Family',
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/lang/locale/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,8 @@ export default {
pink: '粉色',
red: '红色',
skyblue: '天蓝色',
green: '绿色'
green: '绿色',
purple: '紫色'
},
fontFamily: '字体',
resetFont: '重置字体',
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/utils/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@ export const getCommands = () => {
label: 'settings.color.green',
cmd: 'Green',
handler: () => (appSettings.app.color = Color.Green)
},
{
label: 'settings.color.purple',
cmd: 'Purple',
handler: () => (appSettings.app.color = Color.Purple)
}
]
},
Expand Down
6 changes: 6 additions & 0 deletions frontend/src/utils/tray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ const getTrayMenus = () => {
text: 'settings.color.green',
checked: appSettings.app.color === Color.Green,
event: () => (appSettings.app.color = Color.Green)
},
{
type: 'item',
text: 'settings.color.purple',
checked: appSettings.app.color === Color.Purple,
event: () => (appSettings.app.color = Color.Purple)
}
]
},
Expand Down
4 changes: 4 additions & 0 deletions frontend/src/views/SettingsView/components/GeneralSetting.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ const colors = [
{
label: 'settings.color.green',
value: Color.Green
},
{
label: 'settings.color.purple',
value: Color.Purple
}
]
Expand Down

0 comments on commit 6cef757

Please sign in to comment.