Compare commits

...

9 Commits
4.3.0 ... 4.3.1

Author SHA1 Message Date
Athou
fafd4c9d54 release 4.3.1 2024-02-12 16:13:34 +01:00
Jérémie Panzer
73b472bc8a Merge pull request #1242 from Athou/dependabot/npm_and_yarn/commafeed-client/mantine-42bf712b6b
Bump the mantine group in /commafeed-client with 6 updates
2024-02-12 11:00:20 +01:00
Jérémie Panzer
1c3be67f76 Merge pull request #1243 from Athou/dependabot/npm_and_yarn/commafeed-client/fontsource/open-sans-5.0.23
Bump @fontsource/open-sans from 5.0.22 to 5.0.23 in /commafeed-client
2024-02-12 10:59:21 +01:00
dependabot[bot]
2a5988b3e7 Bump @fontsource/open-sans from 5.0.22 to 5.0.23 in /commafeed-client
Bumps [@fontsource/open-sans](https://github.com/fontsource/font-files/tree/HEAD/fonts/google/open-sans) from 5.0.22 to 5.0.23.
- [Changelog](https://github.com/fontsource/font-files/blob/main/fonts/google/open-sans/CHANGELOG.md)
- [Commits](https://github.com/fontsource/font-files/commits/HEAD/fonts/google/open-sans)

---
updated-dependencies:
- dependency-name: "@fontsource/open-sans"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 09:30:55 +00:00
dependabot[bot]
c5757849f3 Bump the mantine group in /commafeed-client with 6 updates
Bumps the mantine group in /commafeed-client with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@mantine/core](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/core) | `7.5.1` | `7.5.2` |
| [@mantine/form](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/form) | `7.5.1` | `7.5.2` |
| [@mantine/hooks](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/hooks) | `7.5.1` | `7.5.2` |
| [@mantine/modals](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/modals) | `7.5.1` | `7.5.2` |
| [@mantine/notifications](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/notifications) | `7.5.1` | `7.5.2` |
| [@mantine/spotlight](https://github.com/mantinedev/mantine/tree/HEAD/packages/@mantine/spotlight) | `7.5.1` | `7.5.2` |


Updates `@mantine/core` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.5.2/packages/@mantine/core)

Updates `@mantine/form` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.5.2/packages/@mantine/form)

Updates `@mantine/hooks` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.5.2/packages/@mantine/hooks)

Updates `@mantine/modals` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.5.2/packages/@mantine/modals)

Updates `@mantine/notifications` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.5.2/packages/@mantine/notifications)

