From cae34329ede9ef10238636e036cbfd9036f668ab Mon Sep 17 00:00:00 2001 From: MattyaDaihuku <87429435+MattyaDaihuku@users.noreply.github.com> Date: Mon, 9 Dec 2024 04:09:54 +0000 Subject: [PATCH] init commit --- locales/ja-JP.yml | 1 + packages/frontend/src/navbar.ts | 5 + .../src/pages/novel-editor/novel-editor.vue | 384 +++++++++++++ packages/frontend/src/pages/novel.vue | 539 ++++++++++++++++++ packages/frontend/src/pages/novels.vue | 95 +++ packages/frontend/src/router/definition.ts | 12 + 6 files changed, 1036 insertions(+) create mode 100644 packages/frontend/src/pages/novel-editor/novel-editor.vue create mode 100644 packages/frontend/src/pages/novel.vue create mode 100644 packages/frontend/src/pages/novels.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d4ef731c9030..b26f3c41c4cf 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -371,6 +371,7 @@ unwatch: "ウォッチ解除" accept: "許可" reject: "拒否" normal: "通常" +novels: "小説" instanceName: "サーバー名" instanceDescription: "サーバーの紹介" maintainerName: "管理者の名前" diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts index 096d404a572f..dedeeca2aebe 100644 --- a/packages/frontend/src/navbar.ts +++ b/packages/frontend/src/navbar.ts @@ -89,6 +89,11 @@ export const navbarItemDef = reactive({ icon: 'ti ti-news', to: '/pages', }, + novels: { + title: i18n.ts.novels, + icon: 'ti ti-book', + to: '/novels', + }, play: { title: 'Play', icon: 'ti ti-player-play', diff --git a/packages/frontend/src/pages/novel-editor/novel-editor.vue b/packages/frontend/src/pages/novel-editor/novel-editor.vue new file mode 100644 index 000000000000..a8a8115ca946 --- /dev/null +++ b/packages/frontend/src/pages/novel-editor/novel-editor.vue @@ -0,0 +1,384 @@ + + + + + + + + + diff --git a/packages/frontend/src/pages/novel.vue b/packages/frontend/src/pages/novel.vue new file mode 100644 index 000000000000..67142385914b --- /dev/null +++ b/packages/frontend/src/pages/novel.vue @@ -0,0 +1,539 @@ + + + + + + + diff --git a/packages/frontend/src/pages/novels.vue b/packages/frontend/src/pages/novels.vue new file mode 100644 index 000000000000..4ef9d3b0917f --- /dev/null +++ b/packages/frontend/src/pages/novels.vue @@ -0,0 +1,95 @@ + + + + + diff --git a/packages/frontend/src/router/definition.ts b/packages/frontend/src/router/definition.ts index e248fe93dfa6..ef8f6fe08a0b 100644 --- a/packages/frontend/src/router/definition.ts +++ b/packages/frontend/src/router/definition.ts @@ -22,6 +22,9 @@ const routes: RouteDef[] = [{ }, { path: '/@:username/pages/:pageName', component: page(() => import('@/pages/page.vue')), +}, { + path: '/@:username/novels/:novelName', + component: page(() => import('@/pages/novel.vue')), }, { path: '/@:acct/following', component: page(() => import('@/pages/user/following.vue')), @@ -310,6 +313,15 @@ const routes: RouteDef[] = [{ }, { path: '/pages', component: page(() => import('@/pages/pages.vue')), +}, { + path: '/novels/new', + component: page(() => import('@/pages/novel-editor/novel-editor.vue')), +}, { + path: '/novels/edit/:initNovelId', + component: page(() => import('@/pages/novel-editor/novel-editor.vue')), +}, { + path: '/novels', + component: page(() => import('@/pages/novels.vue')), }, { path: '/play/:id/edit', component: page(() => import('@/pages/flash/flash-edit.vue')),