feat(client): remove module toggling mechanism

Former-commit-id: 13e5462dd5fb8cd9eb14be7f72c5802183b13308 [formerly e043da6ab67b27d12cba2784a30ab14e9773c2e0] [formerly f266e795ee4ddfedf4bea3507b952b25b7f66ba2 [formerly 967e71946fb621b01235306bcbe7168228fa0426]]
Former-commit-id: 907b0f09c09c192106cbfd76792f20e963ce57e5 [formerly e93aed6de30e4d20df781a3394fe22fe03b0b899]
Former-commit-id: 0cfa11c9f34c3dc6a27b78d55821f5fadef6976b
This commit is contained in:
melvinchia3636
2025-10-05 12:10:17 +08:00
parent fdb2fdfe3f
commit c7740a9dfe
53 changed files with 2000 additions and 2255 deletions

View File

@@ -14,5 +14,5 @@
"^[./]"
],
"importOrderSeparation": true,
"importOrderSortSpecifiers": true,
"importOrderSortSpecifiers": true
}

View File

@@ -7,6 +7,6 @@ export default {
routes: {
achievements: lazy(() => import('@'))
},
togglable: true,
category: '02.Lifestyle'
} satisfies ModuleConfig

View File

@@ -1,102 +1,102 @@
import { z } from "zod";
import z from 'zod'
const achievementsSchemas = {
entries: {
schema: z.object({
title: z.string(),
thoughts: z.string(),
difficulty: z.enum(["easy", "medium", "hard", "impossible"]),
difficulty: z.enum(['easy', 'medium', 'hard', 'impossible']),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "yqajgwlhsd8so4p",
id: 'yqajgwlhsd8so4p',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "achievements__entries",
type: "base",
name: 'achievements__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "ixmmysb1",
id: 'ixmmysb1',
max: 0,
min: 0,
name: "title",
pattern: "",
name: 'title',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "cy2emstv",
id: 'cy2emstv',
max: 0,
min: 0,
name: "thoughts",
pattern: "",
name: 'thoughts',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "auhot6r4",
id: 'auhot6r4',
maxSelect: 1,
name: "difficulty",
name: 'difficulty',
presentable: false,
required: true,
system: false,
type: "select",
values: ["easy", "medium", "hard", "impossible"],
type: 'select',
values: ['easy', 'medium', 'hard', 'impossible']
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default achievementsSchemas;
export default achievementsSchemas

View File

@@ -7,6 +7,6 @@ export default {
blog: lazy(() => import('@')),
'blog/compose': lazy(() => import('@/pages/Compose'))
},
togglable: true,
category: '02.Lifestyle'
}

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const blogSchemas = {
entries: {
@@ -7,251 +7,251 @@ const blogSchemas = {
title: z.string(),
media: z.array(z.string()),
excerpt: z.string(),
visibility: z.enum(["private", "public", "unlisted", ""]),
visibility: z.enum(['private', 'public', 'unlisted', '']),
featured_image: z.string(),
labels: z.any(),
category: z.string(),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "pbc_2526431808",
listRule: "",
viewRule: "",
id: 'pbc_2526431808',
listRule: '',
viewRule: '',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "blog__entries",
type: "base",
name: 'blog__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text4274335913",
id: 'text4274335913',
max: 1000000000000000,
min: 0,
name: "content",
pattern: "",
name: 'content',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text724990059",
id: 'text724990059',
max: 0,
min: 0,
name: "title",
pattern: "",
name: 'title',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "file1781309708",
id: 'file1781309708',
maxSelect: 9999,
maxSize: 9999999999,
mimeTypes: [],
name: "media",
name: 'media',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: [],
type: "file",
type: 'file'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1591429585",
id: 'text1591429585',
max: 0,
min: 0,
name: "excerpt",
pattern: "",
name: 'excerpt',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "select1368277760",
id: 'select1368277760',
maxSelect: 1,
name: "visibility",
name: 'visibility',
presentable: false,
required: false,
system: false,
type: "select",
values: ["private", "public", "unlisted"],
type: 'select',
values: ['private', 'public', 'unlisted']
},
{
hidden: false,
id: "file2624913349",
id: 'file2624913349',
maxSelect: 1,
maxSize: 0,
mimeTypes: [
"image/jpeg",
"image/png",
"image/svg+xml",
"image/gif",
"image/webp",
'image/jpeg',
'image/png',
'image/svg+xml',
'image/gif',
'image/webp'
],
name: "featured_image",
name: 'featured_image',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: [],
type: "file",
type: 'file'
},
{
hidden: false,
id: "json3050373649",
id: 'json3050373649',
maxSize: 0,
name: "labels",
name: 'labels',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
cascadeDelete: false,
collectionId: "pbc_2994309395",
collectionId: 'pbc_2994309395',
hidden: false,
id: "relation105650625",
id: 'relation105650625',
maxSelect: 1,
minSelect: 0,
name: "category",
name: 'category',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
system: false
}
},
categories: {
schema: z.object({
name: z.string(),
color: z.string(),
icon: z.string(),
icon: z.string()
}),
raw: {
id: "pbc_2994309395",
listRule: "",
id: 'pbc_2994309395',
listRule: '',
viewRule: null,
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "blog__categories",
type: "base",
name: 'blog__categories',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1579384326",
id: 'text1579384326',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1716930793",
id: 'text1716930793',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1704208859",
id: 'text1704208859',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_GuuYBxu9OR` ON `blog__categories` (`name`)",
'CREATE UNIQUE INDEX `idx_GuuYBxu9OR` ON `blog__categories` (`name`)'
],
system: false,
},
},
};
system: false
}
}
}
export default blogSchemas;
export default blogSchemas

View File

@@ -8,6 +8,6 @@ export default {
routes: {
'': lazy(() => import('@'))
},
togglable: true,
category: '04.Storage'
} satisfies ModuleConfig

View File

@@ -7,6 +7,6 @@ export default {
routes: {
calendar: lazy(() => import('@'))
},
togglable: true,
category: '01.Productivity'
} satisfies ModuleConfig

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const calendarSchemas = {
events: {
@@ -10,498 +10,498 @@ const calendarSchemas = {
location_coords: z.object({ lat: z.number(), lon: z.number() }),
reference_link: z.string(),
description: z.string(),
type: z.enum(["single", "recurring"]),
type: z.enum(['single', 'recurring']),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "aq4whvpwcarmpux",
id: 'aq4whvpwcarmpux',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "calendar__events",
type: "base",
name: 'calendar__events',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "flvfazzo",
id: 'flvfazzo',
max: 0,
min: 0,
name: "title",
pattern: "",
name: 'title',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
cascadeDelete: false,
collectionId: "lgqrpjmgz6rmsrg",
collectionId: 'lgqrpjmgz6rmsrg',
hidden: false,
id: "msdsakrs",
id: 'msdsakrs',
maxSelect: 1,
minSelect: 0,
name: "category",
name: 'category',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
cascadeDelete: false,
collectionId: "pbc_2912871855",
collectionId: 'pbc_2912871855',
hidden: false,
id: "relation1856610630",
id: 'relation1856610630',
maxSelect: 1,
minSelect: 0,
name: "calendar",
name: 'calendar',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1587448267",
id: 'text1587448267',
max: 0,
min: 0,
name: "location",
pattern: "",
name: 'location',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "geoPoint2468307335",
name: "location_coords",
id: 'geoPoint2468307335',
name: 'location_coords',
presentable: false,
required: false,
system: false,
type: "geoPoint",
type: 'geoPoint'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1097818449",
id: 'text1097818449',
max: 0,
min: 0,
name: "reference_link",
pattern: "",
name: 'reference_link',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3379474102",
id: 'text3379474102',
max: 0,
min: 0,
name: "description",
pattern: "",
name: 'description',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "select2363381545",
id: 'select2363381545',
maxSelect: 1,
name: "type",
name: 'type',
presentable: false,
required: true,
system: false,
type: "select",
values: ["single", "recurring"],
type: 'select',
values: ['single', 'recurring']
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
system: false
}
},
categories: {
schema: z.object({
name: z.string(),
color: z.string(),
icon: z.string(),
icon: z.string()
}),
raw: {
id: "lgqrpjmgz6rmsrg",
id: 'lgqrpjmgz6rmsrg',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "calendar__categories",
type: "base",
name: 'calendar__categories',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "5gljytxm",
id: '5gljytxm',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "p5zxtnom",
id: 'p5zxtnom',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "tamumamt",
id: 'tamumamt',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_isCrOV2gEh` ON `calendar__categories` (`name`)",
'CREATE UNIQUE INDEX `idx_isCrOV2gEh` ON `calendar__categories` (`name`)'
],
system: false,
},
system: false
}
},
calendars: {
schema: z.object({
name: z.string(),
color: z.string(),
link: z.url(),
last_synced: z.string(),
last_synced: z.string()
}),
raw: {
id: "pbc_2912871855",
id: 'pbc_2912871855',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "calendar__calendars",
type: "base",
name: 'calendar__calendars',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1579384326",
id: 'text1579384326',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1716930793",
id: 'text1716930793',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
exceptDomains: null,
hidden: false,
id: "url917281265",
name: "link",
id: 'url917281265',
name: 'link',
onlyDomains: null,
presentable: false,
required: false,
system: false,
type: "url",
type: 'url'
},
{
hidden: false,
id: "date2173440322",
max: "",
min: "",
name: "last_synced",
id: 'date2173440322',
max: '',
min: '',
name: 'last_synced',
presentable: false,
required: false,
system: false,
type: "date",
},
type: 'date'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_qUL2o05YBe` ON `calendar__calendars` (`name`)",
'CREATE UNIQUE INDEX `idx_qUL2o05YBe` ON `calendar__calendars` (`name`)'
],
system: false,
},
system: false
}
},
events_single: {
schema: z.object({
base_event: z.string(),
start: z.string(),
end: z.string(),
end: z.string()
}),
raw: {
id: "pbc_1417836082",
id: 'pbc_1417836082',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "calendar__events_single",
type: "base",
name: 'calendar__events_single',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
cascadeDelete: true,
collectionId: "aq4whvpwcarmpux",
collectionId: 'aq4whvpwcarmpux',
hidden: false,
id: "relation3233087073",
id: 'relation3233087073',
maxSelect: 1,
minSelect: 0,
name: "base_event",
name: 'base_event',
presentable: false,
required: true,
system: false,
type: "relation",
type: 'relation'
},
{
hidden: false,
id: "date2675529103",
max: "",
min: "",
name: "start",
id: 'date2675529103',
max: '',
min: '',
name: 'start',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "date16528305",
max: "",
min: "",
name: "end",
id: 'date16528305',
max: '',
min: '',
name: 'end',
presentable: false,
required: false,
system: false,
type: "date",
},
type: 'date'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_Z0MvNxCsxl` ON `calendar__events_single` (`base_event`)",
'CREATE UNIQUE INDEX `idx_Z0MvNxCsxl` ON `calendar__events_single` (`base_event`)'
],
system: false,
},
system: false
}
},
events_recurring: {
schema: z.object({
recurring_rule: z.string(),
duration_amount: z.number(),
duration_unit: z.enum(["hour", "year", "month", "day", "week"]),
duration_unit: z.enum(['hour', 'year', 'month', 'day', 'week']),
exceptions: z.any(),
base_event: z.string(),
base_event: z.string()
}),
raw: {
id: "pbc_2966426400",
id: 'pbc_2966426400',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "calendar__events_recurring",
type: "base",
name: 'calendar__events_recurring',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text581711714",
id: 'text581711714',
max: 0,
min: 0,
name: "recurring_rule",
pattern: "",
name: 'recurring_rule',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number3612257647",
id: 'number3612257647',
max: null,
min: null,
name: "duration_amount",
name: 'duration_amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
hidden: false,
id: "select2414572776",
id: 'select2414572776',
maxSelect: 1,
name: "duration_unit",
name: 'duration_unit',
presentable: false,
required: true,
system: false,
type: "select",
values: ["hour", "year", "month", "day", "week"],
type: 'select',
values: ['hour', 'year', 'month', 'day', 'week']
},
{
hidden: false,
id: "json678566752",
id: 'json678566752',
maxSize: 0,
name: "exceptions",
name: 'exceptions',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
cascadeDelete: true,
collectionId: "aq4whvpwcarmpux",
collectionId: 'aq4whvpwcarmpux',
hidden: false,
id: "relation2256903029",
id: 'relation2256903029',
maxSelect: 1,
minSelect: 0,
name: "base_event",
name: 'base_event',
presentable: false,
required: true,
system: false,
type: "relation",
},
type: 'relation'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_dyxH0lk7ka` ON `calendar__events_recurring` (`base_event`)",
'CREATE UNIQUE INDEX `idx_dyxH0lk7ka` ON `calendar__events_recurring` (`base_event`)'
],
system: false,
},
system: false
}
},
events_ical: {
schema: z.object({
@@ -512,142 +512,142 @@ const calendarSchemas = {
start: z.string(),
end: z.string(),
location: z.string(),
recurrence_rule: z.string(),
recurrence_rule: z.string()
}),
raw: {
id: "pbc_3588948690",
id: 'pbc_3588948690',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "calendar__events_ical",
type: "base",
name: 'calendar__events_ical',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
cascadeDelete: true,
collectionId: "pbc_2912871855",
collectionId: 'pbc_2912871855',
hidden: false,
id: "relation1856610630",
id: 'relation1856610630',
maxSelect: 1,
minSelect: 0,
name: "calendar",
name: 'calendar',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text2675300272",
id: 'text2675300272',
max: 0,
min: 0,
name: "external_id",
pattern: "",
name: 'external_id',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text724990059",
id: 'text724990059',
max: 0,
min: 0,
name: "title",
pattern: "",
name: 'title',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1843675174",
id: 'text1843675174',
max: 0,
min: 0,
name: "description",
pattern: "",
name: 'description',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "date2675529103",
max: "",
min: "",
name: "start",
id: 'date2675529103',
max: '',
min: '',
name: 'start',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "date16528305",
max: "",
min: "",
name: "end",
id: 'date16528305',
max: '',
min: '',
name: 'end',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1587448267",
id: 'text1587448267',
max: 0,
min: 0,
name: "location",
pattern: "",
name: 'location',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3329811012",
id: 'text3329811012',
max: 0,
min: 0,
name: "recurrence_rule",
pattern: "",
name: 'recurrence_rule',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default calendarSchemas;
export default calendarSchemas

View File

@@ -10,6 +10,6 @@ export default {
'cfop-algorithms/oll': lazy(() => import('@/pages/OLL')),
'cfop-algorithms/pll': lazy(() => import('@/pages/PLL'))
},
togglable: true,
category: '06.Information'
} satisfies ModuleConfig

View File

@@ -7,6 +7,6 @@ export default {
routes: {
'changi-airport-flight-status': lazy(() => import('@'))
},
togglable: true,
category: '06.Information'
} satisfies ModuleConfig

View File

@@ -7,6 +7,6 @@ export default {
routes: {
'code-time': lazy(() => import('.'))
},
togglable: true,
category: '01.Productivity'
} satisfies ModuleConfig

View File

@@ -1,159 +1,159 @@
import { z } from "zod";
import z from 'zod'
const codeTimeSchemas = {
projects: {
schema: z.object({
name: z.string(),
duration: z.number(),
duration: z.number()
}),
raw: {
id: "mde1cgke4ktc98i",
listRule: "",
viewRule: "",
createRule: "",
updateRule: "",
deleteRule: "",
name: "code_time__projects",
type: "base",
id: 'mde1cgke4ktc98i',
listRule: '',
viewRule: '',
createRule: '',
updateRule: '',
deleteRule: '',
name: 'code_time__projects',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "mcmnpisn",
id: 'mcmnpisn',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "rv6com9j",
id: 'rv6com9j',
max: null,
min: null,
name: "duration",
name: 'duration',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_kcio2htIml` ON `code_time__projects` (`name`)",
'CREATE UNIQUE INDEX `idx_kcio2htIml` ON `code_time__projects` (`name`)'
],
system: false,
},
system: false
}
},
languages: {
schema: z.object({
name: z.string(),
icon: z.string(),
color: z.string(),
duration: z.number(),
duration: z.number()
}),
raw: {
id: "yxs5srmdf2ot8yk",
listRule: "",
viewRule: "",
createRule: "",
updateRule: "",
deleteRule: "",
name: "code_time__languages",
type: "base",
id: 'yxs5srmdf2ot8yk',
listRule: '',
viewRule: '',
createRule: '',
updateRule: '',
deleteRule: '',
name: 'code_time__languages',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "c3yvxq4m",
id: 'c3yvxq4m',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "eqqf2pvy",
id: 'eqqf2pvy',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "t9pq8fub",
id: 't9pq8fub',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "fsr7opin",
id: 'fsr7opin',
max: null,
min: null,
name: "duration",
name: 'duration',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_saW8u2ur3M` ON `code_time__languages` (`name`)",
'CREATE UNIQUE INDEX `idx_saW8u2ur3M` ON `code_time__languages` (`name`)'
],
system: false,
},
system: false
}
},
daily_entries: {
schema: z.object({
@@ -163,114 +163,114 @@ const codeTimeSchemas = {
languages: z.any(),
hourly: z.any(),
total_minutes: z.number(),
last_timestamp: z.number(),
last_timestamp: z.number()
}),
raw: {
id: "eqmt5t9mkrgxf12",
listRule: "",
viewRule: "",
createRule: "",
updateRule: "",
id: 'eqmt5t9mkrgxf12',
listRule: '',
viewRule: '',
createRule: '',
updateRule: '',
deleteRule: null,
name: "code_time__daily_entries",
type: "base",
name: 'code_time__daily_entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
hidden: false,
id: "fkysyxdm",
max: "",
min: "",
name: "date",
id: 'fkysyxdm',
max: '',
min: '',
name: 'date',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "s58x23cf",
id: 's58x23cf',
maxSize: 2000000,
name: "relative_files",
name: 'relative_files',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "nscrac1f",
id: 'nscrac1f',
maxSize: 2000000,
name: "projects",
name: 'projects',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "aep18wlt",
id: 'aep18wlt',
maxSize: 2000000,
name: "languages",
name: 'languages',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "json2768424363",
id: 'json2768424363',
maxSize: 0,
name: "hourly",
name: 'hourly',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "8xsxx2hj",
id: '8xsxx2hj',
max: null,
min: null,
name: "total_minutes",
name: 'total_minutes',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
hidden: false,
id: "av07akcm",
id: 'av07akcm',
max: null,
min: null,
name: "last_timestamp",
name: 'last_timestamp',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_B0mAWvxXcb` ON `code_time__daily_entries` (`date`)",
'CREATE UNIQUE INDEX `idx_B0mAWvxXcb` ON `code_time__daily_entries` (`date`)'
],
system: false,
},
},
};
system: false
}
}
}
export default codeTimeSchemas;
export default codeTimeSchemas

