mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-03-03 03:07:01 +00:00
style: prettier reformatting of the entire codebase
Former-commit-id: 6ad2fac2e9cab83dd484e90e80732067d22616e8 [formerly 0834b7e2aaeb6a04e31f5f04cf88f01b2c256986] [formerly a4dcf0af4dfe6fcf744184676baa2d4caeb40fc7 [formerly 9632ffb6671d8f30ca33c51bda106c299a4c07da]] Former-commit-id: 23ac95ccea08e36479fe17ac5ae4c2bdc4d77119 [formerly 450788517ac9fabdc16607b8f41785bb5c55917e] Former-commit-id: 256d0df6be62899478c8a3a5258f296649f4672d
This commit is contained in:
@@ -3,6 +3,7 @@ Generate TypeScript prop interface docstrings following this exact convention:
|
||||
**FORMAT**: Use single-line JSDoc `/** Description. */`
|
||||
|
||||
**PHRASING RULES**:
|
||||
|
||||
- Boolean props: "Whether the [component] is [state/condition]."
|
||||
- Callback functions: "Callback function called when [event/condition]."
|
||||
- String/value props: "The [description] [additional context]."
|
||||
@@ -15,6 +16,7 @@ Generate TypeScript prop interface docstrings following this exact convention:
|
||||
- Callbacks with changes: "Callback function called when the [property] changes."
|
||||
|
||||
**SPECIAL PATTERNS**:
|
||||
|
||||
- For defaults: "The [description]. Defaults to '[value]'."
|
||||
- For Tailwind CSS: "Additional CSS class names to apply to the [element]. Use `!` suffix for Tailwind CSS class overrides."
|
||||
- For i18n namespace: "The i18n namespace for internationalization. See the [main documentation](https://docs.lifeforge.melvinchia.dev) for more details."
|
||||
@@ -22,6 +24,7 @@ Generate TypeScript prop interface docstrings following this exact convention:
|
||||
- For tProps props: "Additional properties for the translation function. Used for dynamic translations. See the [i18n documentation](https://docs.lifeforge.melvinchia.dev) for more details."
|
||||
|
||||
**REQUIREMENTS**:
|
||||
|
||||
- Start with capital letter, end with period
|
||||
- Be concise but descriptive
|
||||
- Use consistent terminology across similar props
|
||||
|
||||
10
.prettierrc
10
.prettierrc
@@ -8,11 +8,9 @@
|
||||
"@trivago/prettier-plugin-sort-imports",
|
||||
"prettier-plugin-tailwindcss"
|
||||
],
|
||||
"importOrder": [
|
||||
"^shared/(.*)$",
|
||||
"@apps/(.*)$",
|
||||
"^[./]"
|
||||
],
|
||||
"importOrder": ["^shared/(.*)$", "@apps/(.*)$", "^[./]"],
|
||||
"importOrderSeparation": true,
|
||||
"importOrderSortSpecifiers": true
|
||||
"importOrderSortSpecifiers": true,
|
||||
"tabWidth": 2,
|
||||
"bracketSameLine": false
|
||||
}
|
||||
7
.vscode/settings.json
vendored
7
.vscode/settings.json
vendored
@@ -1,10 +1,5 @@
|
||||
{
|
||||
"cSpell.words": [
|
||||
"ITMDB",
|
||||
"nuqs",
|
||||
"Sizer",
|
||||
"subnamespace"
|
||||
],
|
||||
"cSpell.words": ["ITMDB", "nuqs", "Sizer", "subnamespace"],
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"typescript.experimental.useTsgo": false
|
||||
}
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -172,8 +172,9 @@ function AnnasModal({ onClose }: { onClose: () => void }) {
|
||||
</span>
|
||||
</p>
|
||||
<p className="text-bg-500 text-sm font-light">
|
||||
{data.total} result{data.total !== 1 ? 's' : ''} found on
|
||||
page {currentPage} of {data.totalPages}
|
||||
{data.total} result
|
||||
{data.total !== 1 ? 's' : ''} found on page {currentPage} of{' '}
|
||||
{data.totalPages}
|
||||
</p>
|
||||
</div>
|
||||
<Pagination
|
||||
|
||||
@@ -26,7 +26,9 @@ function ModifyModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['booksLibrary', stuff] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['booksLibrary', stuff]
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error(`Failed to ${type} ${_.camelCase(stuff)}`)
|
||||
|
||||
@@ -79,7 +79,10 @@ function BooksLibrary() {
|
||||
new
|
||||
</Button>
|
||||
}
|
||||
classNames={{ wrapper: 'hidden md:block', menu: 'w-64' }}
|
||||
classNames={{
|
||||
wrapper: 'hidden md:block',
|
||||
menu: 'w-64'
|
||||
}}
|
||||
>
|
||||
<ContextMenuItem
|
||||
icon="tabler:upload"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -5,6 +5,7 @@ import { forgeController, forgeRouter } from '@functions/routes'
|
||||
import { ClientError } from '@functions/routes/utils/response'
|
||||
import { addToTaskPool, updateTaskInPool } from '@functions/socketio/taskPool'
|
||||
import convertPDFToImage from '@functions/utils/convertPDFToImage'
|
||||
import { SCHEMAS } from '@schema'
|
||||
import { EPub } from 'epub2'
|
||||
import { countWords } from 'epub-wordcount'
|
||||
import fs from 'fs'
|
||||
@@ -14,8 +15,6 @@ import mailer from 'nodemailer'
|
||||
import pdfPageCounter from 'pdf-page-counter'
|
||||
import z from 'zod'
|
||||
|
||||
import { SCHEMAS } from '@schema'
|
||||
|
||||
const list = forgeController
|
||||
.query()
|
||||
.description(
|
||||
|
||||
@@ -39,7 +39,10 @@ function EventDetailsHeader({
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.setQueryData(
|
||||
forgeAPI.calendar.events.getByDateRange.input({ start, end }).key,
|
||||
forgeAPI.calendar.events.getByDateRange.input({
|
||||
start,
|
||||
end
|
||||
}).key,
|
||||
(oldData: CalendarEvent[]) => {
|
||||
return oldData.filter(item => item.id !== event.id)
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ function EventItemButton({
|
||||
title,
|
||||
color,
|
||||
icon,
|
||||
isStrikethrough,
|
||||
isStrikethrough
|
||||
}: {
|
||||
id: string
|
||||
title: string
|
||||
|
||||
@@ -23,7 +23,9 @@ function ModifyCalendarModal({
|
||||
const mutation = useMutation(
|
||||
(type === 'create'
|
||||
? forgeAPI.calendar.calendars.create
|
||||
: forgeAPI.calendar.calendars.update.input({ id: initialData?.id || '' })
|
||||
: forgeAPI.calendar.calendars.update.input({
|
||||
id: initialData?.id || ''
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({
|
||||
|
||||
@@ -124,8 +124,16 @@ function ModifyEventModal({
|
||||
required: true,
|
||||
icon: 'tabler:calendar',
|
||||
options: [
|
||||
{ value: 'single', text: 'Single Event', icon: 'tabler:calendar' },
|
||||
{ value: 'recurring', text: 'Recurring Event', icon: 'tabler:repeat' }
|
||||
{
|
||||
value: 'single',
|
||||
text: 'Single Event',
|
||||
icon: 'tabler:calendar'
|
||||
},
|
||||
{
|
||||
value: 'recurring',
|
||||
text: 'Recurring Event',
|
||||
icon: 'tabler:repeat'
|
||||
}
|
||||
],
|
||||
disabled: type === 'update'
|
||||
},
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -211,7 +211,11 @@ export default async function getEvents({
|
||||
await pb.getFullList
|
||||
.collection('movies__entries')
|
||||
.filter([
|
||||
{ field: 'theatre_showtime', operator: '>=', value: startMoment },
|
||||
{
|
||||
field: 'theatre_showtime',
|
||||
operator: '>=',
|
||||
value: startMoment
|
||||
},
|
||||
{ field: 'theatre_showtime', operator: '<=', value: endMoment }
|
||||
])
|
||||
.execute()
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -38,7 +38,9 @@ function FolderContextMenu({
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['ideaBox', 'folders'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['ideaBox', 'folders']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(`Failed to delete folder: ${error.message}`)
|
||||
|
||||
@@ -47,7 +47,9 @@ function IdeaAndFolderList() {
|
||||
children: 'new',
|
||||
onClick: handleIdeaCreation,
|
||||
icon: 'tabler:plus',
|
||||
tProps: { item: t('items.idea') }
|
||||
tProps: {
|
||||
item: t('items.idea')
|
||||
}
|
||||
}}
|
||||
icon="tabler:bulb-off"
|
||||
name="idea"
|
||||
|
||||
@@ -28,7 +28,9 @@ function ModifyFolderModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['ideaBox', 'folders'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['ideaBox', 'folders']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(`Failed to ${type} folder: ${error.message}`)
|
||||
|
||||
@@ -84,8 +84,16 @@ function ModifyIdeaModal({
|
||||
text: t('entryType.text'),
|
||||
icon: 'tabler:text-size'
|
||||
},
|
||||
{ value: 'link', text: t('entryType.link'), icon: 'tabler:link' },
|
||||
{ value: 'image', text: t('entryType.image'), icon: 'tabler:photo' }
|
||||
{
|
||||
value: 'link',
|
||||
text: t('entryType.link'),
|
||||
icon: 'tabler:link'
|
||||
},
|
||||
{
|
||||
value: 'image',
|
||||
text: t('entryType.image'),
|
||||
icon: 'tabler:photo'
|
||||
}
|
||||
],
|
||||
disabled: type === 'update'
|
||||
},
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -56,11 +56,15 @@ function AudioType({
|
||||
setCurrentTime(0)
|
||||
setTotalTime(0)
|
||||
|
||||
const stream = await navigator.mediaDevices.getUserMedia({ audio: true })
|
||||
const stream = await navigator.mediaDevices.getUserMedia({
|
||||
audio: true
|
||||
})
|
||||
|
||||
streamRef.current = stream
|
||||
|
||||
const mediaRecorder = new MediaRecorder(stream, { mimeType: 'audio/webm' })
|
||||
const mediaRecorder = new MediaRecorder(stream, {
|
||||
mimeType: 'audio/webm'
|
||||
})
|
||||
|
||||
mediaRecorderRef.current = mediaRecorder
|
||||
audioChunksRef.current = []
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -18,7 +18,10 @@ const moviesSchemas = {
|
||||
theatre_seat: z.string(),
|
||||
theatre_showtime: z.string(),
|
||||
theatre_location: z.string(),
|
||||
theatre_location_coords: z.object({ lat: z.number(), lon: z.number() }),
|
||||
theatre_location_coords: z.object({
|
||||
lat: z.number(),
|
||||
lon: z.number()
|
||||
}),
|
||||
theatre_number: z.string(),
|
||||
is_watched: z.boolean()
|
||||
}),
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -77,7 +77,9 @@ function ContentContainer({ masterPassword }: { masterPassword: string }) {
|
||||
)
|
||||
} catch {
|
||||
toast.error(t('error.pin'))
|
||||
queryClient.invalidateQueries({ queryKey: ['passwords', 'entries'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['passwords', 'entries']
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,9 @@ function PasswordEntryItem({
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['passwords', 'entries'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['passwords', 'entries']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete password. Please try again.')
|
||||
|
||||
@@ -31,7 +31,9 @@ function ModifyPasswordModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['passwords', 'entries'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['passwords', 'entries']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to modify password entry')
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -86,7 +86,9 @@ function Header({
|
||||
if (data.status === 'completed') {
|
||||
toast.done(toastId.current!)
|
||||
toastId.current = null
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -36,7 +36,9 @@ function SidebarTypeItem({
|
||||
const deleteMutation = useMutation(
|
||||
forgeAPI.scoresLibrary.types.remove.input({ id: data.id }).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete type')
|
||||
|
||||
@@ -30,7 +30,9 @@ function SidebarCollectionItem({
|
||||
.input({ id: data.id })
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete collection')
|
||||
|
||||
@@ -21,7 +21,9 @@ function ModifyEntryModal({
|
||||
.input({ id: initialData.id })
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
onClose()
|
||||
}
|
||||
})
|
||||
|
||||
@@ -19,7 +19,9 @@ function ModifyTypeModal({
|
||||
const mutation = useMutation(
|
||||
(openType === 'create'
|
||||
? forgeAPI.scoresLibrary.types.create
|
||||
: forgeAPI.scoresLibrary.types.update.input({ id: initialData?.id || '' })
|
||||
: forgeAPI.scoresLibrary.types.update.input({
|
||||
id: initialData?.id || ''
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
|
||||
@@ -44,7 +44,9 @@ function EntryItem({ entry }: { entry: ScoreLibraryEntry }) {
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to toggle favourite status')
|
||||
@@ -59,7 +61,9 @@ function EntryItem({ entry }: { entry: ScoreLibraryEntry }) {
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete entry')
|
||||
|
||||
@@ -44,7 +44,9 @@ function EntryItem({ entry }: { entry: ScoreLibraryEntry }) {
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to toggle favourite status')
|
||||
@@ -59,7 +61,9 @@ function EntryItem({ entry }: { entry: ScoreLibraryEntry }) {
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['scoresLibrary'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['scoresLibrary']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete entry')
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -91,8 +91,16 @@ const list = forgeController
|
||||
{
|
||||
combination: '||',
|
||||
filters: [
|
||||
{ field: 'name', operator: '~', value: query || '' },
|
||||
{ field: 'author', operator: '~', value: query || '' }
|
||||
{
|
||||
field: 'name',
|
||||
operator: '~',
|
||||
value: query || ''
|
||||
},
|
||||
{
|
||||
field: 'author',
|
||||
operator: '~',
|
||||
value: query || ''
|
||||
}
|
||||
]
|
||||
},
|
||||
...(category
|
||||
@@ -115,12 +123,20 @@ const list = forgeController
|
||||
: []),
|
||||
...(collection
|
||||
? ([
|
||||
{ field: 'collection', operator: '=', value: collection }
|
||||
{
|
||||
field: 'collection',
|
||||
operator: '=',
|
||||
value: collection
|
||||
}
|
||||
] as const)
|
||||
: []),
|
||||
...(starred
|
||||
? ([
|
||||
{ field: 'isFavourite', operator: '=', value: starred }
|
||||
{
|
||||
field: 'isFavourite',
|
||||
operator: '=',
|
||||
value: starred
|
||||
}
|
||||
] as const)
|
||||
: [])
|
||||
])
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -26,7 +26,9 @@ function ModifyListModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['todoList', 'lists'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['todoList', 'lists']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(`Failed to ${type} list: ${error.message}`)
|
||||
|
||||
@@ -26,7 +26,9 @@ function ModifyPriorityModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['todoList', 'priorities'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['todoList', 'priorities']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(`Failed to ${type} priority: ${error.message}`)
|
||||
|
||||
@@ -26,7 +26,9 @@ function ModifyTagModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['todoList', 'tags'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['todoList', 'tags']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(`Failed to ${type} tag: ${error.message}`)
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { useWalletStore } from '@/stores/useWalletStore'
|
||||
import numberToCurrency from '@/utils/numberToCurrency'
|
||||
import { Icon } from '@iconify/react/dist/iconify.js'
|
||||
import clsx from 'clsx'
|
||||
|
||||
import numberToCurrency from '../../../utils/numberToCurrency'
|
||||
|
||||
function Amount({ amount, className }: { amount: number; className?: string }) {
|
||||
const { isAmountHidden } = useWalletStore()
|
||||
|
||||
|
||||
@@ -31,7 +31,9 @@ function AssetItem({ asset }: { asset: WalletAsset }) {
|
||||
})
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'assets'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'assets']
|
||||
})
|
||||
},
|
||||
onError: (error: Error) => {
|
||||
toast.error('Failed to delete asset: ' + error.message)
|
||||
|
||||
@@ -25,7 +25,9 @@ function ModifyAssetModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'assets'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'assets']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(
|
||||
|
||||
@@ -27,7 +27,9 @@ function LedgerItem({ ledger }: { ledger: WalletLedger }) {
|
||||
const deleteMutation = useMutation(
|
||||
forgeAPI.wallet.ledgers.remove.input({ id: ledger.id }).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'ledgers'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'ledgers']
|
||||
})
|
||||
},
|
||||
onError: (error: Error) => {
|
||||
toast.error('Failed to delete ledger: ' + error.message)
|
||||
|
||||
@@ -25,7 +25,9 @@ function ModifyLedgerModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'ledgers'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'ledgers']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(
|
||||
|
||||
@@ -125,7 +125,9 @@ function Transactions() {
|
||||
<Button
|
||||
className="hidden md:flex"
|
||||
icon="tabler:plus"
|
||||
tProps={{ item: t('apps.wallet:items.transaction') }}
|
||||
tProps={{
|
||||
item: t('apps.wallet:items.transaction')
|
||||
}}
|
||||
onClick={() => {}}
|
||||
>
|
||||
new
|
||||
@@ -182,7 +184,9 @@ function Transactions() {
|
||||
children: 'new',
|
||||
icon: 'tabler:plus',
|
||||
onClick: handleCreateTransaction,
|
||||
tProps: { item: t('items.transaction') }
|
||||
tProps: {
|
||||
item: t('items.transaction')
|
||||
}
|
||||
}}
|
||||
icon="tabler:wallet-off"
|
||||
name="transactions"
|
||||
|
||||
@@ -33,7 +33,9 @@ function CategoryItem({ category }: { category: WalletCategory }) {
|
||||
.input({ id: category.id })
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'categories'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'categories']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete category')
|
||||
|
||||
@@ -46,7 +46,9 @@ function TemplateItem({
|
||||
.input({ id: template.id })
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'templates'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'templates']
|
||||
})
|
||||
},
|
||||
onError: () => {
|
||||
toast.error('Failed to delete template')
|
||||
|
||||
@@ -106,7 +106,9 @@ function ManageTemplatesModal({
|
||||
type: 'create'
|
||||
})
|
||||
},
|
||||
tProps: { item: t('items.template') }
|
||||
tProps: {
|
||||
item: t('items.template')
|
||||
}
|
||||
}}
|
||||
icon="tabler:template-off"
|
||||
name="templates"
|
||||
|
||||
@@ -30,7 +30,9 @@ function ModifyCategoryModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'categories'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'categories']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(
|
||||
|
||||
@@ -37,7 +37,9 @@ function ModifyTemplatesModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wallet', 'templates'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wallet', 'templates']
|
||||
})
|
||||
},
|
||||
onError: error => {
|
||||
toast.error(`Failed to ${type} template: ${error.message}`)
|
||||
|
||||
@@ -127,7 +127,9 @@ function Details({ transaction }: { transaction: WalletTransaction }) {
|
||||
<Icon
|
||||
className="size-5"
|
||||
icon={ledgerItem.icon}
|
||||
style={{ color: ledgerItem.color }}
|
||||
style={{
|
||||
color: ledgerItem.color
|
||||
}}
|
||||
/>
|
||||
{ledgerItem.name}
|
||||
</li>
|
||||
|
||||
@@ -3,12 +3,7 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
@@ -27,17 +22,12 @@
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -36,7 +36,10 @@ function EntryItem({ entry }: { entry: WishlistEntry }) {
|
||||
.mutationOptions({
|
||||
onSuccess: () => {
|
||||
setTimeout(
|
||||
() => queryClient.invalidateQueries({ queryKey: ['wishlist'] }),
|
||||
() =>
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wishlist']
|
||||
}),
|
||||
500
|
||||
)
|
||||
},
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import forgeAPI from '@/utils/forgeAPI'
|
||||
import { Menu, MenuButton, MenuItems } from '@headlessui/react'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { useDebounce } from '@uidotdev/usehooks'
|
||||
import forgeAPI from '@/utils/forgeAPI'
|
||||
import {
|
||||
Button,
|
||||
ContextMenuItem,
|
||||
|
||||
@@ -25,7 +25,9 @@ function ModifyWishlistListModal({
|
||||
})
|
||||
).mutationOptions({
|
||||
onSuccess: () => {
|
||||
queryClient.invalidateQueries({ queryKey: ['wishlist', 'lists'] })
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['wishlist', 'lists']
|
||||
})
|
||||
}
|
||||
})
|
||||
)
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -174,7 +174,10 @@ function CaptionSelector({
|
||||
key={language}
|
||||
icon="tabler:language"
|
||||
label={meta[0].name ?? ''}
|
||||
value={JSON.stringify({ language, meta })}
|
||||
value={JSON.stringify({
|
||||
language,
|
||||
meta
|
||||
})}
|
||||
/>
|
||||
))}
|
||||
</ListboxInput>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import forgeAPI from '@/utils/forgeAPI'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { useDebounce } from '@uidotdev/usehooks'
|
||||
import forgeAPI from '@/utils/forgeAPI'
|
||||
import {
|
||||
EmptyStateScreen,
|
||||
ModuleHeader,
|
||||
|
||||
@@ -3,45 +3,31 @@
|
||||
// JSX and Language Settings
|
||||
"jsx": "react-jsx",
|
||||
"target": "ES2020",
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
// Module Resolution
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
|
||||
// Build and Output
|
||||
"composite": true,
|
||||
"noEmit": true,
|
||||
"skipLibCheck": true,
|
||||
|
||||
// Type Checking
|
||||
"strict": true,
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true,
|
||||
"useDefineForClassFields": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
|
||||
// Path Mapping
|
||||
"paths": {
|
||||
"@": [
|
||||
"./src/index"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../../../server/src/*"
|
||||
]
|
||||
"@": ["./src/index"],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../../../server/src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["./src/**/*", "./manifest.ts"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../../server/tsconfig.json"
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Icon } from '@iconify/react'
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
import clsx from 'clsx'
|
||||
import { EmptyStateScreen, LoadingScreen } from 'lifeforge-ui'
|
||||
import { useEffect, useState } from 'react'
|
||||
@@ -8,6 +7,7 @@ import { useTranslation } from 'react-i18next'
|
||||
import { useSidebarState } from 'shared'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
import DASHBOARD_WIDGETS from '../widgets'
|
||||
|
||||
const RGL: any = ResponsiveGridLayout as any
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { Icon } from '@iconify/react'
|
||||
import { useUserPersonalization } from '../../../../../../providers/UserPersonalizationProvider'
|
||||
import clsx from 'clsx'
|
||||
import { Switch } from 'lifeforge-ui'
|
||||
import { useMemo } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { type IDashboardLayout, usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../../../providers/UserPersonalizationProvider'
|
||||
|
||||
function ComponentListItem({
|
||||
id,
|
||||
icon,
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useUserPersonalization } from '../../../../../../../providers/UserPersonalizationProvider'
|
||||
import { Button, ModalHeader } from 'lifeforge-ui'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../../../../providers/UserPersonalizationProvider'
|
||||
import AdjustmentColumn from './components/AdjustmentColumn'
|
||||
import ResultShowcase from './components/ResultShowcase'
|
||||
import { BG_BLURS } from './constants/bg_blurs'
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import { Icon } from '@iconify/react'
|
||||
import { useUserPersonalization } from '../../../../../../providers/UserPersonalizationProvider'
|
||||
import clsx from 'clsx'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { useUserPersonalization } from '../../../../../../providers/UserPersonalizationProvider'
|
||||
|
||||
const COLORS = ['bg-slate', 'bg-gray', 'bg-zinc', 'bg-neutral', 'bg-stone']
|
||||
|
||||
function DefaultBgTempSelector({ bgTemp }: { bgTemp: string }) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Icon } from '@iconify/react'
|
||||
import { useUserPersonalization } from '../../../../../providers/UserPersonalizationProvider'
|
||||
import clsx from 'clsx'
|
||||
import { Button, ColorInput, ConfigColumn } from 'lifeforge-ui'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../../providers/UserPersonalizationProvider'
|
||||
import DefaultBgTempSelector from './components/DefaultBgTempSelector'
|
||||
|
||||
function BgTempSelector() {
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
import { Button, ConfigColumn, SliderInput } from 'lifeforge-ui'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
|
||||
function FontScaleSelector() {
|
||||
const { fontScale } = usePersonalization()
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { Icon } from '@iconify/react/dist/iconify.js'
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
import { ConfigColumn, Listbox, ListboxOption } from 'lifeforge-ui'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
|
||||
const LANGUAGES: Array<{
|
||||
name: string
|
||||
code: string
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import { useUserPersonalization } from '../../../../../../providers/UserPersonalizationProvider'
|
||||
import clsx from 'clsx'
|
||||
import { Listbox, ListboxOption } from 'lifeforge-ui'
|
||||
import _ from 'lodash'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { useUserPersonalization } from '../../../../../../providers/UserPersonalizationProvider'
|
||||
|
||||
const COLORS = [
|
||||
'red',
|
||||
'pink',
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { useUserPersonalization } from '../../../../../providers/UserPersonalizationProvider'
|
||||
import { Button, ColorInput, ConfigColumn } from 'lifeforge-ui'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../../providers/UserPersonalizationProvider'
|
||||
import DefaultThemeColorSelector from './components/DefaultThemeColorSelector'
|
||||
|
||||
function ThemeColorSelector() {
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
import { Icon } from '@iconify/react'
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
import clsx from 'clsx'
|
||||
import { ConfigColumn } from 'lifeforge-ui'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { usePersonalization } from 'shared'
|
||||
|
||||
import { useUserPersonalization } from '../../../../providers/UserPersonalizationProvider'
|
||||
|
||||
function ThemeSelector() {
|
||||
const { theme } = usePersonalization()
|
||||
|
||||
|
||||
@@ -4,8 +4,8 @@ import { useModalStore } from 'lifeforge-ui'
|
||||
import _ from 'lodash'
|
||||
import { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
import ModifyModal from '../modals/ModifyModal'
|
||||
|
||||
function OrdinaryColumn({
|
||||
|
||||
@@ -2,8 +2,8 @@ import { ConfigColumn, Switch } from 'lifeforge-ui'
|
||||
import { useModalStore } from 'lifeforge-ui'
|
||||
import { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
import DisableTwoFAModal from '../modals/DisableTwoFAModal'
|
||||
import EnableTwoFAModal from '../modals/EnableTwoFAModal'
|
||||
|
||||
|
||||
@@ -3,8 +3,8 @@ import { ModalHeader, WithOTP } from 'lifeforge-ui'
|
||||
import { useCallback } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { toast } from 'react-toastify'
|
||||
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
import TwoFAEnableProcedure from './components/TwoFAEnableProcedure'
|
||||
|
||||
function EnableTwoFAModal({ onClose }: { onClose: () => void }) {
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import forgeAPI from '@/utils/forgeAPI'
|
||||
import { useMutation } from '@tanstack/react-query'
|
||||
import { FormModal, defineForm } from 'lifeforge-ui'
|
||||
import _ from 'lodash'
|
||||
import { toast } from 'react-toastify'
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
import forgeAPI from '@/utils/forgeAPI'
|
||||
|
||||
function ModifyModal<TType extends 'datetime' | 'text'>({
|
||||
data: { type, title, id, icon },
|
||||
onClose
|
||||
|
||||
@@ -5,8 +5,8 @@ import { useTranslation } from 'react-i18next'
|
||||
import { useSearchParams } from 'react-router'
|
||||
import { toast } from 'react-toastify'
|
||||
import { usePromiseLoading } from 'shared'
|
||||
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
import AuthSignInButton from './AuthSignInButtons'
|
||||
|
||||
function AuthForm({ providers }: { providers: string[] }) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { Button } from 'lifeforge-ui'
|
||||
import { memo } from 'react'
|
||||
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
function SignInButton({
|
||||
|
||||
@@ -2,8 +2,8 @@ import { Button, ModalHeader } from 'lifeforge-ui'
|
||||
import { useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { toast } from 'react-toastify'
|
||||
|
||||
import { useAuth } from 'shared'
|
||||
|
||||
import UsingAuthApp from './components/UsingAuthApp'
|
||||
import UsingEmail from './components/UsingEmail'
|
||||
|
||||
|
||||
@@ -24,7 +24,8 @@ function SidebarHeader({
|
||||
<Icon className="text-custom-500 size-6" icon="tabler:hammer" />
|
||||
{sidebarExpanded && (
|
||||
<div>
|
||||
LifeForge<span className="text-custom-500 text-2xl">.</span>
|
||||
LifeForge
|
||||
<span className="text-custom-500 text-2xl">.</span>
|
||||
</div>
|
||||
)}
|
||||
</h1>
|
||||
|
||||
@@ -2,17 +2,10 @@
|
||||
"compilerOptions": {
|
||||
"target": "ES2020",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": [
|
||||
"ES2020",
|
||||
"DOM",
|
||||
"DOM.Iterable",
|
||||
"ES2024.Object"
|
||||
],
|
||||
"lib": ["ES2020", "DOM", "DOM.Iterable", "ES2024.Object"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"types": [
|
||||
"node"
|
||||
],
|
||||
"types": ["node"],
|
||||
/* Bundler mode */
|
||||
"outDir": "${configDir}/tsbuild",
|
||||
"moduleResolution": "bundler",
|
||||
@@ -28,24 +21,12 @@
|
||||
"composite": true,
|
||||
"rootDir": "../",
|
||||
"paths": {
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"@server/*": [
|
||||
"../server/src/*"
|
||||
],
|
||||
"@modules/*": [
|
||||
"../apps/*"
|
||||
],
|
||||
"@/*": ["./src/*"],
|
||||
"@server/*": ["../server/src/*"],
|
||||
"@modules/*": ["../apps/*"]
|
||||
}
|
||||
},
|
||||
"typeRoots": [
|
||||
"../server/src"
|
||||
],
|
||||
"include": [
|
||||
"./src/**/*",
|
||||
"../shared/src/utils/encryption.ts",
|
||||
],
|
||||
"include": ["./src/**/*"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../server/tsconfig.json"
|
||||
|
||||
@@ -84,11 +84,14 @@ function ComboboxInput<T>({
|
||||
}
|
||||
}, [])
|
||||
|
||||
const handleChange = useCallback((value: T | null) => {
|
||||
const handleChange = useCallback(
|
||||
(value: T | null) => {
|
||||
if (value !== null) {
|
||||
setValue(value)
|
||||
}
|
||||
}, [setValue])
|
||||
},
|
||||
[setValue]
|
||||
)
|
||||
|
||||
return (
|
||||
<ComboboxInputWrapper
|
||||
|
||||
@@ -50,7 +50,9 @@ function DnDContainer({
|
||||
if (imageItem) {
|
||||
const blob = await imageItem.getType('image/png')
|
||||
|
||||
const file = new File([blob], 'pasted-image.png', { type: 'image/png' })
|
||||
const file = new File([blob], 'pasted-image.png', {
|
||||
type: 'image/png'
|
||||
})
|
||||
|
||||
setFile(file)
|
||||
setPreview(URL.createObjectURL(file))
|
||||
|
||||
@@ -30,9 +30,7 @@ function ListboxOptions({
|
||||
'divide-bg-200 border-bg-200 dark:border-bg-700 z-9999 divide-y overflow-auto rounded-md border',
|
||||
lighter ? 'bg-bg-50' : 'bg-bg-100',
|
||||
'text-bg-500 text-base shadow-lg transition duration-100 ease-out',
|
||||
type === 'listbox'
|
||||
? '[--anchor-gap:12px]'
|
||||
: '[--anchor-gap:22px]',
|
||||
type === 'listbox' ? '[--anchor-gap:12px]' : '[--anchor-gap:22px]',
|
||||
'dark:divide-bg-700/50 dark:border-bg-700 dark:bg-bg-800 empty:invisible focus:outline-hidden data-closed:scale-95 data-closed:opacity-0'
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -31,7 +31,10 @@ function YearlyForm({
|
||||
formId={`yearly.${form.id}`}
|
||||
selected={data.type === form.id}
|
||||
onSelect={() => {
|
||||
setData({ ...data, type: form.id as 'exactDate' | 'relativeDay' })
|
||||
setData({
|
||||
...data,
|
||||
type: form.id as 'exactDate' | 'relativeDay'
|
||||
})
|
||||
}}
|
||||
>
|
||||
{form.component}
|
||||
|
||||
@@ -139,7 +139,11 @@ function RRuleInput<HasDuration extends boolean = boolean>({
|
||||
<YearlyForm
|
||||
data={rruleParams.data as FreqSpecificParams['yearly']}
|
||||
setData={data =>
|
||||
setRRuleParams({ freq: 'yearly', data, end: rruleParams.end })
|
||||
setRRuleParams({
|
||||
freq: 'yearly',
|
||||
data,
|
||||
end: rruleParams.end
|
||||
})
|
||||
}
|
||||
/>
|
||||
),
|
||||
@@ -147,7 +151,11 @@ function RRuleInput<HasDuration extends boolean = boolean>({
|
||||
<MonthlyForm
|
||||
data={rruleParams.data as FreqSpecificParams['monthly']}
|
||||
setData={data =>
|
||||
setRRuleParams({ freq: 'monthly', data, end: rruleParams.end })
|
||||
setRRuleParams({
|
||||
freq: 'monthly',
|
||||
data,
|
||||
end: rruleParams.end
|
||||
})
|
||||
}
|
||||
/>
|
||||
),
|
||||
@@ -155,7 +163,11 @@ function RRuleInput<HasDuration extends boolean = boolean>({
|
||||
<WeeklyForm
|
||||
data={rruleParams.data as FreqSpecificParams['weekly']}
|
||||
setData={data =>
|
||||
setRRuleParams({ freq: 'weekly', data, end: rruleParams.end })
|
||||
setRRuleParams({
|
||||
freq: 'weekly',
|
||||
data,
|
||||
end: rruleParams.end
|
||||
})
|
||||
}
|
||||
/>
|
||||
),
|
||||
@@ -163,7 +175,11 @@ function RRuleInput<HasDuration extends boolean = boolean>({
|
||||
<DailyForm
|
||||
data={rruleParams.data as FreqSpecificParams['daily']}
|
||||
setData={data =>
|
||||
setRRuleParams({ freq: 'daily', data, end: rruleParams.end })
|
||||
setRRuleParams({
|
||||
freq: 'daily',
|
||||
data,
|
||||
end: rruleParams.end
|
||||
})
|
||||
}
|
||||
/>
|
||||
),
|
||||
@@ -171,7 +187,11 @@ function RRuleInput<HasDuration extends boolean = boolean>({
|
||||
<HourlyForm
|
||||
data={rruleParams.data as FreqSpecificParams['hourly']}
|
||||
setData={data =>
|
||||
setRRuleParams({ freq: 'hourly', data, end: rruleParams.end })
|
||||
setRRuleParams({
|
||||
freq: 'hourly',
|
||||
data,
|
||||
end: rruleParams.end
|
||||
})
|
||||
}
|
||||
/>
|
||||
)
|
||||
|
||||
@@ -58,9 +58,13 @@ const configureYearlyOptions = (
|
||||
options.bymonth = data.month
|
||||
options.bymonthday = data.date
|
||||
} else if (data.type === 'relativeDay') {
|
||||
options.bysetpos = { first: 1, second: 2, third: 3, fourth: 4, last: -1 }[
|
||||
data.onThe
|
||||
]
|
||||
options.bysetpos = {
|
||||
first: 1,
|
||||
second: 2,
|
||||
third: 3,
|
||||
fourth: 4,
|
||||
last: -1
|
||||
}[data.onThe]
|
||||
options.byweekday = getWeekdayOptions(data.onTheDay)
|
||||
options.bymonth = data.onTheDayOfMonth
|
||||
}
|
||||
@@ -76,9 +80,13 @@ const configureMonthlyOptions = (
|
||||
if (data.type === 'exactDate') {
|
||||
options.bymonthday = data.onDate
|
||||
} else if (data.type === 'relativeDay') {
|
||||
options.bysetpos = { first: 1, second: 2, third: 3, fourth: 4, last: -1 }[
|
||||
data.onThe
|
||||
]
|
||||
options.bysetpos = {
|
||||
first: 1,
|
||||
second: 2,
|
||||
third: 3,
|
||||
fourth: 4,
|
||||
last: -1
|
||||
}[data.onThe]
|
||||
options.byweekday = getWeekdayOptions(data.onTheDay)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,4 +20,3 @@ export const useModuleHeaderState = () => {
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
|
||||
@@ -158,7 +158,11 @@ const MyFormModal = ({ onClose }: { onClose: () => void }) => {
|
||||
]
|
||||
: []),
|
||||
{ text: 'Star', value: 'tabler:star', icon: 'tabler:star' },
|
||||
{ text: 'Check', value: 'tabler:check', icon: 'tabler:check' },
|
||||
{
|
||||
text: 'Check',
|
||||
value: 'tabler:check',
|
||||
icon: 'tabler:check'
|
||||
},
|
||||
{ text: 'X', value: 'tabler:x', icon: 'tabler:x' }
|
||||
]
|
||||
},
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React, { useState } from 'react'
|
||||
import type { ForgeAPIClientController } from 'shared'
|
||||
|
||||
import CreatePasswordScreen from './components/CreatePasswordScreen'
|
||||
import LockedScreen from './components/LockedScreen'
|
||||
import type { ForgeAPIClientController } from 'shared'
|
||||
|
||||
function WithMasterPassword({
|
||||
controllers,
|
||||
|
||||
@@ -4,18 +4,10 @@
|
||||
"jsx": "react-jsx",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"lib": [
|
||||
"dom",
|
||||
"dom.iterable",
|
||||
"esnext"
|
||||
],
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"paths": {
|
||||
"@components/*": [
|
||||
"./src/components/*"
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
]
|
||||
"@components/*": ["./src/components/*"],
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
"declaration": true,
|
||||
"emitDeclarationOnly": true,
|
||||
@@ -27,12 +19,10 @@
|
||||
"skipLibCheck": true,
|
||||
"verbatimModuleSyntax": true
|
||||
},
|
||||
"include": [
|
||||
"./src/**/*",
|
||||
],
|
||||
"include": ["./src/**/*"],
|
||||
"references": [
|
||||
{
|
||||
"path": "../../server/tsconfig.json"
|
||||
},
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -169,7 +169,10 @@ export class ForgeControllerBuilder<
|
||||
|
||||
builder._method = this._method as NewMethod
|
||||
builder._middlewares = [...this._middlewares]
|
||||
builder._schema = { ...this._schema, ...overrides } as unknown as NewInput
|
||||
builder._schema = {
|
||||
...this._schema,
|
||||
...overrides
|
||||
} as unknown as NewInput
|
||||
builder._media = media as NewMedia
|
||||
builder._statusCode = this._statusCode
|
||||
builder._existenceCheck = this._existenceCheck
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user