From 98efd193ae933845f87db4556c07f82202f850ff Mon Sep 17 00:00:00 2001 From: Last2014 Date: Sun, 31 May 2026 20:07:27 +0900 Subject: [PATCH] =?UTF-8?q?Feat:=20#9=20=E3=82=B3=E3=83=9F=E3=83=A5?= =?UTF-8?q?=E3=83=8B=E3=83=86=E3=82=A3=E3=81=AE=E4=BD=9C=E6=88=90=20/=20Ch?= =?UTF-8?q?g:=20=E9=81=B8=E6=8A=9E=E5=8F=AF=E8=83=BD=E3=81=AA=E8=A6=81?= =?UTF-8?q?=E7=B4=A0=20/=20Enhance:=20RouterView=E3=81=AEkey=20/=20Del:=20?= =?UTF-8?q?canReloadTitle=20/=20Enhance:=20CSS=E3=81=AE>=E3=82=92=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E3=81=97=E3=81=AA=E3=81=84=E5=AD=90=E8=A6=81=E7=B4=A0?= =?UTF-8?q?=E3=82=BB=E3=83=AC=E3=82=AF=E3=82=BF=E3=82=92=E5=BB=83=E6=AD=A2?= =?UTF-8?q?=20/=20Feat:=20=E8=87=AA=E5=8B=95=E6=9B=B4=E6=96=B0=E3=81=99?= =?UTF-8?q?=E3=82=8B=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC=E3=82=B8=E3=81=AE?= =?UTF-8?q?=E7=9B=B8=E5=AF=BE=E6=99=82=E5=88=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/Layout.vue | 53 +++-- packages/frontend/src/components/Message.vue | 45 ++++- .../src/components/Modal/CreateCommunity.vue | 186 ++++++++++++++++++ packages/frontend/src/global.css | 2 + packages/frontend/src/main.ts | 9 - .../frontend/src/routes/community/channel.vue | 10 +- .../frontend/src/routes/community/index.vue | 4 +- 7 files changed, 278 insertions(+), 31 deletions(-) create mode 100644 packages/frontend/src/components/Modal/CreateCommunity.vue diff --git a/packages/frontend/src/Layout.vue b/packages/frontend/src/Layout.vue index 54f42e0..2dc09b4 100755 --- a/packages/frontend/src/Layout.vue +++ b/packages/frontend/src/Layout.vue @@ -41,6 +41,15 @@ icon="material-symbols:groups-rounded" /> + +
+ +
@@ -60,7 +69,7 @@ ? "full-route" : ""' > - +
@@ -105,9 +114,11 @@ main.layout { -webkit-user-select: none; } -.left-menu a { +.left-menu > a, +.left-menu > div { display: block; position: relative; + cursor: pointer; z-index: 0; border-radius: 0.5rem; border: 1px solid transparent; @@ -117,7 +128,12 @@ main.layout { transition: background-color 200ms ease-out; } -.left-menu a * { +.left-menu > div { + margin-top: auto; +} + +.left-menu > a > *, +.left-menu > div > * { font-size: 3rem; padding: 0.25rem; border-radius: 0.5rem; @@ -130,7 +146,7 @@ main.layout { box-sizing: border-box; } -.left-menu a::before { +.left-menu > a::before { content: ""; display: block; position: absolute; @@ -144,16 +160,17 @@ main.layout { transition: all 200ms ease-out; } -.left-menu a.isActive::before { +.left-menu > a.isActive::before { background-color: var(--text-color); } -.left-menu a:hover, -.left-menu a.isActive { +.left-menu > a:hover, +.left-menu > a.isActive, +.left-menu > div:hover { background-color: var(--bg-sub-color); } -.left-menu a.isActive { +.left-menu > a.isActive { border: 1px solid var(--border-color); } @@ -191,7 +208,7 @@ main.layout { box-sizing: border-box; } -.content-main .route-main.full-route { +.content-main > .route-main.full-route { padding: 0; overflow: hidden; } @@ -232,21 +249,14 @@ import { communitys, serverInfo } from "@/lib/account"; import { computed, onBeforeUnmount, onMounted, watch } from "vue"; import { createModal } from "@/lib/modal"; import ErrorModal from "@/components/Modal/Error.vue"; +import CreateCommunity from "@/components/Modal/CreateCommunity.vue"; const router = useRouter(); const route = useRoute(); const isFullRoute = computed(() => route.meta.isFullRoute === true); -watch(route, (to, from) => { - if ( - to.matched[0]?.path === from.matched[0]?.path && - from.meta.canReloadTitle === false - ) { - routerStatus.isLoad = false; - return false; - } - +watch(route, () => { if (typeof route.meta.title === "string") title.value = route.meta.title; }); @@ -290,4 +300,11 @@ onBeforeUnmount(() => { window.removeEventListener("error", handleError); window.removeEventListener("unhandledrejection", handleError); }); + +const createCommunity = () => { + createModal({ + component: CreateCommunity, + }); + return; +} \ No newline at end of file diff --git a/packages/frontend/src/components/Message.vue b/packages/frontend/src/components/Message.vue index d1a246b..9c4a6b9 100644 --- a/packages/frontend/src/components/Message.vue +++ b/packages/frontend/src/components/Message.vue @@ -1,5 +1,5 @@