feat(theme): add dedicated popup_import theme section

This commit is contained in:
objz committed 2026-03-28 18:14:35 +01:00
1 parent 9070bef585
commit f7349cada3
4 files changed
+171 -119

No files matched your search

-10
View File
@@ -1,8 +1,6 @@
use serde::Deserialize;
use std::collections::HashMap;
// --- Modrinth API response types ---
#[derive(Debug, Clone, Deserialize)]
pub struct ProjectInfo {
pub id: String,
@@ -28,8 +26,6 @@ pub struct VersionFile {
pub primary: bool,
}
// --- .mrpack manifest types ---
#[derive(Debug, Clone, Deserialize)]
pub struct MrpackIndex {
#[serde(rename = "formatVersion")]
@@ -52,8 +48,6 @@ pub struct MrpackFile {
pub file_size: u64,
}
// --- URL parsing ---
#[derive(Debug, Clone, PartialEq)]
pub enum ModrinthInput {
ProjectSlug(String),
@@ -89,8 +83,6 @@ pub fn parse_input(input: &str) -> ModrinthInput {
ModrinthInput::ProjectSlug(input.to_string())
}
// --- Dependency key → ModLoader mapping ---
use crate::instance::models::ModLoader;
pub fn loader_from_dependencies(deps: &HashMap<String, String>) -> (Option<ModLoader>, Option<String>) {
@@ -112,8 +104,6 @@ pub fn game_version_from_dependencies(deps: &HashMap<String, String>) -> Option<
deps.get("minecraft").cloned()
}
// --- API client functions ---
const API_BASE: &str = "https://api.modrinth.com/v2";
pub async fn fetch_project(