View File

@@ -7,6 +7,6 @@ export default {
routes: {
'currency-converter': lazy(() => import('@'))
},
togglable: true,
category: '07.Utilities'
} satisfies ModuleConfig

View File

@@ -8,6 +8,6 @@ export default {
'idea-box': lazy(() => import('@/pages/Containers')),
'idea-box/:id/*': lazy(() => import('@/pages/Ideas'))
},
togglable: true,
category: '01.Productivity'
} satisfies ModuleConfig

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ export default {
routes: {
'moment-vault': lazy(() => import('@'))
},
togglable: true,
requiredAPIKeys: ['openai'],
category: '02.Lifestyle'
} satisfies ModuleConfig

View File

@@ -1,117 +1,117 @@
import { z } from "zod";
import z from 'zod'
const momentVaultSchemas = {
entries: {
schema: z.object({
type: z.enum(["text", "audio", "video", "photos", ""]),
type: z.enum(['text', 'audio', 'video', 'photos', '']),
file: z.array(z.string()),
content: z.string(),
transcription: z.string(),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "pbc_2203688272",
id: 'pbc_2203688272',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "moment_vault__entries",
type: "base",
name: 'moment_vault__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
hidden: false,
id: "select2363381545",
id: 'select2363381545',
maxSelect: 1,
name: "type",
name: 'type',
presentable: false,
required: false,
system: false,
type: "select",
values: ["text", "audio", "video", "photos"],
type: 'select',
values: ['text', 'audio', 'video', 'photos']
},
{
hidden: false,
id: "file2359244304",
id: 'file2359244304',
maxSelect: 99,
maxSize: 9999999999,
mimeTypes: [],
name: "file",
name: 'file',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: [],
type: "file",
type: 'file'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text4274335913",
id: 'text4274335913',
max: 0,
min: 0,
name: "content",
pattern: "",
name: 'content',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text849144196",
id: 'text849144196',
max: 0,
min: 0,
name: "transcription",
pattern: "",
name: 'transcription',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default momentVaultSchemas;
export default momentVaultSchemas

View File

@@ -7,7 +7,7 @@ export default {
routes: {
movies: lazy(() => import('@'))
},
togglable: true,
requiredAPIKeys: ['tmdb'],
category: '02.Lifestyle'
} satisfies ModuleConfig

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const moviesSchemas = {
entries: {
@@ -20,258 +20,258 @@ const moviesSchemas = {
theatre_location: z.string(),
theatre_location_coords: z.object({ lat: z.number(), lon: z.number() }),
theatre_number: z.string(),
is_watched: z.boolean(),
is_watched: z.boolean()
}),
raw: {
id: "pbc_123468663",
id: 'pbc_123468663',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "movies__entries",
type: "base",
name: 'movies__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number1438434789",
id: 'number1438434789',
max: null,
min: null,
name: "tmdb_id",
name: 'tmdb_id',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text724990059",
id: 'text724990059',
max: 0,
min: 0,
name: "title",
pattern: "",
name: 'title',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3834026137",
id: 'text3834026137',
max: 0,
min: 0,
name: "original_title",
pattern: "",
name: 'original_title',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text762383602",
id: 'text762383602',
max: 0,
min: 0,
name: "poster",
pattern: "",
name: 'poster',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "json2834031894",
id: 'json2834031894',
maxSize: 0,
name: "genres",
name: 'genres',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "number2254405824",
id: 'number2254405824',
max: null,
min: null,
name: "duration",
name: 'duration',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3888370107",
id: 'text3888370107',
max: 0,
min: 0,
name: "overview",
pattern: "",
name: 'overview',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "json3773345755",
id: 'json3773345755',
maxSize: 0,
name: "countries",
name: 'countries',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3571151285",
id: 'text3571151285',
max: 0,
min: 0,
name: "language",
pattern: "",
name: 'language',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "date4215628054",
max: "",
min: "",
name: "release_date",
id: 'date4215628054',
max: '',
min: '',
name: 'release_date',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "date1180390397",
max: "",
min: "",
name: "watch_date",
id: 'date1180390397',
max: '',
min: '',
name: 'watch_date',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3973215647",
id: 'text3973215647',
max: 0,
min: 0,
name: "ticket_number",
pattern: "",
name: 'ticket_number',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1742151851",
id: 'text1742151851',
max: 0,
min: 0,
name: "theatre_seat",
pattern: "",
name: 'theatre_seat',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "date3428949474",
max: "",
min: "",
name: "theatre_showtime",
id: 'date3428949474',
max: '',
min: '',
name: 'theatre_showtime',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text2447088056",
id: 'text2447088056',
max: 0,
min: 0,
name: "theatre_location",
pattern: "",
name: 'theatre_location',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "geoPoint4084498627",
name: "theatre_location_coords",
id: 'geoPoint4084498627',
name: 'theatre_location_coords',
presentable: false,
required: false,
system: false,
type: "geoPoint",
type: 'geoPoint'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text2138584574",
id: 'text2138584574',
max: 0,
min: 0,
name: "theatre_number",
pattern: "",
name: 'theatre_number',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "bool1180390397",
name: "is_watched",
id: 'bool1180390397',
name: 'is_watched',
presentable: false,
required: false,
system: false,
type: "bool",
},
type: 'bool'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default moviesSchemas;
export default moviesSchemas

View File

@@ -7,6 +7,6 @@ export default {
routes: {
music: lazy(() => import('@'))
},
togglable: true,
category: '04.Storage'
} satisfies ModuleConfig

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const musicSchemas = {
entries: {
@@ -7,116 +7,116 @@ const musicSchemas = {
duration: z.string(),
author: z.string(),
file: z.string(),
is_favourite: z.boolean(),
is_favourite: z.boolean()
}),
raw: {
id: "ud0dpvvhcjj4jiw",
id: 'ud0dpvvhcjj4jiw',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "music__entries",
type: "base",
name: 'music__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "bdxbqwdv",
id: 'bdxbqwdv',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "7e11dvi3",
id: '7e11dvi3',
max: 0,
min: 0,
name: "duration",
pattern: "",
name: 'duration',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "ucubj502",
id: 'ucubj502',
max: 0,
min: 0,
name: "author",
pattern: "",
name: 'author',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "wwccga9q",
id: 'wwccga9q',
maxSelect: 1,
maxSize: 1073741824,
mimeTypes: [
"audio/mpeg",
"audio/flac",
"audio/midi",
"audio/ogg",
"audio/ape",
"audio/musepack",
"audio/amr",
"audio/wav",
"audio/aiff",
"audio/basic",
"audio/aac",
"audio/x-unknown",
"audio/mp4",
'audio/mpeg',
'audio/flac',
'audio/midi',
'audio/ogg',
'audio/ape',
'audio/musepack',
'audio/amr',
'audio/wav',
'audio/aiff',
'audio/basic',
'audio/aac',
'audio/x-unknown',
'audio/mp4'
],
name: "file",
name: 'file',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: null,
type: "file",
type: 'file'
},
{
hidden: false,
id: "ziq6worb",
name: "is_favourite",
id: 'ziq6worb',
name: 'is_favourite',
presentable: false,
required: false,
system: false,
type: "bool",
},
type: 'bool'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default musicSchemas;
export default musicSchemas

View File

@@ -7,6 +7,6 @@ export default {
routes: {
passwords: lazy(() => import('@'))
},
togglable: true,
category: '05.Confidential'
} satisfies ModuleConfig

View File

@@ -30,7 +30,7 @@ const create = forgeController
const masterPasswordHash = await bcrypt.hash(password, salt)
await pb.update
.collection('users__users')
.collection('user__users')
.id(pb.instance.authStore.record!.id)
.data({
masterPasswordHash
@@ -50,7 +50,7 @@ const verify = forgeController
const decryptedMaster = decrypt2(password, challenge)
const user = await pb.getOne
.collection('users__users')
.collection('user__users')
.id(pb.instance.authStore.record!.id)
.execute()

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const passwordsSchemas = {
entries: {
@@ -11,150 +11,150 @@ const passwordsSchemas = {
color: z.string(),
pinned: z.boolean(),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "tgblyh0po4v8d1o",
id: 'tgblyh0po4v8d1o',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "passwords__entries",
type: "base",
name: 'passwords__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "f4ty6h3t",
id: 'f4ty6h3t',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "erv1avc6",
id: 'erv1avc6',
max: 0,
min: 0,
name: "website",
pattern: "",
name: 'website',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "levsseul",
id: 'levsseul',
max: 0,
min: 0,
name: "username",
pattern: "",
name: 'username',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "rk3jhjg6",
id: 'rk3jhjg6',
max: 0,
min: 0,
name: "password",
pattern: "",
name: 'password',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "oaez30fw",
id: 'oaez30fw',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "g8lfhqc5",
id: 'g8lfhqc5',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "ckvtxdlg",
name: "pinned",
id: 'ckvtxdlg',
name: 'pinned',
presentable: false,
required: false,
system: false,
type: "bool",
type: 'bool'
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default passwordsSchemas;
export default passwordsSchemas

View File

@@ -11,7 +11,7 @@ export const getDecryptedMaster = async (
challenge: string
): Promise<string> => {
const { masterPasswordHash } = pb.instance.authStore
.record as unknown as z.infer<typeof SCHEMAS.users.users.schema>
.record as unknown as z.infer<typeof SCHEMAS.user.users.schema>
const decryptedMaster = decrypt2(master, challenge)

View File

@@ -8,6 +8,6 @@ export default {
routes: {
'': lazy(() => import('@'))
},
togglable: true,
category: '06.Information'
} satisfies ModuleConfig

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const railwayMapSchemas = {
lines: {
@@ -9,126 +9,126 @@ const railwayMapSchemas = {
name: z.string(),
color: z.string(),
ways: z.any(),
map_paths: z.any(),
map_paths: z.any()
}),
raw: {
id: "pbc_1897454554",
id: 'pbc_1897454554',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "railway_map__lines",
type: "base",
name: 'railway_map__lines',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1400097126",
id: 'text1400097126',
max: 0,
min: 0,
name: "country",
pattern: "",
name: 'country',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text2363381545",
id: 'text2363381545',
max: 0,
min: 0,
name: "type",
pattern: "",
name: 'type',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1997877400",
id: 'text1997877400',
max: 0,
min: 0,
name: "code",
pattern: "",
name: 'code',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1579384326",
id: 'text1579384326',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1716930793",
id: 'text1716930793',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "json2840069143",
id: 'json2840069143',
maxSize: 0,
name: "ways",
name: 'ways',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "json189581693",
id: 'json189581693',
maxSize: 0,
name: "map_paths",
name: 'map_paths',
presentable: false,
required: false,
system: false,
type: "json",
},
type: 'json'
}
],
indexes: [],
system: false,
},
system: false
}
},
stations: {
schema: z.object({
@@ -140,146 +140,146 @@ const railwayMapSchemas = {
map_data: z.any(),
type: z.string(),
distances: z.any(),
map_image: z.string(),
map_image: z.string()
}),
raw: {
id: "pbc_1340498464",
id: 'pbc_1340498464',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "railway_map__stations",
type: "base",
name: 'railway_map__stations',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1579384326",
id: 'text1579384326',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text196455508",
id: 'text196455508',
max: 0,
min: 0,
name: "desc",
pattern: "",
name: 'desc',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
cascadeDelete: true,
collectionId: "pbc_1897454554",
collectionId: 'pbc_1897454554',
hidden: false,
id: "relation1325501590",
id: 'relation1325501590',
maxSelect: 999,
minSelect: 0,
name: "lines",
name: 'lines',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
hidden: false,
id: "json3853369677",
id: 'json3853369677',
maxSize: 0,
name: "codes",
name: 'codes',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "json3631081861",
id: 'json3631081861',
maxSize: 0,
name: "coords",
name: 'coords',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "json2632528569",
id: 'json2632528569',
maxSize: 0,
name: "map_data",
name: 'map_data',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text2363381545",
id: 'text2363381545',
max: 0,
min: 0,
name: "type",
pattern: "",
name: 'type',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "json2175659559",
id: 'json2175659559',
maxSize: 0,
name: "distances",
name: 'distances',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "file1170950963",
id: 'file1170950963',
maxSelect: 1,
maxSize: 0,
mimeTypes: [],
name: "map_image",
name: 'map_image',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: [],
type: "file",
},
type: 'file'
}
],
indexes: [],
system: false,
},
},
};
system: false
}
}
}
export default railwayMapSchemas;
export default railwayMapSchemas

View File

@@ -7,6 +7,6 @@ export default {
routes: {
'scores-library': lazy(() => import('./src'))
},
togglable: true,
category: '04.Storage'
} satisfies ModuleConfig

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const scoresLibrarySchemas = {
entries: {
@@ -15,514 +15,514 @@ const scoresLibrarySchemas = {
collection: z.string(),
guitar_world_id: z.number(),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "9agm22e3g44cdk8",
id: '9agm22e3g44cdk8',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "scores_library__entries",
type: "base",
name: 'scores_library__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "cgqi62gp",
id: 'cgqi62gp',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
cascadeDelete: false,
collectionId: "pbc_960559984",
collectionId: 'pbc_960559984',
hidden: false,
id: "relation2363381545",
id: 'relation2363381545',
maxSelect: 1,
minSelect: 0,
name: "type",
name: 'type',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "vojkjqoz",
id: 'vojkjqoz',
max: 0,
min: 0,
name: "pageCount",
pattern: "",
name: 'pageCount',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "tb4by8gi",
id: 'tb4by8gi',
maxSelect: 1,
maxSize: 5242880,
mimeTypes: [],
name: "thumbnail",
name: 'thumbnail',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: ["0x512"],
type: "file",
thumbs: ['0x512'],
type: 'file'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "cu4e2kos",
id: 'cu4e2kos',
max: 0,
min: 0,
name: "author",
pattern: "",
name: 'author',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "hv0nhz4n",
id: 'hv0nhz4n',
maxSelect: 1,
maxSize: 52428800,
mimeTypes: null,
name: "pdf",
name: 'pdf',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: null,
type: "file",
type: 'file'
},
{
hidden: false,
id: "0luzezpe",
id: '0luzezpe',
maxSelect: 1,
maxSize: 52428800,
mimeTypes: ["audio/mpeg"],
name: "audio",
mimeTypes: ['audio/mpeg'],
name: 'audio',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: null,
type: "file",
type: 'file'
},
{
hidden: false,
id: "unlycjbb",
id: 'unlycjbb',
maxSelect: 1,
maxSize: 52428800,
mimeTypes: null,
name: "musescore",
name: 'musescore',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: null,
type: "file",
type: 'file'
},
{
hidden: false,
id: "zglxrk9r",
name: "isFavourite",
id: 'zglxrk9r',
name: 'isFavourite',
presentable: false,
required: false,
system: false,
type: "bool",
type: 'bool'
},
{
cascadeDelete: false,
collectionId: "pbc_1328318918",
collectionId: 'pbc_1328318918',
hidden: false,
id: "relation4232930610",
id: 'relation4232930610',
maxSelect: 1,
minSelect: 0,
name: "collection",
name: 'collection',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
hidden: false,
id: "number3959456388",
id: 'number3959456388',
max: null,
min: null,
name: "guitar_world_id",
name: 'guitar_world_id',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
system: false
}
},
authors_aggregated: {
schema: z.object({
name: z.string(),
amount: z.number(),
amount: z.number()
}),
raw: {
id: "pbc_1264004064",
id: 'pbc_1264004064',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "scores_library__authors_aggregated",
type: "view",
name: 'scores_library__authors_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_lxIs",
id: '_clone_lxIs',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number2392944706",
id: 'number2392944706',
max: null,
min: null,
name: "amount",
name: 'amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [],
system: false,
viewQuery:
"SELECT\n (ROW_NUMBER() OVER()) as id,\n scores_library__entries.author as name,\n COUNT(scores_library__entries.id) as amount\nFROM scores_library__entries\nGROUP BY scores_library__entries.author",
},
'SELECT\n (ROW_NUMBER() OVER()) as id,\n scores_library__entries.author as name,\n COUNT(scores_library__entries.id) as amount\nFROM scores_library__entries\nGROUP BY scores_library__entries.author'
}
},
types: {
schema: z.object({
name: z.string(),
icon: z.string(),
icon: z.string()
}),
raw: {
id: "pbc_960559984",
id: 'pbc_960559984',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "scores_library__types",
type: "base",
name: 'scores_library__types',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1579384326",
id: 'text1579384326',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1704208859",
id: 'text1704208859',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_WoBZ3EWAB2` ON `scores_library__types` (`name`)",
'CREATE UNIQUE INDEX `idx_WoBZ3EWAB2` ON `scores_library__types` (`name`)'
],
system: false,
},
system: false
}
},
types_aggregated: {
schema: z.object({
name: z.string(),
icon: z.string(),
amount: z.number(),
amount: z.number()
}),
raw: {
id: "pbc_1616642190",
id: 'pbc_1616642190',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "scores_library__types_aggregated",
type: "view",
name: 'scores_library__types_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_woFF",
id: '_clone_woFF',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_9KW7",
id: '_clone_9KW7',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number2392944706",
id: 'number2392944706',
max: null,
min: null,
name: "amount",
name: 'amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [],
system: false,
viewQuery:
"SELECT\n scores_library__types.id,\n scores_library__types.name,\n scores_library__types.icon,\n COUNT(scores_library__entries.id) as amount\nFROM scores_library__types\nLEFT JOIN scores_library__entries\n ON scores_library__entries.type = scores_library__types.id\nGROUP BY scores_library__types.id",
},
'SELECT\n scores_library__types.id,\n scores_library__types.name,\n scores_library__types.icon,\n COUNT(scores_library__entries.id) as amount\nFROM scores_library__types\nLEFT JOIN scores_library__entries\n ON scores_library__entries.type = scores_library__types.id\nGROUP BY scores_library__types.id'
}
},
collections: {
schema: z.object({
name: z.string(),
name: z.string()
}),
raw: {
id: "pbc_1328318918",
id: 'pbc_1328318918',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "scores_library__collections",
type: "base",
name: 'scores_library__collections',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text1579384326",
id: 'text1579384326',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [],
system: false,
},
system: false
}
},
collections_aggregated: {
schema: z.object({
name: z.string(),
amount: z.number(),
amount: z.number()
}),
raw: {
id: "pbc_1931113261",
id: 'pbc_1931113261',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "scores_library__collections_aggregated",
type: "view",
name: 'scores_library__collections_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_wEP0",
id: '_clone_wEP0',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number2392944706",
id: 'number2392944706',
max: null,
min: null,
name: "amount",
name: 'amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [],
system: false,
viewQuery:
"SELECT scores_library__collections.id,\n scores_library__collections.name,\n COUNT(scores_library__entries.id) as amount\nFROM scores_library__collections\nLEFT JOIN scores_library__entries\nON scores_library__entries.collection = scores_library__collections.id\nGROUP BY scores_library__collections.id",
},
},
};
'SELECT scores_library__collections.id,\n scores_library__collections.name,\n COUNT(scores_library__entries.id) as amount\nFROM scores_library__collections\nLEFT JOIN scores_library__entries\nON scores_library__entries.collection = scores_library__collections.id\nGROUP BY scores_library__collections.id'
}
}
}
export default scoresLibrarySchemas;
export default scoresLibrarySchemas

View File

@@ -7,6 +7,6 @@ export default {
routes: {
'sin-chew-daily': lazy(() => import('@'))
},
togglable: true,
category: '06.Information'
} satisfies ModuleConfig

View File

@@ -7,6 +7,6 @@ export default {
routes: {
sudoku: lazy(() => import('@'))
},
togglable: true,
category: '07.Utilities'
} satisfies ModuleConfig

View File

@@ -7,7 +7,7 @@ export default {
routes: {
'todo-list': lazy(() => import('@'))
},
togglable: true,
hasAI: true,
requiredAPIKeys: ['groq'],
category: '01.Productivity'

View File

@@ -1,133 +1,133 @@
import { z } from "zod";
import z from 'zod'
const todoListSchemas = {
lists: {
schema: z.object({
name: z.string(),
icon: z.string(),
color: z.string(),
color: z.string()
}),
raw: {
id: "327ciwg4kdb3eih",
id: '327ciwg4kdb3eih',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "todo_list__lists",
type: "base",
name: 'todo_list__lists',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "y8zommga",
id: 'y8zommga',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "8cakr2ge",
id: '8cakr2ge',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "fc3qdmd7",
id: 'fc3qdmd7',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_T3w3dLGNcW` ON `todo_list__lists` (`name`)",
'CREATE UNIQUE INDEX `idx_T3w3dLGNcW` ON `todo_list__lists` (`name`)'
],
system: false,
},
system: false
}
},
tags: {
schema: z.object({
name: z.string(),
name: z.string()
}),
raw: {
id: "x117ii0br9fqehr",
id: 'x117ii0br9fqehr',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "todo_list__tags",
type: "base",
name: 'todo_list__tags',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "stfzdnfd",
id: 'stfzdnfd',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_scwXEaym2g` ON `todo_list__tags` (`name`)",
'CREATE UNIQUE INDEX `idx_scwXEaym2g` ON `todo_list__tags` (`name`)'
],
system: false,
},
system: false
}
},
entries: {
schema: z.object({
@@ -141,459 +141,459 @@ const todoListSchemas = {
done: z.boolean(),
completed_at: z.string(),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "w35txwos02cf2nm",
id: 'w35txwos02cf2nm',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "todo_list__entries",
type: "base",
name: 'todo_list__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "dfvcxey7",
id: 'dfvcxey7',
max: 0,
min: 0,
name: "summary",
pattern: "",
name: 'summary',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "gcll6ukh",
id: 'gcll6ukh',
max: 0,
min: 0,
name: "notes",
pattern: "",
name: 'notes',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "f8gi2ylo",
max: "",
min: "",
name: "due_date",
id: 'f8gi2ylo',
max: '',
min: '',
name: 'due_date',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "bool2459043662",
name: "due_date_has_time",
id: 'bool2459043662',
name: 'due_date_has_time',
presentable: false,
required: false,
system: false,
type: "bool",
type: 'bool'
},
{
cascadeDelete: false,
collectionId: "327ciwg4kdb3eih",
collectionId: '327ciwg4kdb3eih',
hidden: false,
id: "5fdwchzj",
id: '5fdwchzj',
maxSelect: 1,
minSelect: 0,
name: "list",
name: 'list',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
cascadeDelete: false,
collectionId: "x117ii0br9fqehr",
collectionId: 'x117ii0br9fqehr',
hidden: false,
id: "df4ncdna",
id: 'df4ncdna',
maxSelect: 2147483647,
minSelect: 0,
name: "tags",
name: 'tags',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
cascadeDelete: false,
collectionId: "zwgj5r0vi6xo5ma",
collectionId: 'zwgj5r0vi6xo5ma',
hidden: false,
id: "tonpixw6",
id: 'tonpixw6',
maxSelect: 1,
minSelect: 0,
name: "priority",
name: 'priority',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
hidden: false,
id: "jkco5dii",
name: "done",
id: 'jkco5dii',
name: 'done',
presentable: false,
required: false,
system: false,
type: "bool",
type: 'bool'
},
{
hidden: false,
id: "jqooidhl",
max: "",
min: "",
name: "completed_at",
id: 'jqooidhl',
max: '',
min: '',
name: 'completed_at',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
system: false
}
},
priorities: {
schema: z.object({
name: z.string(),
color: z.string(),
color: z.string()
}),
raw: {
id: "zwgj5r0vi6xo5ma",
id: 'zwgj5r0vi6xo5ma',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "todo_list__priorities",
type: "base",
name: 'todo_list__priorities',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "s5kc4goc",
id: 's5kc4goc',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "i178pi1i",
id: 'i178pi1i',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_IbjNIIyb5l` ON `todo_list__priorities` (`name`)",
'CREATE UNIQUE INDEX `idx_IbjNIIyb5l` ON `todo_list__priorities` (`name`)'
],
system: false,
},
system: false
}
},
lists_aggregated: {
schema: z.object({
name: z.string(),
color: z.string(),
icon: z.string(),
amount: z.number(),
amount: z.number()
}),
raw: {
id: "pbc_294728180",
id: 'pbc_294728180',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "todo_list__lists_aggregated",
type: "view",
name: 'todo_list__lists_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_Wqd9",
id: '_clone_Wqd9',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_cSgJ",
id: '_clone_cSgJ',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_bFnP",
id: '_clone_bFnP',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number2392944706",
id: 'number2392944706',
max: null,
min: null,
name: "amount",
name: 'amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [],
system: false,
viewQuery:
'SELECT \n todo_list__lists.id, \n todo_list__lists.name,\n todo_list__lists.color, \n todo_list__lists.icon, \n count(todo_list__lists.id) as amount \nFROM "todo_list__lists" \n LEFT JOIN todo_list__entries ON todo_list__entries.list = todo_list__lists.id\nGROUP BY todo_list__lists.id',
},
'SELECT \n todo_list__lists.id, \n todo_list__lists.name,\n todo_list__lists.color, \n todo_list__lists.icon, \n count(todo_list__lists.id) as amount \nFROM "todo_list__lists" \n LEFT JOIN todo_list__entries ON todo_list__entries.list = todo_list__lists.id\nGROUP BY todo_list__lists.id'
}
},
tags_aggregated: {
schema: z.object({
name: z.string(),
amount: z.number(),
amount: z.number()
}),
raw: {
id: "pbc_3656224340",
id: 'pbc_3656224340',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "todo_list__tags_aggregated",
type: "view",
name: 'todo_list__tags_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_gjOr",
id: '_clone_gjOr',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: true,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number2392944706",
id: 'number2392944706',
max: null,
min: null,
name: "amount",
name: 'amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [],
system: false,
viewQuery:
"WITH entry_tag_map AS (\n SELECT\n todo_list__entries.id AS entry_id,\n json_each.value AS tag_id\n FROM\n todo_list__entries,\n json_each(todo_list__entries.tags)\n)\nSELECT\n todo_list__tags.id,\n todo_list__tags.name,\n COUNT(entry_tag_map.entry_id) AS amount\nFROM\n todo_list__tags\nLEFT JOIN entry_tag_map\n ON entry_tag_map.tag_id = todo_list__tags.id\nGROUP BY\n todo_list__tags.id;",
},
'WITH entry_tag_map AS (\n SELECT\n todo_list__entries.id AS entry_id,\n json_each.value AS tag_id\n FROM\n todo_list__entries,\n json_each(todo_list__entries.tags)\n)\nSELECT\n todo_list__tags.id,\n todo_list__tags.name,\n COUNT(entry_tag_map.entry_id) AS amount\nFROM\n todo_list__tags\nLEFT JOIN entry_tag_map\n ON entry_tag_map.tag_id = todo_list__tags.id\nGROUP BY\n todo_list__tags.id;'
}
},
priorities_aggregated: {
schema: z.object({
name: z.string(),
color: z.string(),
amount: z.number(),
amount: z.number()
}),
raw: {
id: "pbc_13199116",
id: 'pbc_13199116',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "todo_list__priorities_aggregated",
type: "view",
name: 'todo_list__priorities_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_QObX",
id: '_clone_QObX',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_5N6s",
id: '_clone_5N6s',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number2392944706",
id: 'number2392944706',
max: null,
min: null,
name: "amount",
name: 'amount',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
},
type: 'number'
}
],
indexes: [],
system: false,
viewQuery:
"SELECT \n todo_list__priorities.id, \n todo_list__priorities.name,\n todo_list__priorities.color,\n COUNT(todo_list__entries.id) as amount\nFROM todo_list__priorities\n LEFT JOIN todo_list__entries ON todo_list__entries.priority = todo_list__priorities.id\nGROUP BY todo_list__priorities.id",
},
},
};
'SELECT \n todo_list__priorities.id, \n todo_list__priorities.name,\n todo_list__priorities.color,\n COUNT(todo_list__entries.id) as amount\nFROM todo_list__priorities\n LEFT JOIN todo_list__entries ON todo_list__entries.priority = todo_list__priorities.id\nGROUP BY todo_list__priorities.id'
}
}
}
export default todoListSchemas;
export default todoListSchemas

