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>
|
<OnlyEditable let:disabled>
|
||||||
<IconButton
|
<IconButton
|
||||||
tooltip={`${tr.editingClozeDeletion()} (${shortcutLabel})`}
|
tooltip={`${tr.editingClozeDeletion()} (${shortcutLabel})`}
|
||||||
disabled={disabled}
|
{disabled}
|
||||||
on:click={onCloze}
|
on:click={onCloze}
|
||||||
on:mount={withButton(createShortcut)}
|
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>
|
<StickyBottom class="d-flex" bind:height>
|
||||||
{#if !wrap}
|
{#if !wrap}
|
||||||
<TagOptionsBadge
|
<TagOptionsBadge
|
||||||
--button-size={`${size}rem`}
|
--buttons-size={`${size}rem`}
|
||||||
showSelectionsOptions={tags.some((tag) => tag.selected)}
|
showSelectionsOptions={tags.some((tag) => tag.selected)}
|
||||||
bind:badgeHeight
|
bind:badgeHeight
|
||||||
on:tagselectall={selectAllTags}
|
on:tagselectall={selectAllTags}
|
||||||
|
@ -389,7 +389,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<ButtonToolbar
|
<ButtonToolbar
|
||||||
class="align-items-center mx-1"
|
class="d-flex align-items-center w-100 px-1"
|
||||||
{size}
|
{size}
|
||||||
{wrap}
|
{wrap}
|
||||||
on:focusout={deselectIfLeave}
|
on:focusout={deselectIfLeave}
|
||||||
|
|
|
@ -89,10 +89,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
<ButtonGroupItem>
|
<ButtonGroupItem>
|
||||||
<WithDropdown let:createDropdown>
|
<WithDropdown let:createDropdown>
|
||||||
<OnlyEditable let:disabled>
|
<OnlyEditable let:disabled>
|
||||||
<IconButton
|
<IconButton {disabled} on:mount={withButton(createDropdown)}>
|
||||||
{disabled}
|
|
||||||
on:mount={withButton(createDropdown)}
|
|
||||||
>
|
|
||||||
{@html functionIcon}
|
{@html functionIcon}
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</OnlyEditable>
|
</OnlyEditable>
|
||||||
|
|
|
@ -6,14 +6,11 @@
|
||||||
@typescript-eslint/no-explicit-any: "off",
|
@typescript-eslint/no-explicit-any: "off",
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { disabledKey, nightModeKey } from "components/context-keys";
|
import { nightModeKey } from "components/context-keys";
|
||||||
import { writable } from "svelte/store";
|
|
||||||
|
|
||||||
import TagEditor from "./TagEditor.svelte";
|
import TagEditor from "./TagEditor.svelte";
|
||||||
import "./bootstrap.css";
|
import "./bootstrap.css";
|
||||||
|
|
||||||
const disabled = writable(false);
|
|
||||||
|
|
||||||
export function initTagEditor(i18n: Promise<void>): Promise<TagEditor> {
|
export function initTagEditor(i18n: Promise<void>): Promise<TagEditor> {
|
||||||
let tagEditorResolve: (value: TagEditor) => void;
|
let tagEditorResolve: (value: TagEditor) => void;
|
||||||
const tagEditorPromise = new Promise<TagEditor>((resolve) => {
|
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 anchor = document.getElementById("tag-editor-anchor")!;
|
||||||
|
|
||||||
const context = new Map();
|
const context = new Map();
|
||||||
context.set(disabledKey, disabled);
|
|
||||||
context.set(
|
context.set(
|
||||||
nightModeKey,
|
nightModeKey,
|
||||||
document.documentElement.classList.contains("night-mode")
|
document.documentElement.classList.contains("night-mode")
|
||||||
|
|
Loading…
Reference in a new issue