新增图片画布项目页

新增 /project 项目页和我的页项目入口

补齐图片画布工程列表、重命名和删除 API

支持 /editor/canvas 按 projectid 加载指定工程

更新图片画布文档、TRACKING 和对应测试
This commit is contained in:
2026-06-14 00:11:36 +08:00
parent b2122481ff
commit 85834a423d
32 changed files with 1800 additions and 20 deletions

View File

@@ -0,0 +1,59 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::editor_project_delete_input_type::EditorProjectDeleteInput;
use super::editor_project_delete_procedure_result_type::EditorProjectDeleteProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct DeleteEditorProjectAndReturnArgs {
pub input: EditorProjectDeleteInput,
}
impl __sdk::InModule for DeleteEditorProjectAndReturnArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `delete_editor_project_and_return`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait delete_editor_project_and_return {
fn delete_editor_project_and_return(&self, input: EditorProjectDeleteInput) {
self.delete_editor_project_and_return_then(input, |_, _| {});
}
fn delete_editor_project_and_return_then(
&self,
input: EditorProjectDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<EditorProjectDeleteProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl delete_editor_project_and_return for super::RemoteProcedures {
fn delete_editor_project_and_return_then(
&self,
input: EditorProjectDeleteInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<EditorProjectDeleteProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, EditorProjectDeleteProcedureResult>(
"delete_editor_project_and_return",
DeleteEditorProjectAndReturnArgs { input },
__callback,
);
}
}

View File

@@ -0,0 +1,16 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct EditorProjectDeleteInput {
pub project_id: String,
pub owner_user_id: String,
}
impl __sdk::InModule for EditorProjectDeleteInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,17 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct EditorProjectDeleteProcedureResult {
pub ok: bool,
pub deleted_project_id: Option<String>,
pub error_message: Option<String>,
}
impl __sdk::InModule for EditorProjectDeleteProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,15 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct EditorProjectListInput {
pub owner_user_id: String,
}
impl __sdk::InModule for EditorProjectListInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,19 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::editor_project_snapshot_type::EditorProjectSnapshot;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct EditorProjectListProcedureResult {
pub ok: bool,
pub projects: Vec<EditorProjectSnapshot>,
pub error_message: Option<String>,
}
impl __sdk::InModule for EditorProjectListProcedureResult {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,18 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
pub struct EditorProjectRenameInput {
pub project_id: String,
pub owner_user_id: String,
pub title: String,
pub updated_at_micros: i64,
}
impl __sdk::InModule for EditorProjectRenameInput {
type Module = super::RemoteModule;
}

View File

@@ -0,0 +1,59 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::editor_project_list_input_type::EditorProjectListInput;
use super::editor_project_list_procedure_result_type::EditorProjectListProcedureResult;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct ListEditorProjectsAndReturnArgs {
pub input: EditorProjectListInput,
}
impl __sdk::InModule for ListEditorProjectsAndReturnArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `list_editor_projects_and_return`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait list_editor_projects_and_return {
fn list_editor_projects_and_return(&self, input: EditorProjectListInput) {
self.list_editor_projects_and_return_then(input, |_, _| {});
}
fn list_editor_projects_and_return_then(
&self,
input: EditorProjectListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<EditorProjectListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl list_editor_projects_and_return for super::RemoteProcedures {
fn list_editor_projects_and_return_then(
&self,
input: EditorProjectListInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<EditorProjectListProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, EditorProjectListProcedureResult>(
"list_editor_projects_and_return",
ListEditorProjectsAndReturnArgs { input },
__callback,
);
}
}

View File

@@ -0,0 +1,59 @@
// THIS FILE IS AUTOMATICALLY GENERATED BY SPACETIMEDB. EDITS TO THIS FILE
// WILL NOT BE SAVED. MODIFY TABLES IN YOUR MODULE SOURCE CODE INSTEAD.
#![allow(unused, clippy::all)]
use spacetimedb_sdk::__codegen::{self as __sdk, __lib, __sats, __ws};
use super::editor_project_procedure_result_type::EditorProjectProcedureResult;
use super::editor_project_rename_input_type::EditorProjectRenameInput;
#[derive(__lib::ser::Serialize, __lib::de::Deserialize, Clone, PartialEq, Debug)]
#[sats(crate = __lib)]
struct RenameEditorProjectAndReturnArgs {
pub input: EditorProjectRenameInput,
}
impl __sdk::InModule for RenameEditorProjectAndReturnArgs {
type Module = super::RemoteModule;
}
#[allow(non_camel_case_types)]
/// Extension trait for access to the procedure `rename_editor_project_and_return`.
///
/// Implemented for [`super::RemoteProcedures`].
pub trait rename_editor_project_and_return {
fn rename_editor_project_and_return(&self, input: EditorProjectRenameInput) {
self.rename_editor_project_and_return_then(input, |_, _| {});
}
fn rename_editor_project_and_return_then(
&self,
input: EditorProjectRenameInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<EditorProjectProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
);
}
impl rename_editor_project_and_return for super::RemoteProcedures {
fn rename_editor_project_and_return_then(
&self,
input: EditorProjectRenameInput,
__callback: impl FnOnce(
&super::ProcedureEventContext,
Result<EditorProjectProcedureResult, __sdk::InternalError>,
) + Send
+ 'static,
) {
self.imp
.invoke_procedure_with_callback::<_, EditorProjectProcedureResult>(
"rename_editor_project_and_return",
RenameEditorProjectAndReturnArgs { input },
__callback,
);
}
}