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

fix: saved connections lost opening a second window after first app run

This commit is contained in:
2025-01-10 18:20:36 +01:00
parent d3ae45ec94
commit 4a2b5926f4
2 changed files with 11 additions and 10 deletions

View File

@@ -482,9 +482,9 @@ const filteredTables = computed(() => {
return props.database.tables.filter(table => return props.database.tables.filter(table =>
table.name.toLowerCase().includes(searchTermLower) && table.type === 'table' table.name.toLowerCase().includes(searchTermLower) && table.type === 'table'
); );
} else {
return props.database.tables;
} }
else
return props.database.tables;
}); });
const filteredViews = computed(() => { const filteredViews = computed(() => {

View File

@@ -25,12 +25,13 @@ export interface SidebarElement {
export interface CustomIcon {base64: string; uid: string} export interface CustomIcon {base64: string; uid: string}
if (!key) { // If no key in local storace if (!key) { // If no key in local storage
const storedKey = ipcRenderer.sendSync('get-key');// Ask for key stored on disk const storedKey = ipcRenderer.sendSync('get-key');// Ask for key stored on disk
if (!storedKey) { // Of nop stored key on disk if (!storedKey) { // If not stored key on disk
const newKey = crypto.randomBytes(16).toString('hex'); const newKey = crypto.randomBytes(16).toString('hex');
localStorage.setItem('key', newKey); localStorage.setItem('key', newKey);
ipcRenderer.send('set-key', newKey);
key = newKey; key = newKey;
} }
else { else {