mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
feat: calling user event from web (#4535)
* refactor: user manager * refactor: user manager * refactor: session location * refactor: user manager * chore: gen ts files * feat: implement indexeddb persistence * chore: integrate user manager * chore: update * chore: run on web thread * chore: run on web thread * chore: fix test * chore: add test * chore: add test * chore: add user & sign in with password * chore: fix test * chore: update docs * chore: fix warnings * chore: gen files * chore: add user * chore: add files * chore: update config * chore: update scirpt * chore: update scirpt * fix: build * chore: update command * fix: ci * ci: fix * fix: compile * fix: compile * fix: ci * fix: compile * fix: tauri build * chore: fix test * chore: fix test
This commit is contained in:
@ -18,7 +18,7 @@ flowy-sqlite = { workspace = true }
|
||||
flowy-document = { workspace = true }
|
||||
flowy-document-pub = { workspace = true }
|
||||
flowy-error = { workspace = true }
|
||||
flowy-server = { workspace = true }
|
||||
flowy-server = { workspace = true, features = ["enable_supabase"] }
|
||||
flowy-server-pub = { workspace = true }
|
||||
flowy-config = { workspace = true }
|
||||
flowy-date = { workspace = true }
|
||||
@ -55,21 +55,15 @@ http_sync = []
|
||||
native_sync = []
|
||||
use_bunyan = ["lib-log/use_bunyan"]
|
||||
dart = [
|
||||
"flowy-user/dart",
|
||||
"flowy-date/dart",
|
||||
"flowy-folder/dart",
|
||||
"flowy-database2/dart",
|
||||
"flowy-document/dart",
|
||||
"flowy-config/dart",
|
||||
]
|
||||
ts = [
|
||||
"flowy-user/ts",
|
||||
"flowy-date/ts",
|
||||
"flowy-user/tauri_ts",
|
||||
"flowy-folder/ts",
|
||||
"flowy-database2/ts",
|
||||
"flowy-document/ts",
|
||||
"flowy-config/ts",
|
||||
"flowy-config/tauri_ts",
|
||||
]
|
||||
rev-sqlite = ["flowy-user/rev-sqlite"]
|
||||
openssl_vendored = ["flowy-sqlite/openssl_vendored"]
|
||||
single_thread = ["collab-integrate/wasm_build"]
|
||||
enable_wasm = ["collab-integrate/enable_wasm"]
|
||||
|
@ -24,7 +24,9 @@ use flowy_folder_pub::cloud::{
|
||||
use flowy_server_pub::af_cloud_config::AFCloudConfiguration;
|
||||
use flowy_server_pub::supabase_config::SupabaseConfiguration;
|
||||
use flowy_storage::ObjectValue;
|
||||
use flowy_user_pub::cloud::{UserCloudService, UserCloudServiceProvider};
|
||||
use flowy_user_pub::cloud::{
|
||||
UserCloudService, UserCloudServiceProvider, UserCloudServiceProviderBase,
|
||||
};
|
||||
use flowy_user_pub::entities::{Authenticator, UserTokenState};
|
||||
use lib_infra::future::{to_fut, Fut, FutureResult};
|
||||
|
||||
@ -63,8 +65,9 @@ impl ObjectStorageService for ServerProvider {
|
||||
})
|
||||
}
|
||||
}
|
||||
impl UserCloudServiceProvider for ServerProvider {}
|
||||
|
||||
impl UserCloudServiceProvider for ServerProvider {
|
||||
impl UserCloudServiceProviderBase for ServerProvider {
|
||||
fn set_token(&self, token: &str) -> Result<(), FlowyError> {
|
||||
let server = self.get_server()?;
|
||||
server.set_token(token)?;
|
||||
|
@ -10,7 +10,7 @@ use flowy_document::manager::DocumentManager;
|
||||
use flowy_error::FlowyResult;
|
||||
use flowy_folder::manager::{FolderInitDataSource, FolderManager};
|
||||
use flowy_user::event_map::UserStatusCallback;
|
||||
use flowy_user_pub::cloud::{UserCloudConfig, UserCloudServiceProvider};
|
||||
use flowy_user_pub::cloud::{UserCloudConfig, UserCloudServiceProviderBase};
|
||||
use flowy_user_pub::entities::{Authenticator, UserProfile, UserWorkspace};
|
||||
use lib_infra::future::{to_fut, Fut};
|
||||
|
||||
|
@ -53,13 +53,13 @@ pub struct AppFlowyCore {
|
||||
}
|
||||
|
||||
impl AppFlowyCore {
|
||||
#[cfg(feature = "single_thread")]
|
||||
#[cfg(target_arch = "wasm32")]
|
||||
pub async fn new(config: AppFlowyCoreConfig) -> Self {
|
||||
let runtime = Arc::new(AFPluginRuntime::new().unwrap());
|
||||
Self::init(config, runtime).await
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "single_thread"))]
|
||||
#[cfg(not(target_arch = "wasm32"))]
|
||||
pub fn new(config: AppFlowyCoreConfig) -> Self {
|
||||
let runtime = Arc::new(AFPluginRuntime::new().unwrap());
|
||||
let cloned_runtime = runtime.clone();
|
||||
|
Reference in New Issue
Block a user