mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
refactor
This commit is contained in:
@@ -19,10 +19,8 @@ const shownGauges: Record<string, string> = {
|
||||
"com.commafeed.backend.feed.FeedRefreshEngine.queue.size": "Feed Refresh Engine queue size",
|
||||
"com.commafeed.backend.feed.FeedRefreshEngine.worker.active": "Feed Refresh Engine active HTTP workers",
|
||||
"com.commafeed.backend.feed.FeedRefreshEngine.updater.active": "Feed Refresh Engine active database update workers",
|
||||
"com.commafeed.backend.HttpGetter.pool.max": "HttpGetter max pool size",
|
||||
"com.commafeed.backend.HttpGetter.pool.size": "HttpGetter current pool size",
|
||||
"com.commafeed.backend.HttpGetter.pool.leased": "HttpGetter active connections",
|
||||
"com.commafeed.backend.HttpGetter.pool.pending": "HttpGetter waiting for a connection",
|
||||
"com.commafeed.backend.feed.FeedRefreshEngine.notifier.active": "Feed Refresh Engine active push notifications workers",
|
||||
"com.commafeed.backend.feed.FeedRefreshEngine.notifier.queue": "Feed Refresh Engine queued push notifications workers",
|
||||
"com.commafeed.backend.HttpGetter.cache.size": "HttpGetter cached entries",
|
||||
"com.commafeed.backend.HttpGetter.cache.memoryUsage": "HttpGetter cache memory usage",
|
||||
"com.commafeed.frontend.ws.WebSocketSessions.users": "WebSocket users",
|
||||
|
||||
@@ -3,7 +3,6 @@ import {
|
||||
Anchor,
|
||||
Box,
|
||||
Button,
|
||||
Checkbox,
|
||||
Code,
|
||||
Container,
|
||||
Divider,
|
||||
@@ -31,6 +30,7 @@ import { Alert } from "@/components/Alert"
|
||||
import { CategorySelect } from "@/components/content/add/CategorySelect"
|
||||
import { FilteringExpressionEditor } from "@/components/content/edit/FilteringExpressionEditor"
|
||||
import { Loader } from "@/components/Loader"
|
||||
import { ReceivePushNotificationsChechbox } from "@/components/ReceivePushNotificationsChechbox"
|
||||
import { RelativeDate } from "@/components/RelativeDate"
|
||||
|
||||
export function FeedDetailsPage() {
|
||||
@@ -143,6 +143,7 @@ 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" })} />
|
||||
<Input.Wrapper
|
||||
label={<Trans>Filtering expression</Trans>}
|
||||
description={
|
||||
@@ -164,10 +165,6 @@ export function FeedDetailsPage() {
|
||||
<FilteringExpressionEditor initialValue={feed.filter} onChange={value => form.setFieldValue("filter", value)} />
|
||||
</Box>
|
||||
</Input.Wrapper>
|
||||
<Checkbox
|
||||
label={<Trans>Receive notifications</Trans>}
|
||||
{...form.getInputProps("notifyOnNewEntries", { type: "checkbox" })}
|
||||
/>
|
||||
|
||||
<Group>
|
||||
<Button variant="default" onClick={async () => await dispatch(redirectToSelectedSource())}>
|
||||
|
||||
@@ -3,8 +3,8 @@ import { Container, Tabs } from "@mantine/core"
|
||||
import { TbBell, TbCode, TbPhoto, TbUser } from "react-icons/tb"
|
||||
import { CustomCodeSettings } from "@/components/settings/CustomCodeSettings"
|
||||
import { DisplaySettings } from "@/components/settings/DisplaySettings"
|
||||
import { NotificationSettings } from "@/components/settings/NotificationSettings"
|
||||
import { ProfileSettings } from "@/components/settings/ProfileSettings"
|
||||
import { PushNotificationSettings } from "@/components/settings/PushNotificationSettings"
|
||||
|
||||
export function SettingsPage() {
|
||||
return (
|
||||
@@ -14,8 +14,8 @@ export function SettingsPage() {
|
||||
<Tabs.Tab value="display" leftSection={<TbPhoto size={16} />}>
|
||||
<Trans>Display</Trans>
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab value="notifications" leftSection={<TbBell size={16} />}>
|
||||
<Trans>Notifications</Trans>
|
||||
<Tabs.Tab value="push-notifications" leftSection={<TbBell size={16} />}>
|
||||
<Trans>Push notifications</Trans>
|
||||
</Tabs.Tab>
|
||||
<Tabs.Tab value="customCode" leftSection={<TbCode size={16} />}>
|
||||
<Trans>Custom code</Trans>
|
||||
@@ -29,8 +29,8 @@ export function SettingsPage() {
|
||||
<DisplaySettings />
|
||||
</Tabs.Panel>
|
||||
|
||||
<Tabs.Panel value="notifications" pt="xl">
|
||||
<NotificationSettings />
|
||||
<Tabs.Panel value="push-notifications" pt="xl">
|
||||
<PushNotificationSettings />
|
||||
</Tabs.Panel>
|
||||
|
||||
<Tabs.Panel value="customCode" pt="xl">
|
||||
|
||||
Reference in New Issue
Block a user