fix: servers misc fixes (#5475)
* fix: tags in project settings to have icons and ordered correctly * fix copy in project list layout settings * fix tag item in header navigation * adjust ping ranges * add handle click tag * fix: dont show offline in project page for draft status * move tags above creators in app * preload server project page on load and optimize queries * add server project card to organization page * fix minecraft_java_server label * pnpm prepr * have user option in project create modal be circle * feat: implement better mobile project page view * disable summary line clamp for servers * fix: unlink instance doesnt update instance * increase icon upload size * small fix on button size * improve how server ping info loads * remove unnecessary pings for instance page * fix order of computing dependency diff * remove linked_project_id from world, use name+address to match for managed world instead * pnpm prepr * hide duplicate worlds with same domain name in worlds list * add install content warning for server instance * increase summary max width * add handling for server projects for bulk editing links * implement include user unlisted projects in published modpack select * pnpm prepr * filter to only user unlisted status * add bad link warnings * fix modpack tags appearing in server * cargo fmt
This commit is contained in:
@@ -142,8 +142,6 @@ pub enum WorldDetails {
|
||||
index: usize,
|
||||
address: String,
|
||||
pack_status: ServerPackStatus,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
linked_project_id: Option<String>,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -428,7 +426,6 @@ async fn get_server_worlds_in_profile(
|
||||
index,
|
||||
address: server.ip,
|
||||
pack_status: server.accept_textures.into(),
|
||||
linked_project_id: server.linked_project_id,
|
||||
},
|
||||
};
|
||||
worlds.push(world);
|
||||
@@ -718,7 +715,6 @@ pub async fn add_server_to_profile(
|
||||
name: String,
|
||||
address: String,
|
||||
pack_status: ServerPackStatus,
|
||||
linked_project_id: Option<String>,
|
||||
) -> Result<usize> {
|
||||
let mut servers = servers_data::read(profile_path).await?;
|
||||
let insert_index = servers
|
||||
@@ -733,7 +729,6 @@ pub async fn add_server_to_profile(
|
||||
accept_textures: pack_status.into(),
|
||||
hidden: false,
|
||||
icon: None,
|
||||
linked_project_id,
|
||||
},
|
||||
);
|
||||
servers_data::write(profile_path, &servers).await?;
|
||||
@@ -746,7 +741,6 @@ pub async fn edit_server_in_profile(
|
||||
name: String,
|
||||
address: String,
|
||||
pack_status: ServerPackStatus,
|
||||
linked_project_id: Option<String>,
|
||||
) -> Result<()> {
|
||||
let mut servers = servers_data::read(profile_path).await?;
|
||||
let server =
|
||||
@@ -762,9 +756,6 @@ pub async fn edit_server_in_profile(
|
||||
server.name = name;
|
||||
server.ip = address;
|
||||
server.accept_textures = pack_status.into();
|
||||
if let Some(id) = linked_project_id {
|
||||
server.linked_project_id = Some(id);
|
||||
}
|
||||
servers_data::write(profile_path, &servers).await?;
|
||||
Ok(())
|
||||
}
|
||||
@@ -804,8 +795,6 @@ mod servers_data {
|
||||
pub name: String,
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
pub accept_textures: Option<bool>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
pub linked_project_id: Option<String>,
|
||||
}
|
||||
|
||||
pub async fn read(instance_dir: &Path) -> Result<Vec<ServerData>> {
|
||||
|
||||
Reference in New Issue
Block a user