-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6fbd9f8
commit 1732270
Showing
7 changed files
with
62 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { createSignal } from "solid-js"; | ||
|
||
import { ExternalLink, NiceP, SimpleDialog } from "~/components/layout"; | ||
import { useI18n } from "~/i18n/context"; | ||
import { useMegaStore } from "~/state/megaStore"; | ||
|
||
export function ShutdownPopup() { | ||
const [state, actions, _sw] = useMegaStore(); | ||
const selfHosted = | ||
state.settings?.selfhosted && state.settings?.selfhosted === "true"; | ||
const [showShutdownWarning, setShowShutdownWarning] = createSignal( | ||
!selfHosted && !state.shutdown_warning_seen | ||
); | ||
|
||
const i18n = useI18n(); | ||
|
||
return ( | ||
<SimpleDialog | ||
title={`${i18n.t("home.shutdown.title")}`} | ||
open={showShutdownWarning()} | ||
setOpen={(open: boolean) => { | ||
if (!open) { | ||
setShowShutdownWarning(false); | ||
actions.clearShutdownWarning(); | ||
} | ||
}} | ||
> | ||
<NiceP>{i18n.t("home.shutdown.message")}</NiceP> | ||
<NiceP> | ||
<ExternalLink href="https://blog.mutinywallet.com/mutiny-timeline/"> | ||
Learn more | ||
</ExternalLink> | ||
</NiceP> | ||
</SimpleDialog> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters