Fix TagSpacer

This commit is contained in:
Henrik Giesel 2021-07-09 02:08:53 +02:00
parent 04b75859cc
commit 46e607a777
4 changed files with 5 additions and 12 deletions

View file

@ -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)}
>

View file

@ -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}

View file

@ -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>

View file

@ -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")