mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
* feat: start on AI plan+billing UI * chore: enable plan and billing * feat: cache workspace subscription + minor fixes (#5705) * feat: update api from billing * feat: add api for workspace subscription info (#5717) * feat: refactor and start integrating AI plans * feat: refine UI and add business logic for AI * feat: complete UIUX for AI and limits * chore: remove resolved todo * chore: localize remove addon dialog * chore: fix spacing issue for usage * fix: interpret subscription + usage on action * chore: update api for billing (#5735) * chore: update revisions * fix: remove subscription cache * fix: copy improvements + use consistent dialog * chore: update to the latest client api * feat: support updating billing period * Feat/ai billing cancel reason (#5752) * chore: add cancellation reason field * fix: ci add one retry for concurrent sign up * chore: merge with main * chore: half merge * chore: fix conflict * chore: observer error * chore: remove unneeded protobuf and remove unwrap * feat: added subscription plan details * chore: check error code and update sidebar toast * chore: periodically check billing state * chore: editor ai error * chore: return file upload error * chore: fmt * chore: clippy * chore: disable upload image when exceed storage limitation * chore: remove todo * chore: remove openai i18n * chore: update log * chore: update client-api to fix stream error * chore: clippy * chore: fix language file * chore: disable billing UI --------- Co-authored-by: Zack Fu Zi Xiang <speed2exe@live.com.sg> Co-authored-by: nathan <nathan@appflowy.io>
22 lines
603 B
Rust
22 lines
603 B
Rust
use flowy_derive::ProtoBuf_Enum;
|
|
use flowy_notification::NotificationBuilder;
|
|
|
|
const OBSERVABLE_SOURCE: &str = "storage";
|
|
|
|
#[derive(ProtoBuf_Enum, Debug, Default)]
|
|
pub(crate) enum StorageNotification {
|
|
#[default]
|
|
FileStorageLimitExceeded = 0,
|
|
}
|
|
|
|
impl std::convert::From<StorageNotification> for i32 {
|
|
fn from(notification: StorageNotification) -> Self {
|
|
notification as i32
|
|
}
|
|
}
|
|
|
|
#[tracing::instrument(level = "trace")]
|
|
pub(crate) fn make_notification(ty: StorageNotification) -> NotificationBuilder {
|
|
NotificationBuilder::new("appflowy_file_storage_notification", ty, OBSERVABLE_SOURCE)
|
|
}
|