mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-24 12:44:18 +08:00
style: fix code formatting and defer templates migration
This commit is contained in:
@@ -430,6 +430,12 @@ impl Database {
|
||||
Self::migrate_v2_to_v3(conn)?;
|
||||
Self::set_user_version(conn, 3)?;
|
||||
}
|
||||
// v3 -> v4: Claude Code Templates 市场功能(暂未启用)
|
||||
// 3 => {
|
||||
// log::info!("迁移数据库从 v3 到 v4(Claude Code Templates 市场功能)");
|
||||
// Self::migrate_v3_to_v4(conn)?;
|
||||
// Self::set_user_version(conn, 4)?;
|
||||
// }
|
||||
_ => {
|
||||
return Err(AppError::Database(format!(
|
||||
"未知的数据库版本 {version},无法迁移到 {SCHEMA_VERSION}"
|
||||
@@ -870,8 +876,9 @@ impl Database {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// v2 -> v3 迁移:添加 Claude Code Templates 功能相关表
|
||||
fn migrate_v2_to_v3(conn: &Connection) -> Result<(), AppError> {
|
||||
/// v3 -> v4 迁移:添加 Claude Code Templates 功能相关表
|
||||
#[allow(dead_code)]
|
||||
fn migrate_v3_to_v4(conn: &Connection) -> Result<(), AppError> {
|
||||
// 1. template_repos 表 - 存储模板仓库信息
|
||||
conn.execute(
|
||||
"CREATE TABLE IF NOT EXISTS template_repos (
|
||||
|
||||
+9
-9
@@ -13,7 +13,7 @@ import {
|
||||
Wrench,
|
||||
Server,
|
||||
RefreshCw,
|
||||
Package,
|
||||
Package,
|
||||
Search,
|
||||
Download,
|
||||
} from "lucide-react";
|
||||
@@ -476,13 +476,13 @@ function App() {
|
||||
</div>
|
||||
);
|
||||
case "templates":
|
||||
return <TemplatesPage activeApp={activeApp} />;
|
||||
default:
|
||||
return (
|
||||
<div className="mx-auto max-w-[56rem] px-5 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
|
||||
{/* 独立滚动容器 - 解决 Linux/Ubuntu 下 DndContext 与滚轮事件冲突 */}
|
||||
<div className="flex-1 overflow-y-auto overflow-x-hidden pb-12 px-1">
|
||||
<AnimatePresence mode="wait">
|
||||
return <TemplatesPage activeApp={activeApp} />;
|
||||
default:
|
||||
return (
|
||||
<div className="mx-auto max-w-[56rem] px-5 flex flex-col h-[calc(100vh-8rem)] overflow-hidden">
|
||||
{/* 独立滚动容器 - 解决 Linux/Ubuntu 下 DndContext 与滚轮事件冲突 */}
|
||||
<div className="flex-1 overflow-y-auto overflow-x-hidden pb-12 px-1">
|
||||
<AnimatePresence mode="wait">
|
||||
<motion.div
|
||||
key={activeApp}
|
||||
initial={{ opacity: 0 }}
|
||||
@@ -617,7 +617,7 @@ function App() {
|
||||
{currentView === "skillsDiscovery" && t("skills.title")}
|
||||
{currentView === "mcp" && t("mcp.unifiedPanel.title")}
|
||||
{currentView === "agents" && t("agents.title")}
|
||||
{currentView === "templates" && t("templates.title")}
|
||||
{currentView === "templates" && t("templates.title")}
|
||||
{currentView === "universal" &&
|
||||
t("universalProvider.title", {
|
||||
defaultValue: "统一供应商",
|
||||
|
||||
@@ -1121,7 +1121,6 @@
|
||||
"partialFail": "{{count}} 個のコンポーネントのインストールに失敗しました",
|
||||
"installFailed": "バンドルのインストールに失敗しました"
|
||||
}
|
||||
|
||||
},
|
||||
"health": {
|
||||
"operational": "正常",
|
||||
|
||||
Reference in New Issue
Block a user