Updates `@mantine/spotlight` from 7.5.1 to 7.5.2
- [Release notes](https://github.com/mantinedev/mantine/releases)
- [Changelog](https://github.com/mantinedev/mantine/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mantinedev/mantine/commits/7.5.2/packages/@mantine/spotlight)

---
updated-dependencies:
- dependency-name: "@mantine/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mantine
- dependency-name: "@mantine/form"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mantine
- dependency-name: "@mantine/hooks"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mantine
- dependency-name: "@mantine/modals"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mantine
- dependency-name: "@mantine/notifications"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mantine
- dependency-name: "@mantine/spotlight"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: mantine
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-12 09:30:22 +00:00
Athou
b6107c3330 pass theme and colorscheme in tss context to avoid repetitions (#1241) 2024-02-12 07:38:57 +01:00
Athou
3efeed6c85 make sure videos don't overflow parent (#1240) 2024-02-10 21:50:17 +01:00
Athou
be44b0aad1 make sure timestamps are stored in UTC (#1239) 2024-02-10 12:42:22 +01:00
Athou
36152dc47f add an additional day to make sure the timestamp fits in all timezones (#1239) 2024-02-10 12:41:32 +01:00
23 changed files with 130 additions and 160 deletions

View File

@@ -1,5 +1,11 @@
# Changelog
## [4.3.1]
- fix an issue that prevents new feeds from being added when mysql/mariadb is used as the database and the database
timezone is not UTC (#1239)
- videos in enclosures can no longer have a width larger than the page (#1240)
## [4.3.0]
- h2 (the embedded database) has been upgraded to 2.2.224

View File

@@ -9,16 +9,16 @@
"version": "0.0.0",
"dependencies": {
"@emotion/react": "^11.11.3",
"@fontsource/open-sans": "^5.0.22",
"@fontsource/open-sans": "^5.0.23",
"@lingui/core": "^4.7.0",
"@lingui/macro": "^4.7.0",
"@lingui/react": "^4.7.0",
"@mantine/core": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/modals": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@mantine/spotlight": "^7.5.1",
"@mantine/core": "^7.5.2",
"@mantine/form": "^7.5.2",
"@mantine/hooks": "^7.5.2",
"@mantine/modals": "^7.5.2",
"@mantine/notifications": "^7.5.2",
"@mantine/spotlight": "^7.5.2",
"@monaco-editor/react": "^4.6.0",
"@reduxjs/toolkit": "^2.1.0",
"axios": "^1.6.7",
@@ -1190,9 +1190,9 @@
"integrity": "sha512-OfX7E2oUDYxtBvsuS4e/jSn4Q9Qb6DzgeYtsAdkPZ47znpoNsMgZw0+tVijiv3uGNR6dgNlty6r9rzIzHjtd/A=="
},
"node_modules/@fontsource/open-sans": {
"version": "5.0.22",
"resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.0.22.tgz",
"integrity": "sha512-lN3A4prlcVPgLjlgwY+oMPalpyXPM/6DwaLr6LjqkjytjGIZTLBbInL+zTfcemSyMtTQklreETepGjjmtzlRHA=="
"version": "5.0.23",
"resolved": "https://registry.npmjs.org/@fontsource/open-sans/-/open-sans-5.0.23.tgz",
"integrity": "sha512-BTp23tnfuvoLVyb0pmybebmx/YEmq/VMSwTWPy9zMyNlRV63XDVuE1M/XCpcCy2mYbespx/Ky4NWrZkL3GGfig=="
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.13",
@@ -1511,9 +1511,9 @@
}
},
"node_modules/@mantine/core": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.5.1.tgz",
"integrity": "sha512-V7apuQuRubqxTRXb1uxOM43K7tkLRzpbb1ONJ/sj8QRp/26bShkdYp7EVuSKyrQ8DQ5EGYyBBGyzBOQARh41gA==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/core/-/core-7.5.2.tgz",
"integrity": "sha512-e58qTiLEp9qLxQ5JZlPNykJWBR+oi0q2J8JPKTjTJD+4UM58uh9oL4wuMEdUyBgiYGvDc/cVYF+rftMpuCt+KQ==",
"dependencies": {
"@floating-ui/react": "^0.24.8",
"clsx": "2.0.0",
@@ -1523,7 +1523,7 @@
"type-fest": "^3.13.1"
},
"peerDependencies": {
"@mantine/hooks": "7.5.1",
"@mantine/hooks": "7.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
@@ -1548,9 +1548,9 @@
}
},
"node_modules/@mantine/form": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/form/-/form-7.5.1.tgz",
"integrity": "sha512-NPc6sYXZGImFsZvr9Md5DM8C+vpC14rqLcOJlW4DFqze1/MBblVxR+abCNM12r5hrqUxHXEu55yPzxcR9Hoj3Q==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/form/-/form-7.5.2.tgz",
"integrity": "sha512-Kz4UNLvAvxB1utKflt4gr5Uzt1Dxj17thcnlLzB2JX6unzV3OkvC36b5XoXAtuoFxt/RzEyUrp5M38jZLwCLEA==",
"dependencies": {
"fast-deep-equal": "^3.1.3",
"klona": "^2.0.6"
@@ -1560,57 +1560,57 @@
}
},
"node_modules/@mantine/hooks": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.5.1.tgz",
"integrity": "sha512-LfrEOkX8U2KbkYAU5BMA7FPbMva/TSd65c45W35wHSx3iqYMsoPN9+Ll1zc/HT0XNFp73jGet9cU7VREbAl0/A==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/hooks/-/hooks-7.5.2.tgz",
"integrity": "sha512-4POujH5Xx84VB/xfM6EttDq725dqqL2DntoeMjHz3Ua94aK5Y0VSc1IwlETxCuF7yNV5/w/Z8kgeVVa5cDgrPg==",
"peerDependencies": {
"react": "^18.2.0"
}
},
"node_modules/@mantine/modals": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/modals/-/modals-7.5.1.tgz",
"integrity": "sha512-s0+kGsYbm4sM6xjgR5njAAp5laOw7g9E4rf7kRpcAWadYTGH8ooKnSFuYfLJFm+viYHDHXRQGH6qvo4VAbOrLQ==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/modals/-/modals-7.5.2.tgz",
"integrity": "sha512-QRdFZtaGvyE9/nYgnsyMPsWEy+o0vaTzD+Sle6c/CaZ4MPk0ok3Au8bd04LnSMmoinYgLeei9IsmP78UXO9kNA==",
"peerDependencies": {
"@mantine/core": "7.5.1",
"@mantine/hooks": "7.5.1",
"@mantine/core": "7.5.2",
"@mantine/hooks": "7.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/@mantine/notifications": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/notifications/-/notifications-7.5.1.tgz",
"integrity": "sha512-IQDOAz+U9G6IkYXAXG9qL5EESmnhWV3JBJrxwBOPPdi1e9S/akQlsmABWS/voB9WFnOnbMbrkF067RVBA7W4dg==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/notifications/-/notifications-7.5.2.tgz",
"integrity": "sha512-wGRDeOG2NGng202k/vZPfkRJMHtflvIORYe4cJaQAd9EhP646xr/ji8zzdXeXvUO5PrKlBpu+K+HSF1bQQY4og==",
"dependencies": {
"@mantine/store": "7.5.1",
"@mantine/store": "7.5.2",
"react-transition-group": "4.4.5"
},
"peerDependencies": {
"@mantine/core": "7.5.1",
"@mantine/hooks": "7.5.1",
"@mantine/core": "7.5.2",
"@mantine/hooks": "7.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/@mantine/spotlight": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/spotlight/-/spotlight-7.5.1.tgz",
"integrity": "sha512-J49+53nDTsk8eVDFWNVV4SufK5D6iYU5hs15PXwotre+OLgudYK9QXF8r3PA90hugxxiYmykxq2CT+Ttx6GoOg==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/spotlight/-/spotlight-7.5.2.tgz",
"integrity": "sha512-2z23INFOUAvtPpeiXaqJDCakKo1asCGzlyg1FJ3AByZOrGtyT1WY3tAo/0XXFaKh+dUmcj7HcQcEEobJL5QKzQ==",
"dependencies": {
"@mantine/store": "7.5.1"
"@mantine/store": "7.5.2"
},
"peerDependencies": {
"@mantine/core": "7.5.1",
"@mantine/hooks": "7.5.1",
"@mantine/core": "7.5.2",
"@mantine/hooks": "7.5.2",
"react": "^18.2.0",
"react-dom": "^18.2.0"
}
},
"node_modules/@mantine/store": {
"version": "7.5.1",
"resolved": "https://registry.npmjs.org/@mantine/store/-/store-7.5.1.tgz",
"integrity": "sha512-sDaPXB3v9JlJghNTnRTFT2hC3HN6pdBcCXj0CqO/QrJgtRA7A3FxW+mnY7YQOaBxHJ1MIRr+zsv0Qy1f/pu1dw==",
"version": "7.5.2",
"resolved": "https://registry.npmjs.org/@mantine/store/-/store-7.5.2.tgz",
"integrity": "sha512-au53HLLH/LfHLOR2Zb00TgG11xAXZNJb4jqsEhAr90axCIw6mlBDIAhbb+Yu6OwDaV7TscE/sonkUstmRjLh/w==",
"peerDependencies": {
"react": "^18.2.0"
}

View File

@@ -15,16 +15,16 @@
},
"dependencies": {
"@emotion/react": "^11.11.3",
"@fontsource/open-sans": "^5.0.22",
"@fontsource/open-sans": "^5.0.23",
"@lingui/core": "^4.7.0",
"@lingui/macro": "^4.7.0",
"@lingui/react": "^4.7.0",
"@mantine/core": "^7.5.1",
"@mantine/form": "^7.5.1",
"@mantine/hooks": "^7.5.1",
"@mantine/modals": "^7.5.1",
"@mantine/notifications": "^7.5.1",
"@mantine/spotlight": "^7.5.1",
"@mantine/core": "^7.5.2",
"@mantine/form": "^7.5.2",
"@mantine/hooks": "^7.5.2",
"@mantine/modals": "^7.5.2",
"@mantine/notifications": "^7.5.2",
"@mantine/spotlight": "^7.5.2",
"@monaco-editor/react": "^4.6.0",
"@reduxjs/toolkit": "^2.1.0",
"axios": "^1.6.7",

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
</parent>
<artifactId>commafeed-client</artifactId>
<name>CommaFeed Client</name>

View File

@@ -1,5 +1,4 @@
import { Box, Center, type MantineTheme, useMantineTheme } from "@mantine/core"
import { useColorScheme } from "hooks/useColorScheme"
import { Box, Center } from "@mantine/core"
import { useState } from "react"
import { TbPhoto } from "react-icons/tb"
import { tss } from "tss"
@@ -18,8 +17,6 @@ interface ImageWithPlaceholderWhileLoadingProps {
const useStyles = tss
.withParams<{
theme: MantineTheme
colorScheme: "light" | "dark"
placeholderWidth?: number
placeholderHeight?: number
placeholderBackgroundColor?: string
@@ -46,11 +43,7 @@ export function ImageWithPlaceholderWhileLoading({
title,
width,
}: ImageWithPlaceholderWhileLoadingProps) {
const theme = useMantineTheme()
const colorScheme = useColorScheme()
const { classes } = useStyles({
theme,
colorScheme,
placeholderWidth,
placeholderHeight,
placeholderBackgroundColor,

View File

@@ -9,7 +9,7 @@ export function Enclosure(props: { enclosureType: string; enclosureUrl: string }
return (
<BasicHtmlStyles>
{hasVideo && (
<video controls>
<video controls width="100%">
<source src={props.enclosureUrl} type={props.enclosureType} />
</video>
)}

View File

@@ -1,7 +1,6 @@
import { Box, Divider, type MantineRadius, type MantineSpacing, type MantineTheme, Paper, useMantineTheme } from "@mantine/core"
import { Box, Divider, type MantineRadius, type MantineSpacing, Paper } from "@mantine/core"
import { Constants } from "app/constants"
import { type Entry, type ViewMode } from "app/types"
import { useColorScheme } from "hooks/useColorScheme"
import { useViewMode } from "hooks/useViewMode"
import React from "react"
import { useSwipeable } from "react-swipeable"
@@ -26,8 +25,6 @@ interface FeedEntryProps {
const useStyles = tss
.withParams<{
theme: MantineTheme
colorScheme: "light" | "dark"
read: boolean
expanded: boolean
viewMode: ViewMode
@@ -96,12 +93,8 @@ const useStyles = tss
})
export function FeedEntry(props: FeedEntryProps) {
const theme = useMantineTheme()
const colorScheme = useColorScheme()
const { viewMode } = useViewMode()
const { classes, cx } = useStyles({
theme,
colorScheme,
read: props.entry.read,
expanded: props.expanded,
viewMode,

View File

@@ -2,7 +2,6 @@ import { Box, Text } from "@mantine/core"
import { type Entry } from "app/types"
import { RelativeDate } from "components/RelativeDate"
import { OnDesktop } from "components/responsive/OnDesktop"
import { useColorScheme } from "hooks/useColorScheme"
import { tss } from "tss"
import { FeedEntryTitle } from "./FeedEntryTitle"
import { FeedFavicon } from "./FeedFavicon"
@@ -13,7 +12,6 @@ export interface FeedEntryHeaderProps {
const useStyles = tss
.withParams<{
colorScheme: "light" | "dark"
read: boolean
}>()
.create(({ colorScheme, read }) => ({
@@ -42,9 +40,7 @@ const useStyles = tss
}))
export function FeedEntryCompactHeader(props: FeedEntryHeaderProps) {
const colorScheme = useColorScheme()
const { classes } = useStyles({
colorScheme,
read: props.entry.read,
})
return (

View File

@@ -1,5 +1,5 @@
import { Trans } from "@lingui/macro"
import { Group, type MantineTheme, useMantineTheme } from "@mantine/core"
import { Group } from "@mantine/core"
import { Constants } from "app/constants"
import { markEntriesUpToEntry, markEntry, starEntry } from "app/entries/thunks"
import { redirectToFeed } from "app/redirect/thunks"
@@ -17,28 +17,19 @@ interface FeedEntryContextMenuProps {
}
const iconSize = 16
const useStyles = tss
.withParams<{
theme: MantineTheme
colorScheme: "light" | "dark"
}>()
.create(({ theme, colorScheme }) => ({
menu: {
// apply mantine theme from MenuItem.styles.ts
fontSize: theme.fontSizes.sm,
"--contexify-item-color": `${colorScheme === "dark" ? theme.colors.dark[0] : theme.black} !important`,
"--contexify-activeItem-color": `${colorScheme === "dark" ? theme.colors.dark[0] : theme.black} !important`,
"--contexify-activeItem-bgColor": `${colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[1]} !important`,
},
}))
const useStyles = tss.create(({ theme, colorScheme }) => ({
menu: {
// apply mantine theme from MenuItem.styles.ts
fontSize: theme.fontSizes.sm,
"--contexify-item-color": `${colorScheme === "dark" ? theme.colors.dark[0] : theme.black} !important`,
"--contexify-activeItem-color": `${colorScheme === "dark" ? theme.colors.dark[0] : theme.black} !important`,
"--contexify-activeItem-bgColor": `${colorScheme === "dark" ? theme.colors.dark[4] : theme.colors.gray[1]} !important`,
},
}))
export function FeedEntryContextMenu(props: FeedEntryContextMenuProps) {
const theme = useMantineTheme()
const colorScheme = useColorScheme()
const { classes } = useStyles({
theme,
colorScheme,
})
const { classes } = useStyles()
const sourceType = useAppSelector(state => state.entries.source.type)
const dispatch = useAppDispatch()
const { openLinkInBackgroundTab } = useBrowserExtension()

View File

@@ -1,7 +1,6 @@
import { Box, Space, Text } from "@mantine/core"
import { type Entry } from "app/types"
import { RelativeDate } from "components/RelativeDate"
import { useColorScheme } from "hooks/useColorScheme"
import { tss } from "tss"
import { FeedEntryTitle } from "./FeedEntryTitle"
import { FeedFavicon } from "./FeedFavicon"
@@ -13,7 +12,6 @@ export interface FeedEntryHeaderProps {
const useStyles = tss
.withParams<{
colorScheme: "light" | "dark"
read: boolean
}>()
.create(({ colorScheme, read }) => ({
@@ -28,9 +26,7 @@ const useStyles = tss
}))
export function FeedEntryHeader(props: FeedEntryHeaderProps) {
const colorScheme = useColorScheme()
const { classes } = useStyles({
colorScheme,
read: props.entry.read,
})
return (

View File

@@ -1,8 +1,7 @@
import { ActionIcon, Box, type MantineTheme, SimpleGrid, useMantineTheme } from "@mantine/core"
import { ActionIcon, Box, SimpleGrid } from "@mantine/core"
import { Constants } from "app/constants"
import { useAppSelector } from "app/store"
import { type SharingSettings } from "app/types"
import { useColorScheme } from "hooks/useColorScheme"
import { type IconType } from "react-icons"
import { tss } from "tss"
@@ -10,8 +9,6 @@ type Color = `#${string}`
const useStyles = tss
.withParams<{
theme: MantineTheme
colorScheme: "light" | "dark"
color: Color
}>()
.create(({ theme, colorScheme, color }) => ({
@@ -23,11 +20,7 @@ const useStyles = tss
}))
function ShareButton({ url, icon, color }: { url: string; icon: IconType; color: Color }) {
const theme = useMantineTheme()
const colorScheme = useColorScheme()
const { classes } = useStyles({
theme,
colorScheme,
color,
})

View File

@@ -1,6 +1,5 @@
import { Box, Center, type MantineTheme, useMantineTheme } from "@mantine/core"
import { Box, Center } from "@mantine/core"
import { FeedFavicon } from "components/content/FeedFavicon"
import { useColorScheme } from "hooks/useColorScheme"
import React, { type ReactNode } from "react"
import { tss } from "tss"
import { UnreadCount } from "./UnreadCount"
@@ -20,8 +19,6 @@ interface TreeNodeProps {
const useStyles = tss
.withParams<{
theme: MantineTheme
colorScheme: "dark" | "light"
selected: boolean
hasError: boolean
hasUnread: boolean
@@ -60,11 +57,7 @@ const useStyles = tss
})
export function TreeNode(props: TreeNodeProps) {
const theme = useMantineTheme()
const colorScheme = useColorScheme()
const { classes } = useStyles({
theme,
colorScheme,
selected: props.selected,
hasError: props.hasError,
hasUnread: props.unread > 0,

View File

@@ -1,44 +1,39 @@
import { Trans } from "@lingui/macro"
import { Box, Button, Container, Group, type MantineTheme, Text, Title, useMantineTheme } from "@mantine/core"
import { Box, Button, Container, Group, Text, Title } from "@mantine/core"
import { TbRefresh } from "react-icons/tb"
import { tss } from "tss"
import { PageTitle } from "./PageTitle"
const useStyles = tss
.withParams<{
theme: MantineTheme
}>()
.create(({ theme }) => ({
root: {
paddingTop: 80,
},
const useStyles = tss.create(({ theme }) => ({
root: {
paddingTop: 80,
},
label: {
textAlign: "center",
fontWeight: "bold",
fontSize: 120,
lineHeight: 1,
marginBottom: `calc(${theme.spacing.xl} * 1.5)`,
color: theme.colors[theme.primaryColor][3],
},
label: {
textAlign: "center",
fontWeight: "bold",
fontSize: 120,
lineHeight: 1,
marginBottom: `calc(${theme.spacing.xl} * 1.5)`,
color: theme.colors[theme.primaryColor][3],
},
title: {
textAlign: "center",
fontWeight: "bold",
fontSize: 32,
},
title: {
textAlign: "center",
fontWeight: "bold",
fontSize: 32,
},
description: {
maxWidth: 540,
margin: "auto",
marginTop: theme.spacing.xl,
marginBottom: `calc(${theme.spacing.xl} * 1.5)`,
},
}))
description: {
maxWidth: 540,
margin: "auto",
marginTop: theme.spacing.xl,
marginBottom: `calc(${theme.spacing.xl} * 1.5)`,
},
}))
export function ErrorPage(props: { error: Error }) {
const theme = useMantineTheme()
const { classes } = useStyles({ theme })
const { classes } = useStyles()
return (
<div className={classes.root}>

View File

@@ -1,11 +1,14 @@
import { useMantineTheme } from "@mantine/core"
import { useColorScheme } from "hooks/useColorScheme"
import { createTss } from "tss-react"
const useContext = () => {
// return anything here that will be accessible in tss.create()
// we don't need anything right now
return {}
const theme = useMantineTheme()
const colorScheme = useColorScheme()
return { theme, colorScheme }
}
export const { tss } = createTss({ useContext })
export const useStyles = tss.create({})

View File

@@ -95,11 +95,11 @@ app:
# -------------------
# for MariaDB
# driverClass is org.mariadb.jdbc.Driver
# url is jdbc:mariadb://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true
# url is jdbc:mariadb://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true&timezone=UTC
#
# for MySQL
# driverClass is com.mysql.cj.jdbc.Driver
# url is jdbc:mysql://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true
# url is jdbc:mysql://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true&timezone=UTC
#
# for PostgreSQL
# driverClass is org.postgresql.Driver

View File

@@ -95,11 +95,11 @@ app:
# -------------------
# for MariaDB
# driverClass is org.mariadb.jdbc.Driver
# url is jdbc:mariadb://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true
# url is jdbc:mariadb://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true&timezone=UTC
#
# for MySQL
# driverClass is com.mysql.cj.jdbc.Driver
# url is jdbc:mysql://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true
# url is jdbc:mysql://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true&timezone=UTC
#
# for PostgreSQL
# driverClass is org.postgresql.Driver

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
</parent>
<artifactId>commafeed-server</artifactId>
<name>CommaFeed Server</name>
@@ -211,7 +211,7 @@
<dependency>
<groupId>com.commafeed</groupId>
<artifactId>commafeed-client</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
</dependency>
<dependency>

View File

@@ -25,6 +25,7 @@ import com.commafeed.backend.feed.parser.FeedParserResult.Entry;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.FeedEntry;
import com.commafeed.backend.model.FeedSubscription;
import com.commafeed.backend.model.Models;
import com.commafeed.backend.model.User;
import com.commafeed.backend.service.FeedEntryService;
import com.commafeed.backend.service.FeedService;
@@ -177,7 +178,7 @@ public class FeedRefreshUpdater {
if (!processed) {
// requeue asap
feed.setDisabledUntil(Feed.MINIMUM_DISABLED_UNTIL);
feed.setDisabledUntil(Models.MINIMUM_INSTANT);
}
if (inserted > 0) {

View File

@@ -15,9 +15,6 @@ import lombok.Setter;
@Setter
public class Feed extends AbstractModel {
// mariadb timestamp range starts at 1970-01-01 00:00:01
public static final Instant MINIMUM_DISABLED_UNTIL = Instant.EPOCH.plusSeconds(1);
/**
* The url of the feed
*/

View File

@@ -1,12 +1,24 @@
package com.commafeed.backend.model;
import java.time.Duration;
import java.time.Instant;
import org.hibernate.Hibernate;
import org.hibernate.HibernateException;
import org.hibernate.proxy.HibernateProxy;
import org.hibernate.proxy.LazyInitializer;
import lombok.experimental.UtilityClass;
@UtilityClass
public class Models {
public static final Instant MINIMUM_INSTANT = Instant.EPOCH
// mariadb timestamp range starts at 1970-01-01 00:00:01
.plusSeconds(1)
// make sure the timestamp fits for all timezones
.plus(Duration.ofHours(24));
/**
* initialize a proxy
*/
@@ -18,8 +30,8 @@ public class Models {
* extract the id from the proxy without initializing it
*/
public static Long getId(AbstractModel model) {
if (model instanceof HibernateProxy) {
LazyInitializer lazyInitializer = ((HibernateProxy) model).getHibernateLazyInitializer();
if (model instanceof HibernateProxy proxy) {
LazyInitializer lazyInitializer = proxy.getHibernateLazyInitializer();
if (lazyInitializer.isUninitialized()) {
return (Long) lazyInitializer.getIdentifier();
}

View File

@@ -12,6 +12,7 @@ import com.commafeed.backend.favicon.AbstractFaviconFetcher;
import com.commafeed.backend.favicon.Favicon;
import com.commafeed.backend.feed.FeedUtils;
import com.commafeed.backend.model.Feed;
import com.commafeed.backend.model.Models;
import jakarta.inject.Inject;
import jakarta.inject.Singleton;
@@ -45,7 +46,7 @@ public class FeedService {
feed.setUrl(url);
feed.setNormalizedUrl(normalizedUrl);
feed.setNormalizedUrlHash(normalizedUrlHash);
feed.setDisabledUntil(Feed.MINIMUM_DISABLED_UNTIL);
feed.setDisabledUntil(Models.MINIMUM_INSTANT);
feedDAO.saveOrUpdate(feed);
}
return feed;

View File

@@ -95,11 +95,11 @@ app:
# -------------------
# for MariaDB
# driverClass is org.mariadb.jdbc.Driver
# url is jdbc:mariadb://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true
# url is jdbc:mariadb://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true&timezone=UTC
#
# for MySQL
# driverClass is com.mysql.cj.jdbc.Driver
# url is jdbc:mysql://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true
# url is jdbc:mysql://localhost/commafeed?autoReconnect=true&failOverReadOnly=false&maxReconnects=20&rewriteBatchedStatements=true&timezone=UTC
#
# for PostgreSQL
# driverClass is org.postgresql.Driver

View File

@@ -5,7 +5,7 @@
<groupId>com.commafeed</groupId>
<artifactId>commafeed</artifactId>
<version>4.3.0</version>
<version>4.3.1</version>
<name>CommaFeed</name>
<packaging>pom</packaging>