- orchestration.rs:同步子系统编排核心(能力判定/全局与实例开关/重协调) - command_history.rs + hotbars.rs:命令历史与创造模式快捷栏同步 - synced_packs_axolotl.rs:资源包/数据包共享投影(单文件实现) - resource_pack_options.rs:resourcesPacks 列表读写与合并(synced_packs 依赖) - 解决循环依赖:synced_options_path 归入 files.rs;SyncedOptionJoinResolution 归入 pending.rs - instance_rows 补 set_instance_sync_preference;api/instance/mod.rs 补 synced_packs 内联模块与三块 pub use - 6 处 sqlx::query! 宏改写为非宏 已知:未编译验证;local_settings_editor 尚未搬入。
This commit is contained in:
1 parent
ed61a5942c
commit
6e9485c2f5
9 files changed
+3739
-1
No files matched your search
@@ -1835,6 +1835,25 @@ mod tests {
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) async fn set_instance_sync_preference(
|
||||
instance_id: &str,
|
||||
option: crate::state::SyncedOption,
|
||||
enabled: bool,
|
||||
pool: &SqlitePool,
|
||||
) -> crate::Result<()> {
|
||||
sqlx::query(
|
||||
"INSERT INTO instance_sync_preferences (instance_id, feature, enabled)
|
||||
VALUES (?, ?, ?)
|
||||
ON CONFLICT(instance_id, feature) DO UPDATE SET enabled = excluded.enabled",
|
||||
)
|
||||
.bind(instance_id)
|
||||
.bind(option.as_str())
|
||||
.bind(enabled)
|
||||
.execute(pool)
|
||||
.await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn get_instance_synced_options(
|
||||
instance_id: &str,
|
||||
pool: &SqlitePool,
|
||||
|
||||
Reference in new issue
Block a user