mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
* chore: refactor the publish code * feat: integrate publish into database page * feat: add publish database structure * feat: add database row collab * feat: publish the database row collabs * chore: update collab * chore: improve question bubble * feat: publish the database relations * fix: rust ci * feat: select grid view to publish * feat: unable to deselect the primary database * feat: optimize the read recent views speed (#5726) * feat: optimize the read recent views speed * fix: order of recent views should be from the latest to the oldest * chore: update translations * fix: replace the unable to be selected icon * feat: remove left padding of inline database * fix: code review * chore: remove publish api err log * chore: read the database collab and document collab from disk instead of memory * chore: code cleanup * chore: revert beta.appflowy.com * chore: code cleanup * test: add database encode test * test: add publish database test * chore: refresh sidebar layout * chore: update comments
55 lines
1.1 KiB
Rust
55 lines
1.1 KiB
Rust
use flowy_derive::ProtoBuf;
|
|
use flowy_folder_pub::entities::PublishInfoResponse;
|
|
|
|
use super::RepeatedViewIdPB;
|
|
|
|
#[derive(Default, ProtoBuf)]
|
|
pub struct PublishViewParamsPB {
|
|
#[pb(index = 1)]
|
|
pub view_id: String,
|
|
|
|
#[pb(index = 2, one_of)]
|
|
pub publish_name: Option<String>,
|
|
|
|
#[pb(index = 3, one_of)]
|
|
pub selected_view_ids: Option<RepeatedViewIdPB>,
|
|
}
|
|
|
|
#[derive(Default, ProtoBuf)]
|
|
pub struct UnpublishViewsPayloadPB {
|
|
#[pb(index = 1)]
|
|
pub view_ids: Vec<String>,
|
|
}
|
|
|
|
#[derive(Default, ProtoBuf)]
|
|
pub struct PublishInfoResponsePB {
|
|
#[pb(index = 1)]
|
|
pub view_id: String,
|
|
#[pb(index = 2)]
|
|
pub publish_name: String,
|
|
#[pb(index = 3, one_of)]
|
|
pub namespace: Option<String>,
|
|
}
|
|
|
|
impl From<PublishInfoResponse> for PublishInfoResponsePB {
|
|
fn from(info: PublishInfoResponse) -> Self {
|
|
Self {
|
|
view_id: info.view_id,
|
|
publish_name: info.publish_name,
|
|
namespace: info.namespace,
|
|
}
|
|
}
|
|
}
|
|
|
|
#[derive(Default, ProtoBuf)]
|
|
pub struct SetPublishNamespacePayloadPB {
|
|
#[pb(index = 1)]
|
|
pub new_namespace: String,
|
|
}
|
|
|
|
#[derive(Default, ProtoBuf)]
|
|
pub struct PublishNamespacePB {
|
|
#[pb(index = 1)]
|
|
pub namespace: String,
|
|
}
|