Fix deeplink not working if app is opened and invalid breadcrumbs (#457)

Co-authored-by: Neil <get.neilmolina@gmail.com>
This commit is contained in:
ABevier 2023-04-13 20:25:41 -04:00 committed by GitHub
parent e7099d86e4
commit 81982b9ac9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 8 deletions

View file

@ -181,10 +181,13 @@ app.on("open-url", (event, url) => {
setProtocolPath(rawPath);
if (mainWindow && mainWindow.isMinimized()) {
mainWindow.restore();
log.info("restored");
mainWindow?.webContents.send("sync-path");
if (mainWindow) {
if (mainWindow.isMinimized()) {
mainWindow.restore();
log.info("restored");
}
mainWindow.webContents.send("sync-path");
log.info("synced path", rawPath);
} else if (macWindowClosed) {
log.info("open new window");
createMainWindow();

View file

@ -57,10 +57,8 @@
<header class="text-gray mx-16 mb-4 border border-x-0 border-t-0 py-5">
<a class="hover:text-white hover:opacity-80" href="/">{$t("common.home")}</a>
>
{#if tab !== "all"}
<a class="hover:text-white hover:opacity-80" href="/?tab={tab || 'all'}"
>{$t(`tags.${tab}`) || "all"}</a
>
{#if tab && tab !== "all"}
<a class="hover:text-white hover:opacity-80" href="/?tab={tab || "all"}">{$t(`tags.${tab}`) || "all"}</a>
>
{/if}
<span class="text-white">{pkg?.full_name}</span>