mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
Fix "Add" button showing when editing I/O note; hide toast
This commit is contained in:
parent
d2a0e7825a
commit
91538518b3
3 changed files with 5 additions and 3 deletions
|
|
@ -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">
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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">
|
||||
|
|
|
|||
Loading…
Reference in a new issue