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:
@@ -477,14 +477,14 @@ const searchTerm = computed(() => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const filteredTables = computed(() => {
|
const filteredTables = computed(() => {
|
||||||
if (props.searchMethod === 'elements') {
|
if (props.searchMethod === 'elements') {
|
||||||
const searchTermLower = searchTerm.value.toLowerCase();
|
const searchTermLower = searchTerm.value.toLowerCase();
|
||||||
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(() => {
|
||||||
|
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user