Files
commafeed/commafeed-client/src/app/constants.ts

36 lines
970 B
TypeScript
Raw Normal View History

2022-08-19 10:34:04 +02:00
import { t } from "@lingui/macro"
import { DEFAULT_THEME } from "@mantine/core"
2022-08-19 10:34:04 +02:00
import { Category } from "./types"
2022-08-19 10:34:04 +02:00
const categories: { [key: string]: Category } = {
all: {
id: "all",
name: t`All`,
expanded: false,
children: [],
feeds: [],
position: 0,
},
starred: {
id: "starred",
name: t`Starred`,
expanded: false,
children: [],
feeds: [],
position: 1,
},
2022-08-19 10:34:04 +02:00
}
export const Constants = {
categories,
layout: {
mobileBreakpoint: DEFAULT_THEME.breakpoints.md,
headerHeight: 60,
sidebarWidth: 350,
isTopVisible: (div: HTMLDivElement) => div.getBoundingClientRect().top >= Constants.layout.headerHeight,
isBottomVisible: (div: HTMLDivElement) => div.getBoundingClientRect().bottom <= window.innerHeight,
},
dom: {
mainScrollAreaId: "main-scroll-area-id",
},
}