-
Notifications
You must be signed in to change notification settings - Fork 62
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
fa9b0c0
commit de028bc
Showing
8 changed files
with
115 additions
and
94 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { useNavigate } from "@solidjs/router"; | ||
import { Users } from "lucide-solid"; | ||
import { createSignal } from "solid-js"; | ||
|
||
import { ButtonCard, NiceP, SimpleDialog } from "~/components/layout"; | ||
import { useI18n } from "~/i18n/context"; | ||
import { useMegaStore } from "~/state/megaStore"; | ||
|
||
export function FederationPopup() { | ||
const [state, actions, _sw] = useMegaStore(); | ||
const [ | ||
showFederationExpirationWarning, | ||
setShowFederationExpirationWarning | ||
] = createSignal(!state.expiration_warning_seen); | ||
|
||
const i18n = useI18n(); | ||
const navigate = useNavigate(); | ||
|
||
return ( | ||
<SimpleDialog | ||
title={i18n.t("activity.federation_message")} | ||
open={showFederationExpirationWarning()} | ||
setOpen={(open: boolean) => { | ||
if (!open) { | ||
setShowFederationExpirationWarning(false); | ||
actions.clearExpirationWarning(); | ||
} | ||
}} | ||
> | ||
<NiceP>{state.expiration_warning?.expiresMessage}</NiceP> | ||
<ButtonCard | ||
onClick={() => { | ||
actions.clearExpirationWarning(); | ||
setShowFederationExpirationWarning(false); | ||
navigate("/settings/federations"); | ||
}} | ||
> | ||
<div class="flex items-center gap-2"> | ||
<Users class="inline-block text-m-red" /> | ||
<NiceP>{i18n.t("profile.manage_federation")}</NiceP> | ||
</div> | ||
</ButtonCard> | ||
</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
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