mirror of
https://github.com/Athou/commafeed.git
synced 2026-11-03 19:05:03 +00:00
use 120 max line length for both server and client code (was 100 and 140)
This commit is contained in:
@@ -51,7 +51,12 @@ function NextUnreadBookmarklet() {
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<CategorySelect value={categoryId} onChange={c => c && setCategoryId(c)} withAll description={<Trans>Category</Trans>} />
|
||||
<CategorySelect
|
||||
value={categoryId}
|
||||
onChange={c => c && setCategoryId(c)}
|
||||
withAll
|
||||
description={<Trans>Category</Trans>}
|
||||
/>
|
||||
<NativeSelect
|
||||
data={[
|
||||
{ value: "desc", label: _(msg`Newest first`) },
|
||||
@@ -73,7 +78,8 @@ function NextUnreadBookmarklet() {
|
||||
export function AboutPage() {
|
||||
const version = useAppSelector(state => state.server.serverInfos?.version)
|
||||
const revision = useAppSelector(state => state.server.serverInfos?.gitCommit)
|
||||
const { isBrowserExtensionInstalled, browserExtensionVersion, isBrowserExtensionInstallable } = useBrowserExtension()
|
||||
const { isBrowserExtensionInstalled, browserExtensionVersion, isBrowserExtensionInstallable } =
|
||||
useBrowserExtension()
|
||||
const dispatch = useAppDispatch()
|
||||
|
||||
return (
|
||||
@@ -100,7 +106,9 @@ export function AboutPage() {
|
||||
</Trans>
|
||||
</Box>
|
||||
<Box>
|
||||
<Trans>If you encounter an issue, please report it on the issues page of the GitHub project.</Trans>
|
||||
<Trans>
|
||||
If you encounter an issue, please report it on the issues page of the GitHub project.
|
||||
</Trans>
|
||||
</Box>
|
||||
</Section>
|
||||
<Section title={<Trans>Goodies</Trans>} icon={<TbPuzzle size={24} />}>
|
||||
|
||||
@@ -1,7 +1,21 @@
|
||||
import { msg } from "@lingui/core/macro"
|
||||
import { useLingui } from "@lingui/react"
|
||||
import { Trans } from "@lingui/react/macro"
|
||||
import { Anchor, Box, Button, Code, Container, Divider, Group, Input, NumberInput, Stack, Text, TextInput, Title } from "@mantine/core"
|
||||
import {
|
||||
Anchor,
|
||||
Box,
|
||||
Button,
|
||||
Code,
|
||||
Container,
|
||||
Divider,
|
||||
Group,
|
||||
Input,
|
||||
NumberInput,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
} from "@mantine/core"
|
||||
import { useForm } from "@mantine/form"
|
||||
import { openConfirmModal } from "@mantine/modals"
|
||||
import { useEffect } from "react"
|
||||
@@ -130,7 +144,12 @@ export function CategoryDetailsPage() {
|
||||
clearable
|
||||
withoutCategoryIds={excludedCategoryIds}
|
||||
/>
|
||||
<NumberInput label={<Trans>Position</Trans>} {...form.getInputProps("position")} required min={0} />
|
||||
<NumberInput
|
||||
label={<Trans>Position</Trans>}
|
||||
{...form.getInputProps("position")}
|
||||
required
|
||||
min={0}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
|
||||
@@ -140,7 +159,11 @@ export function CategoryDetailsPage() {
|
||||
</Button>
|
||||
{editable && (
|
||||
<>
|
||||
<Button type="submit" leftSection={<TbDeviceFloppy size={16} />} loading={modifyCategory.loading}>
|
||||
<Button
|
||||
type="submit"
|
||||
leftSection={<TbDeviceFloppy size={16} />}
|
||||
loading={modifyCategory.loading}
|
||||
>
|
||||
<Trans>Save</Trans>
|
||||
</Button>
|
||||
<Divider orientation="vertical" />
|
||||
|
||||
@@ -19,8 +19,8 @@ export function DonatePage() {
|
||||
<Trans>
|
||||
<Box>Hey,</Box>
|
||||
<Box mt="xs">
|
||||
I'm Jérémie from Belgium and I've been working on CommaFeed in my free time for over 10 years now. Thanks for taking
|
||||
an interest in helping me continue supporting CommaFeed.
|
||||
I'm Jérémie from Belgium and I've been working on CommaFeed in my free time for over 10 years
|
||||
now. Thanks for taking an interest in helping me continue supporting CommaFeed.
|
||||
</Box>
|
||||
</Trans>
|
||||
|
||||
|
||||
@@ -133,7 +133,11 @@ export function FeedDetailsPage() {
|
||||
<Input.Wrapper label={<Trans>Generated feed url</Trans>}>
|
||||
<Box>
|
||||
{apiKey && (
|
||||
<Anchor href={`rest/feed/entriesAsFeed?id=${feed.id}&apiKey=${apiKey}`} target="_blank" rel="noreferrer">
|
||||
<Anchor
|
||||
href={`rest/feed/entriesAsFeed?id=${feed.id}&apiKey=${apiKey}`}
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<Trans>Link</Trans>
|
||||
</Anchor>
|
||||
)}
|
||||
@@ -146,10 +150,16 @@ export function FeedDetailsPage() {
|
||||
<TextInput label={<Trans>Name</Trans>} {...form.getInputProps("name")} required />
|
||||
<CategorySelect label={<Trans>Category</Trans>} {...form.getInputProps("categoryId")} clearable />
|
||||
<NumberInput label={<Trans>Position</Trans>} {...form.getInputProps("position")} required min={0} />
|
||||
<ReceivePushNotificationsChechbox {...form.getInputProps("pushNotificationsEnabled", { type: "checkbox" })} />
|
||||
<ReceivePushNotificationsChechbox
|
||||
{...form.getInputProps("pushNotificationsEnabled", { type: "checkbox" })}
|
||||
/>
|
||||
<NumberInput
|
||||
label={<Trans>Auto-mark as read</Trans>}
|
||||
description={<Trans>Mark entries in this feed as read after this number of days. Leave empty to disable.</Trans>}
|
||||
description={
|
||||
<Trans>
|
||||
Mark entries in this feed as read after this number of days. Leave empty to disable.
|
||||
</Trans>
|
||||
}
|
||||
suffix={` ${_(msg`days`)}`}
|
||||
{...form.getInputProps("autoMarkAsReadAfterDays")}
|
||||
min={1}
|
||||
@@ -159,21 +169,25 @@ export function FeedDetailsPage() {
|
||||
label={<Trans>Filtering expression</Trans>}
|
||||
description={
|
||||
<Trans>
|
||||
Build a filter expression to indicate what you want to read. Entries that don't match will be marked as read
|
||||
automatically.
|
||||
Build a filter expression to indicate what you want to read. Entries that don't match
|
||||
will be marked as read automatically.
|
||||
</Trans>
|
||||
}
|
||||
>
|
||||
{feed.filterLegacy && (
|
||||
<MantineAlert color="yellow" icon={<TbAlertTriangle />}>
|
||||
<Trans>
|
||||
This feed has a legacy filter that cannot be edited and is not applied. Please recreate the filter using
|
||||
the new expression editor. The legacy filter expression was: <Code>{feed.filterLegacy}</Code>
|
||||
This feed has a legacy filter that cannot be edited and is not applied. Please
|
||||
recreate the filter using the new expression editor. The legacy filter expression
|
||||
was: <Code>{feed.filterLegacy}</Code>
|
||||
</Trans>
|
||||
</MantineAlert>
|
||||
)}
|
||||
<Box mt="xs">
|
||||
<FilteringExpressionEditor initialValue={feed.filter} onChange={value => form.setFieldValue("filter", value)} />
|
||||
<FilteringExpressionEditor
|
||||
initialValue={feed.filter}
|
||||
onChange={value => form.setFieldValue("filter", value)}
|
||||
/>
|
||||
</Box>
|
||||
</Input.Wrapper>
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ function NoSubscriptionHelp() {
|
||||
<Box>
|
||||
<Center>
|
||||
<Trans>
|
||||
You don't have any subscriptions yet. Why not try adding one by clicking on the + sign at the top of the page?
|
||||
You don't have any subscriptions yet. Why not try adding one by clicking on the + sign at the top of
|
||||
the page?
|
||||
</Trans>
|
||||
</Center>
|
||||
</Box>
|
||||
@@ -51,7 +52,8 @@ export function FeedEntriesPage(props: Readonly<FeedEntriesPageProps>) {
|
||||
const viewport = useViewportSize()
|
||||
const theme = useMantineTheme()
|
||||
const noSubscriptions = useAppSelector(
|
||||
state => state.tree.rootCategory && flattenCategoryTree(state.tree.rootCategory).every(c => c.feeds.length === 0)
|
||||
state =>
|
||||
state.tree.rootCategory && flattenCategoryTree(state.tree.rootCategory).every(c => c.feeds.length === 0)
|
||||
)
|
||||
const sourceLabel = useAppSelector(state => state.entries.sourceLabel)
|
||||
const sourceWebsiteUrl = useAppSelector(state => state.entries.sourceWebsiteUrl)
|
||||
@@ -63,7 +65,8 @@ export function FeedEntriesPage(props: Readonly<FeedEntriesPageProps>) {
|
||||
if (!root) return { unreadCount: 0, hasNewEntries: false }
|
||||
|
||||
if (props.sourceType === "category") {
|
||||
const category = id === Constants.categories.all.id ? root : flattenCategoryTree(root).find(c => c.id === id)
|
||||
const category =
|
||||
id === Constants.categories.all.id ? root : flattenCategoryTree(root).find(c => c.id === id)
|
||||
return {
|
||||
unreadCount: categoryUnreadCount(category),
|
||||
hasNewEntries: categoryHasNewEntries(category),
|
||||
|
||||
Reference in New Issue
Block a user