view JSON log message

This commit is contained in:
SPRINX0\prochazka
2024-11-06 15:25:43 +01:00
parent bd169c316a
commit 193940fd63
8 changed files with 26 additions and 78 deletions

View File

@@ -9,10 +9,10 @@ import { showModal } from '../modals/modalTools';
import DatabaseLoginModal, { isDatabaseLoginVisible } from '../modals/DatabaseLoginModal.svelte';
import _ from 'lodash';
import uuidv1 from 'uuid/v1';
import { openWebLink } from './exportFileTools';
import { callServerPing } from './connectionsPinger';
import { batchDispatchCacheTriggers, dispatchCacheChange } from './cache';
import { isAdminPage, isOneOfPage } from './pageDefs';
import { openWebLink } from './simpleTools';
export const strmid = uuidv1();

View File

@@ -211,16 +211,6 @@ export async function saveFileToDisk(
}
}
export function openWebLink(href) {
const electron = getElectron();
if (electron) {
electron.send('open-link', href);
} else {
window.open(href, '_blank');
}
}
export async function downloadFromApi(route: string, donloadName: string) {
fetch(`${resolveApi()}/${route}`, {
method: 'GET',
@@ -240,4 +230,3 @@ export async function downloadFromApi(route: string, donloadName: string) {
});
});
}

View File

@@ -0,0 +1,11 @@
import getElectron from './getElectron';
export function openWebLink(href) {
const electron = getElectron();
if (electron) {
electron.send('open-link', href);
} else {
window.open(href, '_blank');
}
}