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

View file

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