1
0
mirror of https://github.com/koloml/furbooru-tagging-assistant.git synced 2025-12-24 07:12:57 +00:00

Added visible close button

This commit is contained in:
2025-01-03 06:28:09 +04:00
parent 309dd15598
commit ba10768496
2 changed files with 20 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ export class FullscreenViewer extends BaseComponent {
#imageElement = document.createElement('img');
#spinnerElement = document.createElement('i');
#sizeSelectorElement = document.createElement('select');
#closeButtonElement = document.createElement('i');
/** @type {number|null} */
#touchId = null;
/** @type {number|null} */
@@ -29,9 +30,11 @@ export class FullscreenViewer extends BaseComponent {
this.container.append(
this.#spinnerElement,
this.#sizeSelectorElement,
this.#closeButtonElement,
);
this.#spinnerElement.classList.add('spinner', 'fa', 'fa-circle-notch', 'fa-spin');
this.#closeButtonElement.classList.add('close', 'fa', 'fa-xmark');
this.#sizeSelectorElement.classList.add('size-selector', 'input');
for (const [sizeKey, sizeName] of Object.entries(FullscreenViewer.#previewSizes)) {

View File

@@ -206,6 +206,23 @@
z-index: 1;
}
.close {
position: absolute;
top: 5px;
right: 5px;
z-index: 1;
padding: 5px;
background-color: colors.$text;
color: colors.$background;
font-size: 20px;
line-height: 20px;
width: 20px;
height: 20px;
text-align: center;
display: block;
cursor: pointer;
}
&.shown {
opacity: var(--opacity, 1);
pointer-events: initial;