Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ <h1 id="frq-score">4</h1>
<dialog data-modal-page="history" data-page-title="History">
<h2 id="history-date"></h2>
<div class="col" id="history-feed"></div>
<button data-reset="cache">Refresh Data</button>
<div id="history-navigation" class="row center">
<button class="icon" id="history-first">
<i class="bi bi-chevron-double-left"></i>
Expand Down
7 changes: 4 additions & 3 deletions src/clicker/clicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import storage from "/src/modules/storage.js";
import * as auth from "/src/modules/auth.js";
import * as themes from "/src/themes/themes.js";

import { autocomplete, insertFromIndex } from "/src/symbols/symbols.js";
import { autocomplete } from "/src/symbols/symbols.js";
import { unixToTimeString } from "/src/modules/time.js";
import { getExtendedPeriod } from "/src/periods/periods";
import { convertLatexToAsciiMath, convertLatexToMarkup, renderMathInElement } from "mathlive";
Expand Down Expand Up @@ -1033,14 +1033,15 @@ try {
newSetInput.setAttribute('type', 'text');
newSetInput.setAttribute('autocomplete', 'off');
newSetInput.setAttribute('data-set-input', Number(highestDataElement.getAttribute('data-set-input')) + 1);
const buttonGrid = document.querySelectorAll('[data-answer-mode="set"] .button-grid')[1];
const buttonGrid = document.querySelector('[data-answer-mode="set"] .button-grid:has([id="set-input"])');
if (!buttonGrid) return;
const insertBeforePosition = buttonGrid.children.length - 2;
if (insertBeforePosition > 0) {
buttonGrid.insertBefore(newSetInput, buttonGrid.children[insertBeforePosition]);
} else {
buttonGrid.appendChild(newSetInput);
}
document.querySelectorAll('[data-answer-mode="set"] .button-grid')[1].style.flexWrap = (setInputs.length > 9) ? 'wrap' : 'nowrap';
buttonGrid.style.flexWrap = (setInputs.length > 9) ? 'wrap' : 'nowrap';
newSetInput.focus();
document.querySelector("[data-remove-set-input]").disabled = false;
}
Expand Down
10 changes: 10 additions & 0 deletions src/design.css
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,16 @@ button.icon {
border-radius: 50%;
}

button.fill {
background: var(--accent-color) !important;
color: var(--accent-text-color) !important;
}

button.fill:hover {
background: var(--text-color) !important;
color: var(--surface-color) !important;
}

button:disabled {
opacity: 0.75;
pointer-events: none;
Expand Down
4 changes: 4 additions & 0 deletions src/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ div.spacer {
display: none;
}

#history-navigation {
margin-top: 10px;
}

#history-feed {
overflow-y: auto;
height: 400px;
Expand Down
4 changes: 4 additions & 0 deletions src/modules/ui.css
Original file line number Diff line number Diff line change
Expand Up @@ -635,3 +635,7 @@ body:has(.topbar) {
padding: 7.5px 17.5px 2.5px 17.5px;
border-radius: 50vh 50vh 0 0;
}

[data-manual-reset-cache] {
margin-top: 10px;
}
2 changes: 1 addition & 1 deletion src/themes/themes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export function resetTheme() {
disableTransitions();
document.body.removeAttribute("data-theme");
removeCustomTheme();
document.getElementById("theme-preview").removeAttribute("data-theme");
document.getElementById("theme-preview")?.removeAttribute("data-theme");
enableTransitions();
storage.set("theme", "default");
storage.delete("custom-theme");
Expand Down