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 />
|
<Notes />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<StickyFooter {addNote} />
|
<StickyFooter {mode} {addNote} />
|
||||||
</Container>
|
</Container>
|
||||||
|
|
||||||
<style lang="scss">
|
<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 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>
|
||||||
|
|
|
||||||
|
|
@ -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">
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue