更新 update 门户站点界面和后台功能
build-winui / winui (push) Has been cancelled

This commit is contained in:
QWQLwToo
2026-06-27 18:09:11 +08:00
parent 2513eb2903
commit 962a2f2143
56 changed files with 4564 additions and 714 deletions
@@ -3,8 +3,8 @@ import { reactive, ref } from "vue";
export function createFeedbackStore() {
const page = ref<any>({ items: [], total: 0, page: 1, perPage: 20 });
const selected = ref<any | null>(null);
const filters = reactive({ q: "", status: "", page: 1, perPage: 20 });
const update = reactive({ status: "", statusDetail: "", publicReply: "" });
const filters = reactive({ q: "", status: "", priority: "", page: 1, perPage: 20 });
const update = reactive({ status: "", priority: "", statusDetail: "", publicReply: "" });
const commentDraft = reactive({ body: "", internal: true });
return { page, selected, filters, update, commentDraft };
@@ -5,10 +5,18 @@ export type LegacyName = "update-info" | "media-types";
export function createLegacyStore() {
const sync = ref<any>(null);
const documents = reactive<Record<LegacyName, any | null>>({ "update-info": null, "media-types": null });
const modal = reactive({
open: false,
type: "",
categoryIndex: -1,
itemIndex: -1,
draft: {} as any,
});
const activeMediaCategoryIndex = ref(0);
const drafts = reactive<Record<LegacyName, { raw: string; note: string; preview: any | null; tab: "form" | "raw" | "preview" | "history"; form: any }>>({
"update-info": { raw: "", note: "", preview: null, tab: "form", form: {} },
"media-types": { raw: "", note: "", preview: null, tab: "form", form: { categories: [] } },
});
return { sync, documents, drafts };
return { sync, documents, drafts, modal, activeMediaCategoryIndex };
}
@@ -2,11 +2,52 @@ import { reactive, ref } from "vue";
export function createSystemStore() {
const database = ref<any>(null);
const databaseConfig = ref<any>(null);
const databaseLastSync = ref<any>(null);
const healthSnapshot = ref<any>(null);
const auditLogs = ref<any[]>([]);
const databaseForm = reactive({ provider: "sqlite", sqlitePath: "", mysqlDsn: "" });
const auditPage = reactive({
items: [] as any[],
total: 0,
page: 1,
perPage: 35,
q: "",
type: "",
target: "",
selected: null as any | null,
});
const migrationStatus = ref<any>(null);
const branding = reactive({
siteIconUrl: "https://img.ymhut.cn/file/1782108850041_icon.webp",
developerAvatarUrl: "https://img.ymhut.cn/file/1782108780690_b_3db45f3787f19192c8de8e06bc0987ef.webp",
developerName: "YMhut",
feedbackEmail: "support@ymhut.cn",
});
const databaseForm = reactive({
provider: "sqlite",
sqlitePath: "",
mysqlHost: "127.0.0.1",
mysqlPort: 3306,
mysqlDatabase: "",
mysqlUser: "",
mysqlPassword: "",
mysqlDsn: "",
});
const databaseConfigCollapsed = ref(true);
const mailConfig = reactive({
host: "",
port: 465,
secure: "ssl",
username: "",
password: "",
fromAddress: "",
fromName: "YMhut Box Feedback",
developerAddress: "",
timeoutSeconds: 20,
hasPassword: false,
configured: false,
});
const legacySyncMode = ref<"preview" | "run">("preview");
return { database, databaseLastSync, healthSnapshot, auditLogs, databaseForm, legacySyncMode };
return { database, databaseConfig, databaseLastSync, healthSnapshot, auditLogs, auditPage, migrationStatus, branding, databaseForm, databaseConfigCollapsed, mailConfig, legacySyncMode };
}