1
1
mirror of https://github.com/Fabio286/antares.git synced 2025-06-05 21:59:22 +02:00

feat: accent color based on folder color, closes #762

This commit is contained in:
2024-04-30 18:07:08 +02:00
parent 33bbc0e7e6
commit 058fc2fc0b
17 changed files with 204 additions and 36 deletions

View File

@@ -530,8 +530,17 @@ export const useWorkspacesStore = defineStore('workspaces', {
return {
...workspace,
tabs: workspace.tabs.map(tab => {
if (tab.uid === tUid)
return { ...tab, type, schema, content, elementName, elementType, filePath };
if (tab.uid === tUid) {
return {
...tab,
type,
schema,
content,
elementName,
elementType,
filePath
};
}
return tab;
})
@@ -603,17 +612,47 @@ export const useWorkspacesStore = defineStore('workspaces', {
});
tabUid = uidGen('T');
this._addTab({ uid, tab: tabUid, content, type, autorun, database: workspaceTabs.database, schema, elementName, elementType, filePath });
this._addTab({
uid,
tab: tabUid,
content,
type,
autorun,
database: workspaceTabs.database,
schema,
elementName,
elementType,
filePath
});
}
else {
this._replaceTab({ uid, tab: tab.uid, type, schema, elementName, elementType, filePath });
this._replaceTab({
uid,
tab: tab.uid,
type,
schema,
elementName,
elementType,
filePath
});
tabUid = tab.uid;
}
}
}
else {
tabUid = uidGen('T');
this._addTab({ uid, tab: tabUid, content, type, autorun, database: workspaceTabs.database, schema, elementName, elementType, filePath });
this._addTab({
uid,
tab: tabUid,
content,
type,
autorun,
database: workspaceTabs.database,
schema,
elementName,
elementType,
filePath
});
}
}
}