diff --git a/src/components/t-sidebar.vue b/src/components/t-sidebar.vue
index b72fc035..5a8d17cb 100644
--- a/src/components/t-sidebar.vue
+++ b/src/components/t-sidebar.vue
@@ -29,57 +29,17 @@
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -141,8 +101,6 @@ import { event } from "@tauri-apps/api";
// store
import { useAppStore } from "../store/modules/app";
import { useUserStore } from "../store/modules/user";
-// utils
-import TGRequest from "../web/request/TGRequest";
const appStore = useAppStore();
const userStore = useUserStore();
@@ -173,7 +131,6 @@ const open = computed({
return appStore.getSubmenu();
},
set (value: string[]) {
- appStore.sidebar.submenu.mihoyo = value.includes("mihoyo");
appStore.sidebar.submenu.wiki = value.includes("wiki");
},
});
diff --git a/src/store/modules/app.ts b/src/store/modules/app.ts
index 9dbae6b5..9539205e 100644
--- a/src/store/modules/app.ts
+++ b/src/store/modules/app.ts
@@ -32,8 +32,6 @@ export const useAppStore = defineStore(
collapse: true,
// 是否显示
submenu: {
- // 米游社
- mihoyo: false,
// 数据库
wiki: false,
},
@@ -59,15 +57,15 @@ export const useAppStore = defineStore(
function init (): void {
loading.value = false;
devMode.value = false;
- sidebar.submenu.mihoyo = false;
- sidebar.submenu.wiki = false;
+ sidebar.submenu = {
+ wiki: false,
+ };
theme.value = "default";
}
function getSubmenu (): string[] {
const open = [];
if (sidebar.submenu.wiki) open.push("wiki");
- if (sidebar.submenu.mihoyo) open.push("mihoyo");
return open;
}
diff --git a/src/views/t-news.vue b/src/views/t-news.vue
index f3825f9b..2e42adb6 100644
--- a/src/views/t-news.vue
+++ b/src/views/t-news.vue
@@ -14,12 +14,15 @@
新闻
-
+
mdi-bullhorn
切换游戏内公告
+
+ mdi-view-list
+
{{ snackbarText }}
+
+
+
+ 请选择要跳转的频道
+
+
+
+
+

+
+
+ 原神
+
+
+
+
+

+
+
+ 崩坏:星穹铁道
+
+
+
+
+

+
+
+ 崩坏3
+
+
+
+
+

+
+
+ 崩坏2
+
+
+
+
+

+
+
+ 未定事件簿
+
+
+
+
+

+
+
+ 绝区零
+
+
+
+
+

+
+
+ 大别野
+
+
+
+
+
@@ -164,7 +232,6 @@ import { NewsCard, NewsData } from "../plugins/Mys/interface/news";
const router = useRouter();
const gid = useRoute().params.gid as string;
const showNews = ref((gid !== "5") as boolean);
-const showSwitch = ref((gid === "2") as boolean);
// Store
const appStore = useAppStore();
@@ -183,6 +250,7 @@ const search = ref("" as string);
// 数据
const tab = ref("" as string);
+const showList = ref(false as boolean);
const postData = ref({
notice: [] as NewsCard[],
activity: [] as NewsCard[],
@@ -237,6 +305,12 @@ async function switchAnno () {
await router.push("/announcements");
}
+async function toChannel (chan:string) {
+ showList.value = false;
+ await router.push(chan);
+ await window.location.reload();
+}
+
// 加载更多
async function loadMore (data: string) {
loadingSub.value = true;
@@ -379,7 +453,7 @@ async function searchPost () {
overflow: hidden;
}
-.news-cover :hover {
+.news-cover:hover {
transform: scale(1.1);
transition: all 0.3s linear;
cursor: pointer;
@@ -402,6 +476,15 @@ async function searchPost () {
color: var(--content-text-3);
}
+.switch-chan {
+ font-family: Genshin, serif;
+ background: var(--btn-bg-1);
+ height: 40px;
+ margin-right: 10px;
+ margin-top: 5px;
+ color: var(--content-text-3);
+}
+
/* load more */
.load-news {
font-family: Genshin, serif;
@@ -423,4 +506,75 @@ async function searchPost () {
width: 18px;
height: 18px;
}
+
+/* chan choice */
+.choice-box {
+ position: absolute;
+ top: calc(50vh - 200px);
+ left: calc(50vw - 140px);
+ width: 400px;
+ height: 280px;
+ background: var(--content-bg-2);
+ border-radius: 10px;
+ padding: 10px;
+}
+
+.choice-title {
+ font-family: Genshin, serif;
+ font-size: 20px;
+ color: var(--content-text-3);
+ margin-bottom: 10px;
+}
+
+.choice-list {
+ display: grid;
+ grid-template-columns: repeat(2, 1fr);
+ grid-gap: 10px;
+}
+
+.choice-item {
+ cursor: pointer;
+ font-family: Genshin, serif;
+ background: rgb(0 0 0 / 30%);
+ color: var(--content-text-3);
+ height: 45px;
+ border-radius: 5px;
+ display: flex;
+ justify-content: space-around;
+ transition: all 0.3s linear;
+}
+
+.choice-item:hover {
+ border-radius: 5px;
+ background: rgb(0 0 0 / 50%);
+ transition: all 0.5s linear;
+}
+
+.choice-icon {
+ position: relative;
+ width: 45px;
+ height: 45px;
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+}
+
+.choice-icon img {
+ width: 45px;
+ height: 45px;
+ border-top-left-radius: 5px;
+ border-bottom-left-radius: 5px;
+}
+
+.choice-name {
+ width: calc(100% - 50px);
+ height: 45px;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-left: 5px;
+ position: relative;
+ color: #fff;
+ font-size: 12px;
+ font-family: Genshin-Light, serif;
+}