mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 22:12:21 -04:00
Fix TagSpacer
This commit is contained in:
parent
04b75859cc
commit
46e607a777
4 changed files with 5 additions and 12 deletions
|
@ -47,7 +47,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
<OnlyEditable let:disabled>
|
||||
<IconButton
|
||||
tooltip={`${tr.editingClozeDeletion()} (${shortcutLabel})`}
|
||||
disabled={disabled}
|
||||
{disabled}
|
||||
on:click={onCloze}
|
||||
on:mount={withButton(createShortcut)}
|
||||
>
|
||||
|
|
|
@ -378,7 +378,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
<StickyBottom class="d-flex" bind:height>
|
||||
{#if !wrap}
|
||||
<TagOptionsBadge
|
||||
--button-size={`${size}rem`}
|
||||
--buttons-size={`${size}rem`}
|
||||
showSelectionsOptions={tags.some((tag) => tag.selected)}
|
||||
bind:badgeHeight
|
||||
on:tagselectall={selectAllTags}
|
||||
|
@ -389,7 +389,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
{/if}
|
||||
|
||||
<ButtonToolbar
|
||||
class="align-items-center mx-1"
|
||||
class="d-flex align-items-center w-100 px-1"
|
||||
{size}
|
||||
{wrap}
|
||||
on:focusout={deselectIfLeave}
|
||||
|
|
|
@ -89,10 +89,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
|||
<ButtonGroupItem>
|
||||
<WithDropdown let:createDropdown>
|
||||
<OnlyEditable let:disabled>
|
||||
<IconButton
|
||||
{disabled}
|
||||
on:mount={withButton(createDropdown)}
|
||||
>
|
||||
<IconButton {disabled} on:mount={withButton(createDropdown)}>
|
||||
{@html functionIcon}
|
||||
</IconButton>
|
||||
</OnlyEditable>
|
||||
|
|
|
@ -6,14 +6,11 @@
|
|||
@typescript-eslint/no-explicit-any: "off",
|
||||
*/
|
||||
|
||||
import { disabledKey, nightModeKey } from "components/context-keys";
|
||||
import { writable } from "svelte/store";
|
||||
import { nightModeKey } from "components/context-keys";
|
||||
|
||||
import TagEditor from "./TagEditor.svelte";
|
||||
import "./bootstrap.css";
|
||||
|
||||
const disabled = writable(false);
|
||||
|
||||
export function initTagEditor(i18n: Promise<void>): Promise<TagEditor> {
|
||||
let tagEditorResolve: (value: TagEditor) => void;
|
||||
const tagEditorPromise = new Promise<TagEditor>((resolve) => {
|
||||
|
@ -26,7 +23,6 @@ export function initTagEditor(i18n: Promise<void>): Promise<TagEditor> {
|
|||
const anchor = document.getElementById("tag-editor-anchor")!;
|
||||
|
||||
const context = new Map();
|
||||
context.set(disabledKey, disabled);
|
||||
context.set(
|
||||
nightModeKey,
|
||||
document.documentElement.classList.contains("night-mode")
|
||||
|
|
Loading…
Reference in a new issue