diff --git a/Gulpfile.js b/Gulpfile.js index 9895a1d2fe..836966c75d 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -11,7 +11,6 @@ import fs from "fs"; import gulp from "gulp"; import path from "path"; import livereload from "gulp-livereload"; - import stylus from "gulp-stylus"; import sourcemaps from "gulp-sourcemaps"; import rename from "gulp-rename"; diff --git a/src/components/Markdown/Markdown.tsx b/src/components/Markdown/Markdown.tsx index d741ebaf9c..7cb7c1f4d4 100644 --- a/src/components/Markdown/Markdown.tsx +++ b/src/components/Markdown/Markdown.tsx @@ -16,7 +16,7 @@ */ import * as React from "react"; -import markdownit from "markdown-it"; +import markdownit from "markdown-it"; // cspell:disable-line import sanitizeHtml from "sanitize-html"; //import moment from "moment"; import { profanity_filter } from "@/lib/profanity_filter"; @@ -29,6 +29,7 @@ interface MarkdownProps { interface MarkdownState {} +// cspell:disable-next-line const md = markdownit({ html: true, linkify: true, diff --git a/src/components/PaginatedTable/PaginatedTable.styl b/src/components/PaginatedTable/PaginatedTable.styl index b1af637ae3..3450936d05 100644 --- a/src/components/PaginatedTable/PaginatedTable.styl +++ b/src/components/PaginatedTable/PaginatedTable.styl @@ -104,15 +104,18 @@ margin-top: 1rem; .left { - display: inline-block; + display: flex; flex:1; + align-items: center; input { //font-size: 0.7em; padding: 0; width: 2rem; - text-align: left; + text-align: right; border: 0; - margin-left: 0.5rem; + margin-left: 0.25rem; + margin-right: 0.5rem; + outline: none; //border-bottom: 1px solid; //background-color: transparent; //themed color fg @@ -127,7 +130,7 @@ //font-size: 0.7em; min-width: 0.8rem; text-align: right; - margin-right: 0.5rem; + margin-right: 1rem; } .fa { diff --git a/src/ogs.styl b/src/ogs.styl index fa16b6b4ac..cded00f843 100644 --- a/src/ogs.styl +++ b/src/ogs.styl @@ -590,4 +590,4 @@ nowrap() .react-tabs__tab-panel--selected { display: block; padding: 10px; -} +} \ No newline at end of file diff --git a/src/views/User/GameHistoryTable.tsx b/src/views/User/GameHistoryTable.tsx index 0e1dc412ab..025a64f4a3 100644 --- a/src/views/User/GameHistoryTable.tsx +++ b/src/views/User/GameHistoryTable.tsx @@ -102,9 +102,27 @@ export function GameHistoryTable(props: GameHistoryProps) { function handleRowClick( row: GroomedGame, ev: React.MouseEvent | React.TouchEvent | React.PointerEvent, + rows: GroomedGame[], ) { + if (row.annulled) { + return; + } + if (selectModeActive) { - toggleQueued(row); + if (ev.shiftKey) { + if (annulQueue.at(-1)) { + window.getSelection()?.removeAllRanges(); + const indexes = [ + rows.findIndex((r) => r.id === annulQueue.at(-1).id), + rows.findIndex((r) => r.id === row.id), + ]; + const minIndex = Math.min(...indexes); + const maxIndex = Math.max(...indexes); + setAnnulQueue(rows.slice(minIndex, maxIndex + 1).filter((r) => !r.annulled)); + } + } else { + toggleQueued(row); + } } else { openUrlIfALinkWasNotClicked(ev, row.href); } @@ -336,7 +354,7 @@ export function GameHistoryTable(props: GameHistoryProps) { groom={game_history_groomer} pageSizeOptions={[10, 15, 25, 50]} onRowClick={handleRowClick} - annulQueue={annulQueue} + highlightedRows={annulQueue} columns={[ { header: _("User"),