|
|
@ -35,6 +35,9 @@ |
|
|
|
import Message from "./components/Message.svelte"; |
|
|
|
import Message from "./components/Message.svelte"; |
|
|
|
|
|
|
|
|
|
|
|
import Signature from "./popups/Signature.svelte"; |
|
|
|
import Signature from "./popups/Signature.svelte"; |
|
|
|
|
|
|
|
import { |
|
|
|
|
|
|
|
get, |
|
|
|
|
|
|
|
} from "svelte/store"; |
|
|
|
|
|
|
|
|
|
|
|
// @ts-ignore |
|
|
|
// @ts-ignore |
|
|
|
import { t } from "svelte-i18n"; |
|
|
|
import { t } from "svelte-i18n"; |
|
|
@ -47,7 +50,7 @@ |
|
|
|
in_private_store, show_doc_popup, cur_doc_popup, open_doc_popup } from "../tab"; |
|
|
|
in_private_store, show_doc_popup, cur_doc_popup, open_doc_popup } from "../tab"; |
|
|
|
import { |
|
|
|
import { |
|
|
|
active_session, redirect_after_login, toasts, check_has_camera, toast_error, |
|
|
|
active_session, redirect_after_login, toasts, check_has_camera, toast_error, |
|
|
|
reset_toasts, |
|
|
|
reset_toasts, redirect_if_wallet_is, active_wallet, |
|
|
|
display_error, openModalCreate |
|
|
|
display_error, openModalCreate |
|
|
|
} from "../store"; |
|
|
|
} from "../store"; |
|
|
|
import ZeraIcon from "./icons/ZeraIcon.svelte"; |
|
|
|
import ZeraIcon from "./icons/ZeraIcon.svelte"; |
|
|
@ -368,6 +371,7 @@ |
|
|
|
let shareMenu; |
|
|
|
let shareMenu; |
|
|
|
let toolsMenu; |
|
|
|
let toolsMenu; |
|
|
|
let unsub; |
|
|
|
let unsub; |
|
|
|
|
|
|
|
let unsub2; |
|
|
|
async function scrollToTop() { |
|
|
|
async function scrollToTop() { |
|
|
|
await tick(); |
|
|
|
await tick(); |
|
|
|
if (top) top.scrollIntoView(); |
|
|
|
if (top) top.scrollIntoView(); |
|
|
@ -398,19 +402,22 @@ |
|
|
|
reset_toasts(); |
|
|
|
reset_toasts(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
unsub2 = active_session.subscribe((as) => { |
|
|
|
|
|
|
|
if(!as) { |
|
|
|
|
|
|
|
$redirect_after_login = $location; |
|
|
|
|
|
|
|
$redirect_if_wallet_is = get(active_wallet)?.id |
|
|
|
|
|
|
|
push("#/"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
onDestroy(() => { |
|
|
|
onDestroy(() => { |
|
|
|
if (unsub) unsub(); |
|
|
|
if (unsub) unsub(); |
|
|
|
|
|
|
|
if (unsub2) unsub2(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
active_session.subscribe((as) => { if(!as) { |
|
|
|
|
|
|
|
//console.log($location); |
|
|
|
|
|
|
|
if ($location!="/user") { |
|
|
|
|
|
|
|
$redirect_after_login = $location; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
push("#/"); |
|
|
|
|
|
|
|
} }) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$: activeUrl = "#" + $location; |
|
|
|
$: activeUrl = "#" + $location; |
|
|
|
|
|
|
|
|
|
|
|