fix: building working, (lots of bugs)

This commit is contained in:
sethburkart123
2024-09-02 21:46:48 +10:00
parent 99a3166fa4
commit 2f08d6ee08
107 changed files with 1113 additions and 37 deletions
-27
View File
@@ -1,27 +0,0 @@
export interface SettingsState {
notificationCollector: boolean;
selectedTheme: string;
lessonAlerts: boolean;
animatedBackground: boolean;
animatedBackgroundSpeed: string;
customThemeColor: string;
betterSEQTAPlus: boolean;
shortcuts: Shortcut[];
customshortcuts: CustomShortcut[];
transparencyEffects: boolean;
timeFormat?: string;
animations: boolean;
defaultPage: string;
devMode: boolean;
}
interface Shortcut {
enabled: boolean;
name: string;
}
export interface CustomShortcut {
name: string;
url: string;
icon: string;
}
-5
View File
@@ -1,5 +0,0 @@
export interface ColorPickerProps {
color: string;
onChange: (color: string) => void;
id: string;
}
-42
View File
@@ -1,42 +0,0 @@
export type CustomTheme = {
id: string;
name: string;
description: string;
defaultColour: string;
CanChangeColour: boolean;
allowBackgrounds: boolean;
CustomCSS: string;
CustomImages: CustomImage[];
coverImage: Blob | string | null;
isEditable: boolean;
hideThemeName: boolean;
webURL?: string;
selectedColor?: string;
forceDark?: boolean;
}
export type DownloadedTheme = CustomTheme & {
webURL: string;
}
export type CustomImage = {
id: string;
blob: Blob;
variableName: string;
}
export type CustomImageBase64 = {
id: string;
url: string;
variableName: string;
}
export type CustomThemeBase64 = Omit<CustomTheme, 'CustomImages'> & {
CustomImages: CustomImageBase64[];
coverImage: string | null;
}
export type ThemeList = {
themes: Omit<CustomTheme, 'CustomImages'>[];
selectedTheme: string;
}
-11
View File
@@ -1,11 +0,0 @@
import type { SettingsState } from './AppProps';
export interface SettingsList {
title: string;
description: string;
modifyElement: JSX.Element;
}
export interface SettingsProps {
settingsState: SettingsState;
setSettingsState: React.Dispatch<React.SetStateAction<SettingsState>>;
}
-7
View File
@@ -1,7 +0,0 @@
import React from 'react';
import "./Slider.css";
export interface Slider {
onValueChange: (value: number) => void;
}
declare const Slider: React.FC<Slider>;
export default Slider;
-6
View File
@@ -1,6 +0,0 @@
import "./Switch.css";
export interface SwitchProps {
onChange: (isOn: boolean) => void;
state: boolean;
}
@@ -1,11 +0,0 @@
import React, { JSX } from 'react';
export interface Tab {
title: string;
content: JSX.Element;
}
export interface TabbedContainerProps {
tabs: Tab[];
animations?: boolean;
}
declare const TabbedContainer: React.FC<TabbedContainerProps>;
export default TabbedContainer;
-88
View File
@@ -1,88 +0,0 @@
/**
* This file was @generated using pocketbase-typegen
*/
import type PocketBase from 'pocketbase'
import type { RecordService } from 'pocketbase'
export enum Collections {
PublishedThemes = "publishedThemes",
Themes = "themes",
Users = "users",
}
// Alias types for improved usability
export type IsoDateString = string
export type RecordIdString = string
export type HTMLString = string
// System fields
export type BaseSystemFields<T = never> = {
id: RecordIdString
created: IsoDateString
updated: IsoDateString
collectionId: string
collectionName: Collections
expand?: T
}
export type AuthSystemFields<T = never> = {
email: string
emailVisibility: boolean
username: string
verified: boolean
} & BaseSystemFields<T>
// Record types for each collection
export type PublishedThemesRecord = {
coverImage?: string
description?: string
downloads?: string
marqueeImage?: string
name: string
themeURL?: string
}
export type ThemesRecord<Ttheme = unknown> = {
coverImage?: string
description?: string
downloads?: string
images?: string[]
name: string
submitted?: boolean
theme?: null | Ttheme
}
export type UsersRecord = {
avatar?: string
name?: string
}
// Response types include system fields and match responses from the PocketBase API
export type PublishedThemesResponse<Texpand = unknown> = Required<PublishedThemesRecord> & BaseSystemFields<Texpand>
export type ThemesResponse<Ttheme = unknown, Texpand = unknown> = Required<ThemesRecord<Ttheme>> & BaseSystemFields<Texpand>
export type UsersResponse<Texpand = unknown> = Required<UsersRecord> & AuthSystemFields<Texpand>
// Types containing all Records and Responses, useful for creating typing helper functions
export type CollectionRecords = {
publishedThemes: PublishedThemesRecord
themes: ThemesRecord
users: UsersRecord
}
export type CollectionResponses = {
publishedThemes: PublishedThemesResponse
themes: ThemesResponse
users: UsersResponse
}
// Type for usage with type asserted PocketBase instance
// https://github.com/pocketbase/js-sdk#specify-typescript-definitions
export type TypedPocketBase = PocketBase & {
collection(idOrName: 'publishedThemes'): RecordService<PublishedThemesResponse>
collection(idOrName: 'themes'): RecordService<ThemesResponse>
collection(idOrName: 'users'): RecordService<UsersResponse>
}