added server and realm tabs to inventory screen
This commit is contained in:
parent
ee425e224e
commit
acab2f017d
12 changed files with 647 additions and 151 deletions
|
|
@ -640,6 +640,23 @@ pub struct InventoryResponse {
|
|||
pub items: Vec<InventoryItem>,
|
||||
}
|
||||
|
||||
/// A public prop from server or realm library.
|
||||
/// Used for the public inventory tabs (Server/Realm).
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "ssr", derive(sqlx::FromRow))]
|
||||
pub struct PublicProp {
|
||||
pub id: Uuid,
|
||||
pub name: String,
|
||||
pub asset_path: String,
|
||||
pub description: Option<String>,
|
||||
}
|
||||
|
||||
/// Response for public props list.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct PublicPropsResponse {
|
||||
pub props: Vec<PublicProp>,
|
||||
}
|
||||
|
||||
/// A prop dropped in a channel, available for pickup.
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[cfg_attr(feature = "ssr", derive(sqlx::FromRow))]
|
||||
|
|
@ -680,6 +697,7 @@ pub struct ServerProp {
|
|||
pub is_transferable: bool,
|
||||
pub is_portable: bool,
|
||||
pub is_droppable: bool,
|
||||
pub is_public: bool,
|
||||
pub is_active: bool,
|
||||
pub available_from: Option<DateTime<Utc>>,
|
||||
pub available_until: Option<DateTime<Utc>>,
|
||||
|
|
@ -720,6 +738,12 @@ pub struct CreateServerPropRequest {
|
|||
/// Grid position (0-8): top row 0,1,2 / middle 3,4,5 / bottom 6,7,8
|
||||
#[serde(default)]
|
||||
pub default_position: Option<i16>,
|
||||
/// Whether prop is droppable (can be dropped in a channel).
|
||||
#[serde(default)]
|
||||
pub droppable: Option<bool>,
|
||||
/// Whether prop appears in the public Server inventory tab.
|
||||
#[serde(default)]
|
||||
pub public: Option<bool>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "ssr")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue