mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: web and tauri project (#4996)
* chore: web and tauri project fix: clippy * fix: update version
This commit is contained in:
@ -22,6 +22,7 @@ pub struct ProtoCache {
|
||||
|
||||
pub enum Project {
|
||||
Tauri,
|
||||
TauriApp,
|
||||
Web { relative_path: String },
|
||||
Native,
|
||||
}
|
||||
@ -30,6 +31,9 @@ impl Project {
|
||||
pub fn dst(&self) -> String {
|
||||
match self {
|
||||
Project::Tauri => "appflowy_tauri/src/services/backend".to_string(),
|
||||
Project::TauriApp => {
|
||||
"appflowy_web_app/src/application/services/tauri-services/backend".to_string()
|
||||
},
|
||||
Project::Web { .. } => "appflowy_web/src/services/backend".to_string(),
|
||||
Project::Native => panic!("Native project is not supported yet."),
|
||||
}
|
||||
@ -37,7 +41,7 @@ impl Project {
|
||||
|
||||
pub fn event_root(&self) -> String {
|
||||
match self {
|
||||
Project::Tauri => "../../".to_string(),
|
||||
Project::Tauri | Project::TauriApp => "../../".to_string(),
|
||||
Project::Web { relative_path } => relative_path.to_string(),
|
||||
Project::Native => panic!("Native project is not supported yet."),
|
||||
}
|
||||
@ -45,7 +49,7 @@ impl Project {
|
||||
|
||||
pub fn model_root(&self) -> String {
|
||||
match self {
|
||||
Project::Tauri => "../../".to_string(),
|
||||
Project::Tauri | Project::TauriApp => "../../".to_string(),
|
||||
Project::Web { relative_path } => relative_path.to_string(),
|
||||
Project::Native => panic!("Native project is not supported yet."),
|
||||
}
|
||||
@ -53,7 +57,7 @@ impl Project {
|
||||
|
||||
pub fn event_imports(&self) -> String {
|
||||
match self {
|
||||
Project::Tauri => r#"
|
||||
Project::TauriApp | Project::Tauri => r#"
|
||||
/// Auto generate. Do not edit
|
||||
import { Ok, Err, Result } from "ts-results";
|
||||
import { invoke } from "@tauri-apps/api/tauri";
|
||||
|
Reference in New Issue
Block a user