♻️ 公告页样式重构

This commit is contained in:
BTMuli
2023-10-15 16:57:48 +08:00
parent cbce3eda60
commit 3691397cec
4 changed files with 158 additions and 152 deletions

View File

@@ -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);
}