From 80a29f771f723ddf8b64609725e97b626663dff3 Mon Sep 17 00:00:00 2001 From: Natty Date: Wed, 10 Jan 2024 23:35:51 +0100 Subject: [PATCH] Frontend: Removed AiScript plugins and pages --- .../frontend/calckey-js/src/api.types.ts | 22 - .../frontend/calckey-js/src/entities.ts | 32 - fe_calckey/frontend/client/package.json | 2 - .../client/src/components/MagNote.vue | 15 +- .../client/src/components/MagNoteDetailed.vue | 13 +- .../client/src/components/MkPagePreview.vue | 171 ----- .../client/src/components/MkPostForm.vue | 38 +- .../client/src/components/page/page.block.vue | 64 -- .../src/components/page/page.button.vue | 70 -- .../src/components/page/page.canvas.vue | 49 -- .../src/components/page/page.counter.vue | 56 -- .../client/src/components/page/page.if.vue | 37 - .../client/src/components/page/page.image.vue | 37 - .../client/src/components/page/page.note.vue | 61 -- .../src/components/page/page.number-input.vue | 60 -- .../client/src/components/page/page.post.vue | 121 ---- .../src/components/page/page.radio-button.vue | 52 -- .../src/components/page/page.section.vue | 66 -- .../src/components/page/page.switch.vue | 59 -- .../src/components/page/page.text-input.vue | 60 -- .../client/src/components/page/page.text.vue | 67 -- .../components/page/page.textarea-input.vue | 50 -- .../src/components/page/page.textarea.vue | 28 - .../client/src/components/page/page.vue | 104 --- fe_calckey/frontend/client/src/init.ts | 8 - fe_calckey/frontend/client/src/navbar.ts | 5 - .../page-editor/els/page-editor.el.button.vue | 130 ---- .../page-editor/els/page-editor.el.canvas.vue | 51 -- .../els/page-editor.el.counter.vue | 47 -- .../page-editor/els/page-editor.el.if.vue | 88 --- .../page-editor/els/page-editor.el.image.vue | 71 -- .../page-editor/els/page-editor.el.note.vue | 91 --- .../els/page-editor.el.number-input.vue | 47 -- .../page-editor/els/page-editor.el.post.vue | 48 -- .../els/page-editor.el.radio-button.vue | 66 -- .../els/page-editor.el.section.vue | 79 --- .../page-editor/els/page-editor.el.switch.vue | 53 -- .../els/page-editor.el.text-input.vue | 46 -- .../page-editor/els/page-editor.el.text.vue | 50 -- .../els/page-editor.el.textarea-input.vue | 47 -- .../els/page-editor.el.textarea.vue | 50 -- .../pages/page-editor/page-editor.blocks.vue | 108 --- .../page-editor/page-editor.container.vue | 180 ----- .../page-editor/page-editor.script-block.vue | 408 ----------- .../src/pages/page-editor/page-editor.vue | 645 ------------------ fe_calckey/frontend/client/src/pages/page.vue | 467 ------------- .../frontend/client/src/pages/pages.vue | 196 ------ .../frontend/client/src/pages/scratchpad.vue | 164 ----- .../client/src/pages/settings/api.vue | 6 - .../client/src/pages/settings/index.vue | 6 - .../src/pages/settings/plugin.install.vue | 151 ---- .../client/src/pages/settings/plugin.vue | 127 ---- .../pages/settings/preferences-backups.vue | 1 - .../frontend/client/src/pages/user/home.vue | 16 +- .../frontend/client/src/pages/user/index.vue | 7 - .../frontend/client/src/pages/user/pages.vue | 33 - fe_calckey/frontend/client/src/plugin.ts | 192 ------ fe_calckey/frontend/client/src/router.ts | 43 -- .../client/src/scripts/aiscript/api.ts | 61 -- .../client/src/scripts/collect-page-vars.ts | 48 -- .../client/src/scripts/get-note-menu.ts | 14 - .../client/src/scripts/get-user-menu.ts | 14 - .../frontend/client/src/scripts/helpMenu.ts | 28 +- .../frontend/client/src/scripts/hpml/block.ts | 128 ---- .../client/src/scripts/hpml/evaluator.ts | 264 ------- .../frontend/client/src/scripts/hpml/expr.ts | 87 --- .../frontend/client/src/scripts/hpml/index.ts | 140 ---- .../frontend/client/src/scripts/hpml/lib.ts | 587 ---------------- .../client/src/scripts/hpml/type-checker.ts | 196 ------ fe_calckey/frontend/client/src/store.ts | 11 - .../frontend/client/src/ui/visitor/b.vue | 16 +- .../frontend/client/src/ui/visitor/header.vue | 4 - fe_calckey/frontend/pnpm-lock.yaml | 40 +- magnetar_sdk/src/types/user.rs | 1 - 74 files changed, 13 insertions(+), 6687 deletions(-) delete mode 100644 fe_calckey/frontend/client/src/components/MkPagePreview.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.block.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.button.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.canvas.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.counter.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.if.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.image.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.note.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.number-input.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.post.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.radio-button.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.section.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.switch.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.text-input.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.text.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.textarea-input.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.textarea.vue delete mode 100644 fe_calckey/frontend/client/src/components/page/page.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.button.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.canvas.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.counter.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.if.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.image.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.note.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.number-input.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.post.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.radio-button.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.section.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.switch.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text-input.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.text.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea-input.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/els/page-editor.el.textarea.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/page-editor.blocks.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/page-editor.container.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/page-editor.script-block.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page-editor/page-editor.vue delete mode 100644 fe_calckey/frontend/client/src/pages/page.vue delete mode 100644 fe_calckey/frontend/client/src/pages/pages.vue delete mode 100644 fe_calckey/frontend/client/src/pages/scratchpad.vue delete mode 100644 fe_calckey/frontend/client/src/pages/settings/plugin.install.vue delete mode 100644 fe_calckey/frontend/client/src/pages/settings/plugin.vue delete mode 100644 fe_calckey/frontend/client/src/pages/user/pages.vue delete mode 100644 fe_calckey/frontend/client/src/plugin.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/aiscript/api.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/collect-page-vars.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/hpml/block.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/hpml/evaluator.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/hpml/expr.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/hpml/index.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/hpml/lib.ts delete mode 100644 fe_calckey/frontend/client/src/scripts/hpml/type-checker.ts diff --git a/fe_calckey/frontend/calckey-js/src/api.types.ts b/fe_calckey/frontend/calckey-js/src/api.types.ts index 70818cb..ad42dae 100644 --- a/fe_calckey/frontend/calckey-js/src/api.types.ts +++ b/fe_calckey/frontend/calckey-js/src/api.types.ts @@ -23,7 +23,6 @@ import { NoteReaction, Notification, OriginType, - Page, ServerInfo, Signin, Stats, @@ -631,8 +630,6 @@ export type Endpoints = { }; res: Notification[]; }; - "i/page-likes": { req: TODO; res: TODO }; - "i/pages": { req: TODO; res: TODO }; "i/pin": { req: { noteId: Note["id"] }; res: MeDetailed }; "i/read-all-messaging-messages": { req: TODO; res: TODO }; "i/read-all-unread-notes": { req: TODO; res: TODO }; @@ -886,24 +883,6 @@ export type Endpoints = { res: null; }; - // page-push - "page-push": { - req: { pageId: Page["id"]; event: string; var?: any }; - res: null; - }; - - // pages - "pages/create": { req: TODO; res: Page }; - "pages/delete": { req: { pageId: Page["id"] }; res: null }; - "pages/featured": { req: NoParams; res: Page[] }; - "pages/like": { req: { pageId: Page["id"] }; res: null }; - "pages/show": { - req: { pageId?: Page["id"]; name?: string; username?: string }; - res: Page; - }; - "pages/unlike": { req: { pageId: Page["id"] }; res: null }; - "pages/update": { req: TODO; res: null }; - // ping ping: { req: NoParams; res: { pong: number } }; @@ -1000,7 +979,6 @@ export type Endpoints = { }; res: Note[]; }; - "users/pages": { req: TODO; res: TODO }; "users/recommendation": { req: TODO; res: TODO }; "users/relation": { req: TODO; res: TODO }; "users/report-abuse": { req: TODO; res: TODO }; diff --git a/fe_calckey/frontend/calckey-js/src/entities.ts b/fe_calckey/frontend/calckey-js/src/entities.ts index 44238de..67a4a69 100644 --- a/fe_calckey/frontend/calckey-js/src/entities.ts +++ b/fe_calckey/frontend/calckey-js/src/entities.ts @@ -64,8 +64,6 @@ export type UserDetailed = UserLite & { notesCount: number; pinnedNoteIds: ID[]; pinnedNotes: Note[]; - pinnedPage: Page | null; - pinnedPageId: string | null; publicReactions: boolean; securityKeys: boolean; twoFactorEnabled: boolean; @@ -308,36 +306,6 @@ export type Stats = { driveUsageRemote: number; }; -export type Page = { - id: ID; - createdAt: DateString; - updatedAt: DateString; - userId: User["id"]; - user: User; - content: Record[]; - variables: Record[]; - title: string; - name: string; - summary: string | null; - hideTitleWhenPinned: boolean; - alignCenter: boolean; - font: string; - script: string; - eyeCatchingImageId: DriveFile["id"] | null; - eyeCatchingImage: DriveFile | null; - attachedFiles: any; - likedCount: number; - isLiked?: boolean; -}; - -export type PageEvent = { - pageId: Page["id"]; - event: string; - var: any; - userId: User["id"]; - user: User; -}; - export type Announcement = { id: ID; createdAt: DateString; diff --git a/fe_calckey/frontend/client/package.json b/fe_calckey/frontend/client/package.json index 86705e2..a647210 100644 --- a/fe_calckey/frontend/client/package.json +++ b/fe_calckey/frontend/client/package.json @@ -13,7 +13,6 @@ "@rollup/plugin-alias": "3.1.9", "@rollup/plugin-json": "4.1.0", "@rollup/pluginutils": "^4.2.1", - "@syuilo/aiscript": "0.11.1", "@types/escape-regexp": "0.0.1", "@types/glob": "8.1.0", "@types/gulp": "4.0.11", @@ -90,7 +89,6 @@ "vue": "3.3.4", "vue-isyourpasswordsafe": "^2.0.0", "vue-plyr": "^7.0.0", - "vue-prism-editor": "2.0.0-alpha.2", "vue3-otp-input": "^0.4.1", "vuedraggable": "4.1.0" } diff --git a/fe_calckey/frontend/client/src/components/MagNote.vue b/fe_calckey/frontend/client/src/components/MagNote.vue index 1251a2d..82a1e22 100644 --- a/fe_calckey/frontend/client/src/components/MagNote.vue +++ b/fe_calckey/frontend/client/src/components/MagNote.vue @@ -218,7 +218,7 @@ - - diff --git a/fe_calckey/frontend/client/src/components/MkPostForm.vue b/fe_calckey/frontend/client/src/components/MkPostForm.vue index 491e411..97507fe 100644 --- a/fe_calckey/frontend/client/src/components/MkPostForm.vue +++ b/fe_calckey/frontend/client/src/components/MkPostForm.vue @@ -197,14 +197,6 @@ > -