Improve deck
This commit is contained in:
parent
94598ab555
commit
78598a92f9
7 changed files with 123 additions and 98 deletions
|
|
@ -36,10 +36,6 @@ export const deckStore = markRaw(new Storage('deck', {
|
|||
where: 'deviceAccount',
|
||||
default: true
|
||||
},
|
||||
mainColumnPlace: {
|
||||
where: 'deviceAccount',
|
||||
default: 'left' as 'left' | 'right'
|
||||
},
|
||||
navWindow: {
|
||||
where: 'deviceAccount',
|
||||
default: true
|
||||
|
|
@ -200,16 +196,6 @@ export function updateColumnWidget(id: Column['id'], widgetId: string, data: any
|
|||
deckStore.set('columns', columns);
|
||||
}
|
||||
|
||||
export function renameColumn(id: Column['id'], name: Column['name']) {
|
||||
const columns = copy(deckStore.state.columns);
|
||||
const columnIndex = deckStore.state.columns.findIndex(c => c.id === id);
|
||||
const column = copy(deckStore.state.columns[columnIndex]);
|
||||
if (column == null) return;
|
||||
column.name = name;
|
||||
columns[columnIndex] = column;
|
||||
deckStore.set('columns', columns);
|
||||
}
|
||||
|
||||
export function updateColumn(id: Column['id'], column: Partial<Column>) {
|
||||
const columns = copy(deckStore.state.columns);
|
||||
const columnIndex = deckStore.state.columns.findIndex(c => c.id === id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue