fix savebar still persisting + fix stopEditing translation key

Co-authored-by: Jip Frijlink <JipFr@users.noreply.github.com>
This commit is contained in:
mrjvs 2023-11-29 17:42:51 +01:00
parent d7298a9027
commit bc22c323a0
2 changed files with 7 additions and 6 deletions

View File

@ -26,7 +26,7 @@ export function EditButton(props: EditButtonProps) {
<span ref={parent}> <span ref={parent}>
{props.editing ? ( {props.editing ? (
<span className="mx-4 whitespace-nowrap"> <span className="mx-4 whitespace-nowrap">
{t("media.stopEditing")} {t("home.mediaList.stopEditing")}
</span> </span>
) : ( ) : (
<Icon icon={Icons.EDIT} /> <Icon icon={Icons.EDIT} />

View File

@ -15,6 +15,7 @@ import { Button } from "@/components/buttons/Button";
import { WideContainer } from "@/components/layout/WideContainer"; import { WideContainer } from "@/components/layout/WideContainer";
import { UserIcons } from "@/components/UserIcon"; import { UserIcons } from "@/components/UserIcon";
import { Heading1 } from "@/components/utils/Text"; import { Heading1 } from "@/components/utils/Text";
import { Transition } from "@/components/utils/Transition";
import { useAuth } from "@/hooks/auth/useAuth"; import { useAuth } from "@/hooks/auth/useAuth";
import { useBackendUrl } from "@/hooks/auth/useBackendUrl"; import { useBackendUrl } from "@/hooks/auth/useBackendUrl";
import { useIsMobile } from "@/hooks/useIsMobile"; import { useIsMobile } from "@/hooks/useIsMobile";
@ -241,10 +242,10 @@ export function SettingsPage() {
/> />
</div> </div>
</SettingsLayout> </SettingsLayout>
<div <Transition
className={`bg-settings-saveBar-background border-t border-settings-card-border/50 py-4 transition-opacity w-full fixed bottom-0 flex justify-between flex-col md:flex-row px-8 items-start md:items-center gap-3 ${ animation="fade"
state.changed ? "opacity-100" : "opacity-0" show={state.changed}
}`} className="bg-settings-saveBar-background border-t border-settings-card-border/50 py-4 transition-opacity w-full fixed bottom-0 flex justify-between flex-col md:flex-row px-8 items-start md:items-center gap-3"
> >
<p className="text-type-danger">{t("settings.unsaved")}</p> <p className="text-type-danger">{t("settings.unsaved")}</p>
<div className="space-x-3 w-full md:w-auto flex"> <div className="space-x-3 w-full md:w-auto flex">
@ -263,7 +264,7 @@ export function SettingsPage() {
{t("settings.save")} {t("settings.save")}
</Button> </Button>
</div> </div>
</div> </Transition>
</SubPageLayout> </SubPageLayout>
); );
} }