You've already forked AstralRinth
refactor: align files tab with content tab design (#5621)
* fix: files.vue bugs before styling changes * feat: move files tab to shared layout structure * fix: qa * fix: qa * fix: bugs * fix: lint * fix: admonition cleanup with progress + actions * fix: cleanup * fix: modals * fix: admon title * fix: i18n standard * fix: lint + i18n pass * fix: remove transition * fix: type errors * feat: files tab in app * fix: qa * fix: backup item minmax * fix: use ContentPageHeader for server panel * fix: lint * fix: lint * fix: lint * feat: page leave safety * fix: lint * fix: cargo fmt fix * fix: blank in prod * fix: content card table stuff * Revert "fix: blank in prod" This reverts commit 74758fe185cf85a4a20355857f889cb091b97ace. * fix: import * feat: browse worlds/servers flow * fix: worlds tab parity with content tab * fix: perf bug + shader filter pill copy * feat: singleplayer filter * fix: ordering * fix: breadcrumbs * fix: lint * fix: qa * feat: store server proj id when adding to a non-linked instance * fix: lint * fix: i18n + qa * fix: conflict * qa: already installed modal + placeholders not server-specific * fix: qa * fix: add + edit server modals * fix: qa * fix: security * fix: devin flags * fix: lint * chore: change file to break build cache * fix: admon * fix: import path stuff * feat: qa * fix: fmt fmt idiot --------- Signed-off-by: Calum H. <calum@modrinth.com>
This commit is contained in:
@@ -5,6 +5,8 @@ use std::collections::HashMap;
|
||||
#[derive(Debug, Clone, Default)]
|
||||
pub struct AttachedWorldData {
|
||||
pub display_status: DisplayStatus,
|
||||
pub project_id: Option<String>,
|
||||
pub content_kind: Option<String>,
|
||||
}
|
||||
|
||||
impl AttachedWorldData {
|
||||
@@ -18,7 +20,7 @@ impl AttachedWorldData {
|
||||
|
||||
let attached_data = sqlx::query!(
|
||||
"
|
||||
SELECT display_status
|
||||
SELECT display_status, project_id, content_kind
|
||||
FROM attached_world_data
|
||||
WHERE profile_path = $1 and world_type = $2 and world_id = $3
|
||||
",
|
||||
@@ -31,6 +33,8 @@ impl AttachedWorldData {
|
||||
|
||||
Ok(attached_data.map(|x| AttachedWorldData {
|
||||
display_status: DisplayStatus::from_string(&x.display_status),
|
||||
project_id: x.project_id,
|
||||
content_kind: x.content_kind,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -40,7 +44,7 @@ impl AttachedWorldData {
|
||||
) -> crate::Result<HashMap<(WorldType, String), Self>> {
|
||||
let attached_data = sqlx::query!(
|
||||
"
|
||||
SELECT world_type, world_id, display_status
|
||||
SELECT world_type, world_id, display_status, project_id, content_kind
|
||||
FROM attached_world_data
|
||||
WHERE profile_path = $1
|
||||
",
|
||||
@@ -57,7 +61,11 @@ impl AttachedWorldData {
|
||||
DisplayStatus::from_string(&x.display_status);
|
||||
(
|
||||
(world_type, x.world_id),
|
||||
AttachedWorldData { display_status },
|
||||
AttachedWorldData {
|
||||
display_status,
|
||||
project_id: x.project_id,
|
||||
content_kind: x.content_kind,
|
||||
},
|
||||
)
|
||||
})
|
||||
.collect())
|
||||
@@ -120,3 +128,5 @@ macro_rules! attached_data_setter {
|
||||
}
|
||||
|
||||
attached_data_setter!(display_status: DisplayStatus, "display_status" => display_status.as_str());
|
||||
attached_data_setter!(project_id: &str, "project_id");
|
||||
attached_data_setter!(content_kind: &str, "content_kind");
|
||||
|
||||
Reference in New Issue
Block a user