From fef2404357d4859cfd97e40d1e9e69cfd7f82ea3 Mon Sep 17 00:00:00 2001 From: Athou Date: Tue, 17 Jun 2025 18:31:30 +0200 Subject: [PATCH] update biome to v2 --- commafeed-client/biome.json | 4 +- commafeed-client/package-lock.json | 73 +++++++++---------- commafeed-client/package.json | 2 +- commafeed-client/src/App.tsx | 28 ++++--- commafeed-client/src/app/constants.ts | 6 +- commafeed-client/src/app/entries/slice.ts | 2 +- commafeed-client/src/app/entries/thunks.ts | 2 +- commafeed-client/src/app/redirect/slice.ts | 2 +- commafeed-client/src/app/server/slice.ts | 2 +- commafeed-client/src/app/tree/slice.ts | 2 +- commafeed-client/src/app/user/slice.ts | 2 +- .../src/components/ActionButton.tsx | 2 +- .../src/components/content/Content.tsx | 4 +- .../src/components/content/Enclosure.tsx | 7 +- .../src/components/content/FeedEntries.tsx | 1 - .../src/components/content/Media.tsx | 2 +- .../content/header/FeedEntryCompactHeader.tsx | 2 +- .../content/header/FeedEntryHeader.tsx | 2 +- commafeed-client/src/i18n.ts | 2 +- .../src/pages/admin/AdminUsersPage.tsx | 2 +- commafeed-client/src/pages/app/AboutPage.tsx | 2 +- .../src/pages/app/CategoryDetailsPage.tsx | 2 +- .../src/pages/app/FeedDetailsPage.tsx | 2 +- commafeed-client/src/pages/app/Layout.tsx | 8 +- 24 files changed, 77 insertions(+), 86 deletions(-) diff --git a/commafeed-client/biome.json b/commafeed-client/biome.json index c3ce2b00..cb934fa9 100644 --- a/commafeed-client/biome.json +++ b/commafeed-client/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "$schema": "https://biomejs.dev/schemas/2.0.0/schema.json", "formatter": { "indentStyle": "space", "indentWidth": 4, @@ -22,6 +22,6 @@ } }, "files": { - "ignore": ["dist", "node_modules", "target", "target-ide"] + "includes": ["**", "!**/dist", "!**/node_modules", "!**/target", "!**/target-ide"] } } diff --git a/commafeed-client/package-lock.json b/commafeed-client/package-lock.json index 2c408fb6..70b8aaa5 100644 --- a/commafeed-client/package-lock.json +++ b/commafeed-client/package-lock.json @@ -46,7 +46,7 @@ "websocket-heartbeat-js": "^1.1.3" }, "devDependencies": { - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.0.0", "@lingui/babel-plugin-lingui-macro": "^5.3.2", "@lingui/cli": "^5.3.2", "@lingui/vite-plugin": "^5.3.2", @@ -393,11 +393,10 @@ } }, "node_modules/@biomejs/biome": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-1.9.4.tgz", - "integrity": "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/biome/-/biome-2.0.0.tgz", + "integrity": "sha512-BlUoXEOI/UQTDEj/pVfnkMo8SrZw3oOWBDrXYFT43V7HTkIUDkBRY53IC5Jx1QkZbaB+0ai1wJIfYwp9+qaJTQ==", "dev": true, - "hasInstallScript": true, "license": "MIT OR Apache-2.0", "bin": { "biome": "bin/biome" @@ -410,20 +409,20 @@ "url": "https://opencollective.com/biome" }, "optionalDependencies": { - "@biomejs/cli-darwin-arm64": "1.9.4", - "@biomejs/cli-darwin-x64": "1.9.4", - "@biomejs/cli-linux-arm64": "1.9.4", - "@biomejs/cli-linux-arm64-musl": "1.9.4", - "@biomejs/cli-linux-x64": "1.9.4", - "@biomejs/cli-linux-x64-musl": "1.9.4", - "@biomejs/cli-win32-arm64": "1.9.4", - "@biomejs/cli-win32-x64": "1.9.4" + "@biomejs/cli-darwin-arm64": "2.0.0", + "@biomejs/cli-darwin-x64": "2.0.0", + "@biomejs/cli-linux-arm64": "2.0.0", + "@biomejs/cli-linux-arm64-musl": "2.0.0", + "@biomejs/cli-linux-x64": "2.0.0", + "@biomejs/cli-linux-x64-musl": "2.0.0", + "@biomejs/cli-win32-arm64": "2.0.0", + "@biomejs/cli-win32-x64": "2.0.0" } }, "node_modules/@biomejs/cli-darwin-arm64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-1.9.4.tgz", - "integrity": "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-arm64/-/cli-darwin-arm64-2.0.0.tgz", + "integrity": "sha512-QvqWYtFFhhxdf8jMAdJzXW+Frc7X8XsnHQLY+TBM1fnT1TfeV/v9vsFI5L2J7GH6qN1+QEEJ19jHibCY2Ypplw==", "cpu": [ "arm64" ], @@ -438,9 +437,9 @@ } }, "node_modules/@biomejs/cli-darwin-x64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-1.9.4.tgz", - "integrity": "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-darwin-x64/-/cli-darwin-x64-2.0.0.tgz", + "integrity": "sha512-5JFhls1EfmuIH4QGFPlNpxJQFC6ic3X1ltcoLN+eSRRIPr6H/lUS1ttuD0Fj7rPgPhZqopK/jfH8UVj/1hIsQw==", "cpu": [ "x64" ], @@ -455,9 +454,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-1.9.4.tgz", - "integrity": "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64/-/cli-linux-arm64-2.0.0.tgz", + "integrity": "sha512-BAH4QVi06TzAbVchXdJPsL0Z/P87jOfes15rI+p3EX9/EGTfIjaQ9lBVlHunxcmoptaA5y1Hdb9UYojIhmnjIw==", "cpu": [ "arm64" ], @@ -472,9 +471,9 @@ } }, "node_modules/@biomejs/cli-linux-arm64-musl": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.9.4.tgz", - "integrity": "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-arm64-musl/-/cli-linux-arm64-musl-2.0.0.tgz", + "integrity": "sha512-Bxsz8ki8+b3PytMnS5SgrGV+mbAWwIxI3ydChb/d1rURlJTMdxTTq5LTebUnlsUWAX6OvJuFeiVq9Gjn1YbCyA==", "cpu": [ "arm64" ], @@ -489,9 +488,9 @@ } }, "node_modules/@biomejs/cli-linux-x64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-1.9.4.tgz", - "integrity": "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64/-/cli-linux-x64-2.0.0.tgz", + "integrity": "sha512-09PcOGYTtkopWRm6mZ/B6Mr6UHdkniUgIG/jLBv+2J8Z61ezRE+xQmpi3yNgUrFIAU4lPA9atg7mhvE/5Bo7Wg==", "cpu": [ "x64" ], @@ -506,9 +505,9 @@ } }, "node_modules/@biomejs/cli-linux-x64-musl": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-1.9.4.tgz", - "integrity": "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-linux-x64-musl/-/cli-linux-x64-musl-2.0.0.tgz", + "integrity": "sha512-tiQ0ABxMJb9I6GlfNp0ulrTiQSFacJRJO8245FFwE3ty3bfsfxlU/miblzDIi+qNrgGsLq5wIZcVYGp4c+HXZA==", "cpu": [ "x64" ], @@ -523,9 +522,9 @@ } }, "node_modules/@biomejs/cli-win32-arm64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-1.9.4.tgz", - "integrity": "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-arm64/-/cli-win32-arm64-2.0.0.tgz", + "integrity": "sha512-vrTtuGu91xNTEQ5ZcMJBZuDlqr32DWU1r14UfePIGndF//s2WUAmer4FmgoPgruo76rprk37e8S2A2c0psXdxw==", "cpu": [ "arm64" ], @@ -540,9 +539,9 @@ } }, "node_modules/@biomejs/cli-win32-x64": { - "version": "1.9.4", - "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-1.9.4.tgz", - "integrity": "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@biomejs/cli-win32-x64/-/cli-win32-x64-2.0.0.tgz", + "integrity": "sha512-2USVQ0hklNsph/KIR72ZdeptyXNnQ3JdzPn3NbjI4Sna34CnxeiYAaZcZzXPDl5PYNFBivV4xmvT3Z3rTmyDBg==", "cpu": [ "x64" ], diff --git a/commafeed-client/package.json b/commafeed-client/package.json index 2e374858..29a28cf5 100644 --- a/commafeed-client/package.json +++ b/commafeed-client/package.json @@ -53,7 +53,7 @@ "websocket-heartbeat-js": "^1.1.3" }, "devDependencies": { - "@biomejs/biome": "^1.9.4", + "@biomejs/biome": "^2.0.0", "@lingui/babel-plugin-lingui-macro": "^5.3.2", "@lingui/cli": "^5.3.2", "@lingui/vite-plugin": "^5.3.2", diff --git a/commafeed-client/src/App.tsx b/commafeed-client/src/App.tsx index f432917d..347c768d 100644 --- a/commafeed-client/src/App.tsx +++ b/commafeed-client/src/App.tsx @@ -15,7 +15,6 @@ import { Tree } from "components/sidebar/Tree" import { useAppLoading } from "hooks/useAppLoading" import { useBrowserExtension } from "hooks/useBrowserExtension" import { useI18n } from "i18n" -import { WelcomePage } from "pages/WelcomePage" import { AdminUsersPage } from "pages/admin/AdminUsersPage" import { MetricsPage } from "pages/admin/MetricsPage" import { AboutPage } from "pages/app/AboutPage" @@ -30,6 +29,7 @@ import { TagDetailsPage } from "pages/app/TagDetailsPage" import { LoginPage } from "pages/auth/LoginPage" import { PasswordRecoveryPage } from "pages/auth/PasswordRecoveryPage" import { RegistrationPage } from "pages/auth/RegistrationPage" +import { WelcomePage } from "pages/WelcomePage" import React, { useEffect, useState } from "react" import { isSafari } from "react-device-detect" import ReactGA from "react-ga4" @@ -219,25 +219,23 @@ export function App() { return ( - <> - - - - - + + + + + - {/* disable pull-to-refresh as it messes with vertical scrolling + {/* disable pull-to-refresh as it messes with vertical scrolling safari behaves weirdly when overscroll-behavior is set to none so we disable it only for other browsers https://github.com/Athou/commafeed/issues/1168 */} - {!isSafari && } + {!isSafari && } - - - - - - + + + + + ) } diff --git a/commafeed-client/src/app/constants.ts b/commafeed-client/src/app/constants.ts index 288b67f1..1785c4ea 100644 --- a/commafeed-client/src/app/constants.ts +++ b/commafeed-client/src/app/constants.ts @@ -87,17 +87,15 @@ export const Constants = { headerHeight: 60, entryMaxWidth: 650, isTopVisible: (div: HTMLElement) => { - const header = document.getElementById(Constants.dom.headerId)?.getBoundingClientRect() + const header = document.getElementsByTagName("header").item(0)?.getBoundingClientRect() return div.getBoundingClientRect().top >= (header?.bottom ?? 0) }, isBottomVisible: (div: HTMLElement) => { - const footer = document.getElementById(Constants.dom.footerId)?.getBoundingClientRect() + const footer = document.getElementsByTagName("footer").item(0)?.getBoundingClientRect() return div.getBoundingClientRect().bottom <= (footer?.top ?? window.innerHeight) }, }, dom: { - headerId: "header", - footerId: "footer", entryId: (entry: Entry) => `entry-id-${entry.id}`, entryContextMenuId: (entry: Entry) => entry.id, }, diff --git a/commafeed-client/src/app/entries/slice.ts b/commafeed-client/src/app/entries/slice.ts index 208719be..764dcd01 100644 --- a/commafeed-client/src/app/entries/slice.ts +++ b/commafeed-client/src/app/entries/slice.ts @@ -1,4 +1,4 @@ -import { type PayloadAction, createSlice } from "@reduxjs/toolkit" +import { createSlice, type PayloadAction } from "@reduxjs/toolkit" import { Constants } from "app/constants" import { loadEntries, loadMoreEntries, markAllEntries, markEntry, markMultipleEntries, starEntry, tagEntry } from "app/entries/thunks" import type { Entry } from "app/types" diff --git a/commafeed-client/src/app/entries/thunks.ts b/commafeed-client/src/app/entries/thunks.ts index bb0ea540..99f35161 100644 --- a/commafeed-client/src/app/entries/thunks.ts +++ b/commafeed-client/src/app/entries/thunks.ts @@ -234,7 +234,7 @@ export const selectEntry = createAppAsyncThunk( ) const scrollToEntry = (entryElement: HTMLElement, margin: number, scrollSpeed: number | undefined, onScrollEnded: () => void) => { - const header = document.getElementById(Constants.dom.headerId)?.getBoundingClientRect() + const header = document.getElementsByTagName("header").item(0)?.getBoundingClientRect() const offset = (header?.bottom ?? 0) + margin scrollToWithCallback({ options: { diff --git a/commafeed-client/src/app/redirect/slice.ts b/commafeed-client/src/app/redirect/slice.ts index 3b8fb60c..c2b1a1a3 100644 --- a/commafeed-client/src/app/redirect/slice.ts +++ b/commafeed-client/src/app/redirect/slice.ts @@ -1,4 +1,4 @@ -import { type PayloadAction, createSlice } from "@reduxjs/toolkit" +import { createSlice, type PayloadAction } from "@reduxjs/toolkit" interface RedirectState { to?: string diff --git a/commafeed-client/src/app/server/slice.ts b/commafeed-client/src/app/server/slice.ts index 954c6865..86995d35 100644 --- a/commafeed-client/src/app/server/slice.ts +++ b/commafeed-client/src/app/server/slice.ts @@ -1,4 +1,4 @@ -import { type PayloadAction, createSlice } from "@reduxjs/toolkit" +import { createSlice, type PayloadAction } from "@reduxjs/toolkit" import { reloadServerInfos } from "app/server/thunks" import type { ServerInfo } from "app/types" diff --git a/commafeed-client/src/app/tree/slice.ts b/commafeed-client/src/app/tree/slice.ts index bf054bbb..fd61cce5 100644 --- a/commafeed-client/src/app/tree/slice.ts +++ b/commafeed-client/src/app/tree/slice.ts @@ -1,4 +1,4 @@ -import { type PayloadAction, createSlice } from "@reduxjs/toolkit" +import { createSlice, type PayloadAction } from "@reduxjs/toolkit" import { loadEntries, markEntry } from "app/entries/thunks" import { redirectTo } from "app/redirect/slice" import { collapseTreeCategory, reloadTree } from "app/tree/thunks" diff --git a/commafeed-client/src/app/user/slice.ts b/commafeed-client/src/app/user/slice.ts index c3ca5c90..596ba4e8 100644 --- a/commafeed-client/src/app/user/slice.ts +++ b/commafeed-client/src/app/user/slice.ts @@ -1,6 +1,6 @@ import { t } from "@lingui/core/macro" import { showNotification } from "@mantine/notifications" -import { type PayloadAction, createSlice, isAnyOf } from "@reduxjs/toolkit" +import { createSlice, isAnyOf, type PayloadAction } from "@reduxjs/toolkit" import type { LocalSettings, Settings, UserModel, ViewMode } from "app/types" import { changeCustomContextMenu, diff --git a/commafeed-client/src/components/ActionButton.tsx b/commafeed-client/src/components/ActionButton.tsx index a4d6e66b..c32e0502 100644 --- a/commafeed-client/src/components/ActionButton.tsx +++ b/commafeed-client/src/components/ActionButton.tsx @@ -4,7 +4,7 @@ import { ActionIcon, Box, Button, type ButtonVariant, Tooltip, useMantineTheme } import type { ActionIconVariant } from "@mantine/core/lib/components/ActionIcon/ActionIcon" import { Constants } from "app/constants" import { useActionButton } from "hooks/useActionButton" -import { type MouseEventHandler, type ReactNode, forwardRef } from "react" +import { forwardRef, type MouseEventHandler, type ReactNode } from "react" interface ActionButtonProps { icon: ReactNode diff --git a/commafeed-client/src/components/content/Content.tsx b/commafeed-client/src/components/content/Content.tsx index 54a7397e..1761ebc2 100644 --- a/commafeed-client/src/components/content/Content.tsx +++ b/commafeed-client/src/components/content/Content.tsx @@ -1,10 +1,10 @@ import { Box, Mark } from "@mantine/core" import { Constants } from "app/constants" import { calculatePlaceholderSize } from "app/utils" -import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading" import { BasicHtmlStyles } from "components/content/BasicHtmlStyles" +import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading" import escapeStringRegexp from "escape-string-regexp" -import { ALLOWED_TAG_LIST, type ChildrenNode, Interweave, type MatchResponse, Matcher, type Node, type TransformCallback } from "interweave" +import { ALLOWED_TAG_LIST, type ChildrenNode, Interweave, Matcher, type MatchResponse, type Node, type TransformCallback } from "interweave" import React from "react" import styleToObject from "style-to-object" import { tss } from "tss" diff --git a/commafeed-client/src/components/content/Enclosure.tsx b/commafeed-client/src/components/content/Enclosure.tsx index b9008e80..87f13905 100644 --- a/commafeed-client/src/components/content/Enclosure.tsx +++ b/commafeed-client/src/components/content/Enclosure.tsx @@ -1,10 +1,7 @@ -import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading" import { BasicHtmlStyles } from "components/content/BasicHtmlStyles" +import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading" -export function Enclosure(props: { - enclosureType: string - enclosureUrl: string -}) { +export function Enclosure(props: { enclosureType: string; enclosureUrl: string }) { const hasVideo = props.enclosureType.startsWith("video") const hasAudio = props.enclosureType.startsWith("audio") const hasImage = props.enclosureType.startsWith("image") diff --git a/commafeed-client/src/components/content/FeedEntries.tsx b/commafeed-client/src/components/content/FeedEntries.tsx index d83f6c7a..81e38d76 100644 --- a/commafeed-client/src/components/content/FeedEntries.tsx +++ b/commafeed-client/src/components/content/FeedEntries.tsx @@ -287,7 +287,6 @@ export function FeedEntries() { return ( await (!loading && dispatch(loadMoreEntries()))} diff --git a/commafeed-client/src/components/content/Media.tsx b/commafeed-client/src/components/content/Media.tsx index c330f388..94cad28a 100644 --- a/commafeed-client/src/components/content/Media.tsx +++ b/commafeed-client/src/components/content/Media.tsx @@ -1,8 +1,8 @@ import { Box } from "@mantine/core" import { Constants } from "app/constants" import { calculatePlaceholderSize } from "app/utils" -import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading" import { BasicHtmlStyles } from "components/content/BasicHtmlStyles" +import { ImageWithPlaceholderWhileLoading } from "components/ImageWithPlaceholderWhileLoading" import { Content } from "./Content" export interface MediaProps { diff --git a/commafeed-client/src/components/content/header/FeedEntryCompactHeader.tsx b/commafeed-client/src/components/content/header/FeedEntryCompactHeader.tsx index 69f9ab4b..6335d13e 100644 --- a/commafeed-client/src/components/content/header/FeedEntryCompactHeader.tsx +++ b/commafeed-client/src/components/content/header/FeedEntryCompactHeader.tsx @@ -1,9 +1,9 @@ import { Box } from "@mantine/core" import type { Entry } from "app/types" -import { RelativeDate } from "components/RelativeDate" import { FeedFavicon } from "components/content/FeedFavicon" import { OpenExternalLink } from "components/content/header/OpenExternalLink" import { Star } from "components/content/header/Star" +import { RelativeDate } from "components/RelativeDate" import { OnDesktop } from "components/responsive/OnDesktop" import { tss } from "tss" import { FeedEntryTitle } from "./FeedEntryTitle" diff --git a/commafeed-client/src/components/content/header/FeedEntryHeader.tsx b/commafeed-client/src/components/content/header/FeedEntryHeader.tsx index 0ffd40ee..2297a3b1 100644 --- a/commafeed-client/src/components/content/header/FeedEntryHeader.tsx +++ b/commafeed-client/src/components/content/header/FeedEntryHeader.tsx @@ -1,9 +1,9 @@ import { Box, Flex, Space } from "@mantine/core" import type { Entry } from "app/types" -import { RelativeDate } from "components/RelativeDate" import { FeedFavicon } from "components/content/FeedFavicon" import { OpenExternalLink } from "components/content/header/OpenExternalLink" import { Star } from "components/content/header/Star" +import { RelativeDate } from "components/RelativeDate" import { tss } from "tss" import { FeedEntryTitle } from "./FeedEntryTitle" diff --git a/commafeed-client/src/i18n.ts b/commafeed-client/src/i18n.ts index 0e963fb3..d2eb1d32 100644 --- a/commafeed-client/src/i18n.ts +++ b/commafeed-client/src/i18n.ts @@ -1,4 +1,4 @@ -import { type Messages, i18n } from "@lingui/core" +import { i18n, type Messages } from "@lingui/core" import { useAppSelector } from "app/store" import dayjs from "dayjs" import { useEffect } from "react" diff --git a/commafeed-client/src/pages/admin/AdminUsersPage.tsx b/commafeed-client/src/pages/admin/AdminUsersPage.tsx index a832c7a6..9b4cc060 100644 --- a/commafeed-client/src/pages/admin/AdminUsersPage.tsx +++ b/commafeed-client/src/pages/admin/AdminUsersPage.tsx @@ -4,9 +4,9 @@ import { closeAllModals, openConfirmModal, openModal } from "@mantine/modals" import { client, errorToStrings } from "app/client" import type { UserModel } from "app/types" import { Alert } from "components/Alert" +import { UserEdit } from "components/admin/UserEdit" import { Loader } from "components/Loader" import { RelativeDate } from "components/RelativeDate" -import { UserEdit } from "components/admin/UserEdit" import type { ReactNode } from "react" import { useAsync, useAsyncCallback } from "react-async-hook" import { TbCheck, TbPencil, TbPlus, TbTrash, TbX } from "react-icons/tb" diff --git a/commafeed-client/src/pages/app/AboutPage.tsx b/commafeed-client/src/pages/app/AboutPage.tsx index d05d7c4c..13e0e2d0 100644 --- a/commafeed-client/src/pages/app/AboutPage.tsx +++ b/commafeed-client/src/pages/app/AboutPage.tsx @@ -5,8 +5,8 @@ import { Anchor, Box, Container, List, NativeSelect, SimpleGrid, Title } from "@ import { Constants } from "app/constants" import { redirectToApiDocumentation } from "app/redirect/thunks" import { useAppDispatch, useAppSelector } from "app/store" -import { KeyboardShortcutsHelp } from "components/KeyboardShortcutsHelp" import { CategorySelect } from "components/content/add/CategorySelect" +import { KeyboardShortcutsHelp } from "components/KeyboardShortcutsHelp" import { useBrowserExtension } from "hooks/useBrowserExtension" import type React from "react" import { useState } from "react" diff --git a/commafeed-client/src/pages/app/CategoryDetailsPage.tsx b/commafeed-client/src/pages/app/CategoryDetailsPage.tsx index d664f029..b184c8e4 100644 --- a/commafeed-client/src/pages/app/CategoryDetailsPage.tsx +++ b/commafeed-client/src/pages/app/CategoryDetailsPage.tsx @@ -12,8 +12,8 @@ import { reloadTree } from "app/tree/thunks" import type { Category, CategoryModificationRequest } from "app/types" import { flattenCategoryTree } from "app/utils" import { Alert } from "components/Alert" -import { Loader } from "components/Loader" import { CategorySelect } from "components/content/add/CategorySelect" +import { Loader } from "components/Loader" import { useEffect } from "react" import { useAsync, useAsyncCallback } from "react-async-hook" import { TbDeviceFloppy, TbTrash } from "react-icons/tb" diff --git a/commafeed-client/src/pages/app/FeedDetailsPage.tsx b/commafeed-client/src/pages/app/FeedDetailsPage.tsx index 82f4b0e9..0adcc376 100644 --- a/commafeed-client/src/pages/app/FeedDetailsPage.tsx +++ b/commafeed-client/src/pages/app/FeedDetailsPage.tsx @@ -8,9 +8,9 @@ import { useAppDispatch, useAppSelector } from "app/store" import { reloadTree } from "app/tree/thunks" import type { FeedModificationRequest } from "app/types" import { Alert } from "components/Alert" +import { CategorySelect } from "components/content/add/CategorySelect" import { Loader } from "components/Loader" import { RelativeDate } from "components/RelativeDate" -import { CategorySelect } from "components/content/add/CategorySelect" import { useEffect } from "react" import { useAsync, useAsyncCallback } from "react-async-hook" import { TbDeviceFloppy, TbTrash } from "react-icons/tb" diff --git a/commafeed-client/src/pages/app/Layout.tsx b/commafeed-client/src/pages/app/Layout.tsx index 4e23ae72..e26f1673 100644 --- a/commafeed-client/src/pages/app/Layout.tsx +++ b/commafeed-client/src/pages/app/Layout.tsx @@ -184,9 +184,9 @@ export default function Layout(props: LayoutProps) { }} padding={{ base: 6, [Constants.layout.mobileBreakpointName]: "md" }} > - {!headerInFooter && header} - {headerInFooter && header} - + {!headerInFooter && header} + {headerInFooter && header} + {props.sidebar} @@ -221,7 +221,7 @@ export default function Layout(props: LayoutProps) { - + }>