feat(settings/user/color): implement basic color picker without animations
This commit is contained in:
@@ -1,5 +1,20 @@
|
||||
export const useAppStore = defineStore("app", {
|
||||
state: () => ({
|
||||
booted: false,
|
||||
_color: { col: 0, row: 0 },
|
||||
}),
|
||||
|
||||
actions: {
|
||||
setColor(col: number, row: number) {
|
||||
this._color = { col, row };
|
||||
},
|
||||
},
|
||||
|
||||
getters: {
|
||||
color: (state) => ({
|
||||
col: state._color.col,
|
||||
row: state._color.row,
|
||||
hex: APP_COLORS[state._color.row]![state._color.col]!,
|
||||
}),
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user