View File

@@ -33,6 +33,6 @@ export default {
'wallet/spending-heatmap': lazy(() => import('@/pages/SpendingHeatmap')),
'wallet/statements': lazy(() => import('@/pages/Statements'))
},
togglable: true,
category: '03.Finance'
} satisfies ModuleConfig

File diff suppressed because it is too large Load Diff

View File

@@ -8,7 +8,7 @@ export default {
wishlist: lazy(() => import('@/pages/WishlistList')),
'wishlist/:id': lazy(() => import('@/pages/WishlistEntries'))
},
togglable: true,
hasAI: true,
category: '03.Finance'
} satisfies ModuleConfig

View File

@@ -1,4 +1,4 @@
import { z } from "zod";
import z from 'zod'
const wishlistSchemas = {
lists: {
@@ -6,94 +6,94 @@ const wishlistSchemas = {
name: z.string(),
description: z.string(),
color: z.string(),
icon: z.string(),
icon: z.string()
}),
raw: {
id: "kdup91y6g8aqjah",
id: 'kdup91y6g8aqjah',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "wishlist__lists",
type: "base",
name: 'wishlist__lists',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "xguongsk",
id: 'xguongsk',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "u1ekqz95",
id: 'u1ekqz95',
max: 0,
min: 0,
name: "description",
pattern: "",
name: 'description',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "ahttl2mc",
id: 'ahttl2mc',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "bqwly2mg",
id: 'bqwly2mg',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
},
type: 'text'
}
],
indexes: [
"CREATE UNIQUE INDEX `idx_mZ8H0bkHRW` ON `wishlist__lists` (`name`)",
'CREATE UNIQUE INDEX `idx_mZ8H0bkHRW` ON `wishlist__lists` (`name`)'
],
system: false,
},
system: false
}
},
entries: {
schema: z.object({
@@ -105,149 +105,149 @@ const wishlistSchemas = {
bought: z.boolean(),
bought_at: z.string(),
created: z.string(),
updated: z.string(),
updated: z.string()
}),
raw: {
id: "vm2lopnobyynu60",
id: 'vm2lopnobyynu60',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: '@request.auth.id != ""',
updateRule: '@request.auth.id != ""',
deleteRule: '@request.auth.id != ""',
name: "wishlist__entries",
type: "base",
name: 'wishlist__entries',
type: 'base',
fields: [
{
autogeneratePattern: "[a-z0-9]{15}",
autogeneratePattern: '[a-z0-9]{15}',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 15,
min: 15,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "nnpsd0ds",
id: 'nnpsd0ds',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "9fzx3izf",
id: '9fzx3izf',
max: 0,
min: 0,
name: "url",
pattern: "",
name: 'url',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "5nxmxqzt",
id: '5nxmxqzt',
max: null,
min: null,
name: "price",
name: 'price',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
hidden: false,
id: "2wlzozpr",
id: '2wlzozpr',
maxSelect: 1,
maxSize: 5242880000,
mimeTypes: [
"image/jpeg",
"image/png",
"image/svg+xml",
"image/gif",
"image/webp",
'image/jpeg',
'image/png',
'image/svg+xml',
'image/gif',
'image/webp'
],
name: "image",
name: 'image',
presentable: false,
protected: false,
required: false,
system: false,
thumbs: null,
type: "file",
type: 'file'
},
{
cascadeDelete: true,
collectionId: "kdup91y6g8aqjah",
collectionId: 'kdup91y6g8aqjah',
hidden: false,
id: "ijcfsuys",
id: 'ijcfsuys',
maxSelect: 1,
minSelect: 0,
name: "list",
name: 'list',
presentable: false,
required: false,
system: false,
type: "relation",
type: 'relation'
},
{
hidden: false,
id: "bool78198511",
name: "bought",
id: 'bool78198511',
name: 'bought',
presentable: false,
required: false,
system: false,
type: "bool",
type: 'bool'
},
{
hidden: false,
id: "date931611388",
max: "",
min: "",
name: "bought_at",
id: 'date931611388',
max: '',
min: '',
name: 'bought_at',
presentable: false,
required: false,
system: false,
type: "date",
type: 'date'
},
{
hidden: false,
id: "autodate2990389176",
name: "created",
id: 'autodate2990389176',
name: 'created',
onCreate: true,
onUpdate: false,
presentable: false,
system: false,
type: "autodate",
type: 'autodate'
},
{
hidden: false,
id: "autodate3332085495",
name: "updated",
id: 'autodate3332085495',
name: 'updated',
onCreate: true,
onUpdate: true,
presentable: false,
system: false,
type: "autodate",
},
type: 'autodate'
}
],
indexes: [],
system: false,
},
system: false
}
},
lists_aggregated: {
schema: z.object({
@@ -258,139 +258,139 @@ const wishlistSchemas = {
total_count: z.number(),
total_amount: z.any(),
bought_count: z.number(),
bought_amount: z.any(),
bought_amount: z.any()
}),
raw: {
id: "pbc_3764964987",
id: 'pbc_3764964987',
listRule: '@request.auth.id != ""',
viewRule: '@request.auth.id != ""',
createRule: null,
updateRule: null,
deleteRule: null,
name: "wishlist__lists_aggregated",
type: "view",
name: 'wishlist__lists_aggregated',
type: 'view',
fields: [
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "text3208210256",
id: 'text3208210256',
max: 0,
min: 0,
name: "id",
pattern: "^[a-z0-9]+$",
name: 'id',
pattern: '^[a-z0-9]+$',
presentable: false,
primaryKey: true,
required: true,
system: true,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_F6BS",
id: '_clone_F6BS',
max: 0,
min: 0,
name: "name",
pattern: "",
name: 'name',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_u98q",
id: '_clone_u98q',
max: 0,
min: 0,
name: "description",
pattern: "",
name: 'description',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_jlIX",
id: '_clone_jlIX',
max: 0,
min: 0,
name: "color",
pattern: "",
name: 'color',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
autogeneratePattern: "",
autogeneratePattern: '',
hidden: false,
id: "_clone_8Clo",
id: '_clone_8Clo',
max: 0,
min: 0,
name: "icon",
pattern: "",
name: 'icon',
pattern: '',
presentable: false,
primaryKey: false,
required: false,
system: false,
type: "text",
type: 'text'
},
{
hidden: false,
id: "number1185665616",
id: 'number1185665616',
max: null,
min: null,
name: "total_count",
name: 'total_count',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
hidden: false,
id: "json1186288468",
id: 'json1186288468',
maxSize: 1,
name: "total_amount",
name: 'total_amount',
presentable: false,
required: false,
system: false,
type: "json",
type: 'json'
},
{
hidden: false,
id: "number4059607772",
id: 'number4059607772',
max: null,
min: null,
name: "bought_count",
name: 'bought_count',
onlyInt: false,
presentable: false,
required: false,
system: false,
type: "number",
type: 'number'
},
{
hidden: false,
id: "json2718748479",
id: 'json2718748479',
maxSize: 1,
name: "bought_amount",
name: 'bought_amount',
presentable: false,
required: false,
system: false,
type: "json",
},
type: 'json'
}
],
indexes: [],
system: false,
viewQuery:
"SELECT\n wishlist__lists.id,\n wishlist__lists.name,\n wishlist__lists.description,\n wishlist__lists.color,\n wishlist__lists.icon, \n COUNT(wishlist__entries.id) AS total_count,\n SUM(wishlist__entries.price) AS total_amount,\n COUNT(CASE WHEN wishlist__entries.bought = TRUE THEN 1 END) as bought_count,\n SUM(CASE WHEN wishlist__entries.bought = TRUE THEN wishlist__entries.price ELSE 0 END) AS bought_amount\nFROM wishlist__lists\nLEFT JOIN wishlist__entries\n ON wishlist__entries.list = wishlist__lists.id\nGROUP BY\n wishlist__lists.id\n",
},
},
};
'SELECT\n wishlist__lists.id,\n wishlist__lists.name,\n wishlist__lists.description,\n wishlist__lists.color,\n wishlist__lists.icon, \n COUNT(wishlist__entries.id) AS total_count,\n SUM(wishlist__entries.price) AS total_amount,\n COUNT(CASE WHEN wishlist__entries.bought = TRUE THEN 1 END) as bought_count,\n SUM(CASE WHEN wishlist__entries.bought = TRUE THEN wishlist__entries.price ELSE 0 END) AS bought_amount\nFROM wishlist__lists\nLEFT JOIN wishlist__entries\n ON wishlist__entries.list = wishlist__lists.id\nGROUP BY\n wishlist__lists.id\n'
}
}
}
export default wishlistSchemas;
export default wishlistSchemas

