mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2026-04-23 22:09:51 +08:00
♻️ 公告页样式重构
This commit is contained in:
@@ -86,3 +86,21 @@ export function createPost(
|
||||
}
|
||||
createTGWindow(postPath, "Sub_window", postTitle, 960, 720, false, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 打开公告
|
||||
* @since Beta v0.3.3
|
||||
* @param {TGApp.App.Announcement.ListCard} item 公告内容或ID
|
||||
* @returns {void}
|
||||
*/
|
||||
export function createAnno(item: TGApp.App.Announcement.ListCard): void {
|
||||
const annoPath = `/anno_detail/${item.id}`;
|
||||
const annoJsonPath = `/anno_detail_json/${item.id}`;
|
||||
const annoTitle = `Anno_${item.id} ${item.title}`;
|
||||
const annoJsonTitle = `Anno_${item.id}_JSON ${item.title}`;
|
||||
const isDev = useAppStore().devMode ?? false;
|
||||
if (isDev) {
|
||||
createTGWindow(annoJsonPath, "Dev_JSON", annoJsonTitle, 960, 720, false, false);
|
||||
}
|
||||
createTGWindow(annoPath, "Sub_window", annoTitle, 960, 720, false, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user