feat(support-info): add app support information
This commit is contained in:
16 files changed
+564
-3
No files matched your search
@@ -440,6 +440,7 @@ export const checkForUpdates = forward("checkForUpdates");
|
||||
export const getSystemProxyUrl = forward("getSystemProxyUrl");
|
||||
export const downloadAndInstallUpdate = forward("downloadAndInstallUpdate");
|
||||
export const getAppVersion = forward("getAppVersion");
|
||||
export const getAppSupportInfo = forward("getAppSupportInfo");
|
||||
|
||||
// Layout
|
||||
export const saveSidebarLayout = forward("saveSidebarLayout");
|
||||
@@ -450,6 +451,7 @@ export const loadSidebarLayout = forward("loadSidebarLayout");
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
export type {
|
||||
AppSupportInfo,
|
||||
AiMessage,
|
||||
AiCompletionRequest,
|
||||
AiTaskContract,
|
||||
|
||||
@@ -97,6 +97,7 @@ import type {
|
||||
ExplainSqlBuildResult,
|
||||
DroppedFilePreviewSqlOptions,
|
||||
MongoGridFsFileInfo,
|
||||
AppSupportInfo,
|
||||
} from "@/lib/backend/tauri";
|
||||
import type { QueryEditability } from "@/lib/sql/sqlAnalysis";
|
||||
import type {
|
||||
@@ -2102,6 +2103,17 @@ export async function getAppVersion(): Promise<string> {
|
||||
return res.version;
|
||||
}
|
||||
|
||||
export async function getAppSupportInfo(): Promise<AppSupportInfo> {
|
||||
const appVersion = await getAppVersion();
|
||||
return {
|
||||
appVersion,
|
||||
runtime: "web",
|
||||
osName: navigator.platform || "web",
|
||||
osVersion: null,
|
||||
arch: "",
|
||||
};
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Layout
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
@@ -200,6 +200,14 @@ export interface WebDavSyncSecretsStatus {
|
||||
hasSavedPassphrase: boolean;
|
||||
}
|
||||
|
||||
export interface AppSupportInfo {
|
||||
appVersion: string;
|
||||
runtime: "desktop" | "web";
|
||||
osName: string;
|
||||
osVersion?: string | null;
|
||||
arch: string;
|
||||
}
|
||||
|
||||
export interface QueryPagination {
|
||||
limit: number;
|
||||
offset: number;
|
||||
@@ -1301,6 +1309,10 @@ export async function getAppVersion(): Promise<string> {
|
||||
return getVersion();
|
||||
}
|
||||
|
||||
export async function getAppSupportInfo(): Promise<AppSupportInfo> {
|
||||
return invoke<AppSupportInfo>("get_app_support_info");
|
||||
}
|
||||
|
||||
// --- Redis ---
|
||||
export interface RedisKeyInfo {
|
||||
key_display: string;
|
||||
|
||||
Reference in new issue
Block a user