mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-11-16 01:24:24 +08:00
26 lines
665 B
TypeScript
26 lines
665 B
TypeScript
export const getConnectionStatusMeta = (
|
|
status: "online" | "offline",
|
|
): { color: "success" | "danger"; text: string } => {
|
|
if (status === "online") {
|
|
return { color: "success", text: "在线" };
|
|
}
|
|
|
|
return { color: "danger", text: "离线" };
|
|
};
|
|
|
|
export const getRemoteSyncErrorMessage = (syncError: string): string => {
|
|
if (syncError === "provider_share_deleted") {
|
|
return "提供方已删除该分享";
|
|
}
|
|
|
|
if (syncError === "provider_share_disabled") {
|
|
return "提供方已禁用该分享";
|
|
}
|
|
|
|
if (syncError === "provider_share_expired") {
|
|
return "提供方分享已过期";
|
|
}
|
|
|
|
return `远程同步失败: ${syncError}`;
|
|
};
|