Fix "Add" button showing when editing I/O note; hide toast

This commit is contained in:
Damien Elmes 2023-09-19 14:19:51 +10:00
parent d2a0e7825a
commit 91538518b3
3 changed files with 5 additions and 3 deletions

View file

@ -49,7 +49,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<Notes />
</div>
<StickyFooter {addNote} />
<StickyFooter {mode} {addNote} />
</Container>
<style lang="scss">

View file

@ -7,7 +7,9 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
import ButtonGroup from "../components/ButtonGroup.svelte";
import LabelButton from "../components/LabelButton.svelte";
import type { IOMode } from "./lib";
export let mode: IOMode;
export let addNote: () => void;
</script>
@ -20,7 +22,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
on:click={addNote}
class=" bottom-btn"
>
{tr.actionsAdd()}
{mode.kind === "add" ? tr.actionsAdd() : tr.importingUpdate()}
</LabelButton>
</ButtonGroup>
</div>

View file

@ -15,7 +15,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
</script>
{#if showToast}
<div class="toast-container">
<div class="toast-container desktop-only">
<div class="toast {type === 'success' ? 'success' : 'error'}">
{message}
<IconButton iconSize={96} on:click={closeToast} class="toast-icon">