View File

@@ -7,7 +7,7 @@ export default {
routes: {
'youtube-summarizer': lazy(() => import('@'))
},
togglable: true,
requiredAPIKeys: ['groq'],
hasAI: true,
category: '07.Utilities'

View File

@@ -7,6 +7,5 @@ export default {
routes: {
'api-explorer': lazy(() => import('.'))
},
togglable: false,
forceDisable: !import.meta.env.VITE_API_EXPLORER_URL
disabled: !import.meta.env.VITE_API_EXPLORER_URL
} satisfies ModuleConfig

View File

@@ -7,6 +7,5 @@ export default {
routes: {
'localization-manager': lazy(() => import('.'))
},
togglable: false,
forceDisable: !import.meta.env.VITE_LOCALIZATION_MANAGER_URL
disabled: !import.meta.env.VITE_LOCALIZATION_MANAGER_URL
} satisfies ModuleConfig

View File

@@ -1,67 +0,0 @@
import { Icon } from '@iconify/react'
import { ItemWrapper, Switch } from 'lifeforge-ui'
import _ from 'lodash'
import { useState } from 'react'
import { useTranslation } from 'react-i18next'
import type { ModuleConfig } from 'shared'
function ModuleItem({
module,
enabled,
toggleModule
}: {
module: ModuleConfig
enabled: boolean
toggleModule: (moduleName: string) => void
}) {
const [expandConfig, setExpandConfig] = useState(false)
const { t } = useTranslation(`apps.${_.camelCase(module.name)}`)
function toggleExpandConfig() {
setExpandConfig(!expandConfig)
}
return (
<ItemWrapper as="li" className="flex flex-col items-center">
<div className="flex-between flex w-full gap-3">
<div className="flex items-center gap-3">
<div className="component-bg-lighter text-bg-500! rounded-lg p-3">
{typeof module.icon === 'string' ? (
<Icon className="text-2xl" icon={module.icon} />
) : (
module.icon
)}
</div>
<div>
<h3 className="flex flex-wrap items-center gap-2 text-xl font-medium">
<span>{t('title')}</span>
</h3>
<p className="text-bg-500">{t('description')}</p>
</div>
</div>
<div className="flex items-center gap-3">
<Switch
checked={enabled}
onChange={() => {
toggleModule(module.name)
}}
/>
<button
className="text-bg-500 hover:bg-bg-200 dark:hover:bg-bg-800/50 rounded-lg p-2 transition-all"
onClick={toggleExpandConfig}
>
<Icon
className="text-xl"
icon={
expandConfig ? 'tabler:chevron-down' : 'tabler:chevron-right'
}
/>
</button>
</div>
</div>
</ItemWrapper>
)
}
export default ModuleItem

View File

@@ -1,11 +0,0 @@
import { lazy } from 'react'
import type { ModuleConfig } from 'shared'
export default {
name: 'Modules',
icon: 'tabler:plug',
routes: {
modules: lazy(() => import('.'))
},
togglable: false
} satisfies ModuleConfig

View File

@@ -1,86 +0,0 @@
import forgeAPI from '@/utils/forgeAPI'
import { LoadingScreen, ModuleHeader } from 'lifeforge-ui'
import _ from 'lodash'
import { useTranslation } from 'react-i18next'
import { toast } from 'react-toastify'
import { useAuth } from 'shared'
import ROUTES from '../../../routes'
import ModuleItem from './components/ModuleItem'
function Modules() {
const { t } = useTranslation('common.sidebar')
const { userData, setUserData } = useAuth()
async function toggleModule(moduleName: string) {
if (!userData) return
const newEnabledModules = userData.enabledModules.includes(
_.kebabCase(moduleName)
)
? userData.enabledModules.filter(
(module: string) => module !== _.kebabCase(moduleName)
)
: [...userData.enabledModules, _.kebabCase(moduleName)]
setUserData({
...userData,
enabledModules: newEnabledModules
})
try {
await forgeAPI.modules.toggle
.input({
id: _.kebabCase(moduleName)
})
.mutate({})
} catch {
toast.error('Failed to update modules')
setUserData({
...userData,
enabledModules: userData.enabledModules
})
}
}
return (
<>
<ModuleHeader />
{userData ? (
<ul className="mb-8 space-y-12">
{ROUTES.map(
route =>
route.items.filter(route => route.togglable).length > 0 && (
<li key={route.title}>
<h2 className="before:bg-custom-500 relative mb-6 pl-4 text-3xl font-semibold before:absolute before:top-1/2 before:left-0 before:h-8 before:w-1 before:-translate-y-1/2 before:rounded-full">
{t(`categories.${_.camelCase(route.title)}`)}
</h2>
<ul className="space-y-3">
{route.items
.filter(route => route.togglable)
.map((route, index) => (
<ModuleItem
key={index}
enabled={userData.enabledModules.includes(
_.kebabCase(route.name)
)}
module={route}
toggleModule={() => {
toggleModule(route.name).catch(console.error)
}}
/>
))}
</ul>
</li>
)
)}
</ul>
) : (
<LoadingScreen />
)}
</>
)
}
export default Modules

View File

@@ -1,44 +0,0 @@
interface IModuleConfigInput {
type: 'input'
icon: string
name: string
placeholder: string
isPassword?: boolean
}
interface IModuleConfigSelect {
type: 'select'
icon: string
name: string
description?: string
options: Array<{
value: string
label: string
}>
}
interface IModuleConfigSwitch {
type: 'switch'
icon: string
name: string
defaultValue: boolean
description?: string
}
interface IModuleEntry {
name: string
description?: string
icon: string
config?: Record<
string,
IModuleConfigInput | IModuleConfigSelect | IModuleConfigSwitch
>
deprecated?: boolean
}
export type {
IModuleConfigInput,
IModuleConfigSelect,
IModuleConfigSwitch,
IModuleEntry
}

View File

@@ -1,7 +0,0 @@
{
"title": "Modules",
"description": "Customize your system by enabling or disabling modules.",
"buttons": {
"install": "Install Module"
}
}

View File

@@ -1,7 +0,0 @@
{
"title": "Modul",
"description": "Sesuaikan sistem anda dengan mengaktifkan atau menyahaktifkan modul.",
"buttons": {
"install": "Pasang Modul"
}
}

View File

@@ -1,7 +0,0 @@
{
"title": "模块",
"description": "通过启用或禁用模块来打造属于您的系统。",
"buttons": {
"install": "安装模块"
}
}

View File

@@ -1,7 +0,0 @@
{
"title": "模組",
"description": "通過啟用或禁用模組來打造屬於您的系統。",
"buttons": {
"install": "安裝模塊"
}
}

View File

@@ -7,6 +7,5 @@ export default {
routes: {
account: lazy(() => import('.'))
},
togglable: false,
hidden: true
} satisfies ModuleConfig

View File

@@ -8,9 +8,9 @@ import {
import _ from 'lodash'
import { Fragment, useMemo } from 'react'
import { useSidebarState } from 'shared'
import { useAuth } from 'shared'
import ROUTES from '../..'
import { useAuth } from 'shared'
function SidebarItems({ query }: { query: string }) {
const { userData } = useAuth()
@@ -25,10 +25,7 @@ function SidebarItems({ query }: { query: string }) {
e.items.some(
subItem =>
subItem.name.toLowerCase().includes(query.toLowerCase()) &&
!subItem.forceDisable &&
!subItem.hidden &&
(!subItem.togglable ||
userData?.enabledModules.includes(_.kebabCase(subItem.name)))
!subItem.disabled
)
),
[query, userData]
@@ -40,15 +37,7 @@ function SidebarItems({ query }: { query: string }) {
{filteredRoutes.length > 0 ? (
filteredRoutes.map((item, index) => {
const filteredModules = item.items.filter(
subItem =>
(!subItem.togglable ||
userData?.enabledModules.includes(
_.kebabCase(subItem.name)
) === true) &&
!subItem.forceDisable &&
!subItem.hidden &&
(item.title.toLowerCase().includes(query.toLowerCase()) ||
subItem.name.toLowerCase().includes(query.toLowerCase()))
subItem => !subItem.disabled
)
return (

View File

@@ -17,7 +17,7 @@ import {
export function useAppRouter() {
const { t } = useTranslation('common.misc')
const { userData, auth, authLoading } = useAuth()
const { auth, authLoading } = useAuth()
const router = useMemo(() => {
// If authentication is still loading, return a placeholder router
@@ -33,12 +33,11 @@ export function useAppRouter() {
// If user is authenticated, create full application routes based on enabled modules
const routerConfig = createRouterConfig({
routes: ROUTES,
enabledModules: userData?.enabledModules ?? [],
loadingMessage: t('loadingModule')
})
return createBrowserRouter(routerConfig)
}, [userData?.enabledModules, auth, t, authLoading])
}, [auth, t, authLoading])
return { router, isAuthenticated: !!auth }
}

View File

@@ -5,12 +5,10 @@ import type { ModuleCategory } from 'shared'
import Auth from '../../auth'
import RootLayout from '../components/RootLayout'
import { shouldModuleBeEnabled } from './moduleFilters'
import { createModuleRoute } from './routeBuilder'
interface CreateRouterConfigOptions {
routes: ModuleCategory[]
enabledModules?: string[]
loadingMessage: string
}
@@ -44,12 +42,11 @@ export function AuthRedirectHandler() {
*/
export function createRouterConfig({
routes,
enabledModules = [],
loadingMessage
}: CreateRouterConfigOptions): RouteObject[] {
const enabledItems = routes
.flatMap(category => category.items)
.filter(item => shouldModuleBeEnabled(item, enabledModules))
.filter(item => !item.disabled)
const moduleRoutes = enabledItems.flatMap(item =>
createModuleRoute(item, loadingMessage)

View File

@@ -9,7 +9,6 @@ export interface ModuleConfig {
| React.LazyExoticComponent<React.ComponentType<any>>
| (() => React.ReactElement)
>
togglable: boolean
hasAI?: boolean
requiredAPIKeys?: string[]
subsection?: {
@@ -18,7 +17,7 @@ export interface ModuleConfig {
path: string
}[]
hidden?: boolean
forceDisable?: boolean
disabled?: boolean
category?: string
}