diff --git a/Cargo.lock b/Cargo.lock index 936c918a2..928d4200f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -888,9 +888,9 @@ dependencies = [ [[package]] name = "daedalus" -version = "0.1.23" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d14d655650f5f0fd5b88946d4add0f1b02d866e40632304cfe1427240bfd2430" +checksum = "247a958ffad4a2a44fb081a2b1ef39d6b4698c179949542b202236a460102762" dependencies = [ "bincode 2.0.0-rc.3", "bytes", diff --git a/theseus/Cargo.toml b/theseus/Cargo.toml index d0a08bf06..55469b69e 100644 --- a/theseus/Cargo.toml +++ b/theseus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "theseus" -version = "0.5.3" +version = "0.5.4" authors = ["Jai A "] edition = "2018" @@ -24,7 +24,7 @@ tempfile = "3.5.0" urlencoding = "2.1.3" chrono = { version = "0.4.19", features = ["serde"] } -daedalus = { version = "0.1.23" } +daedalus = { version = "0.1.25" } dirs = "5.0.1" regex = "1.5" diff --git a/theseus/src/api/jre.rs b/theseus/src/api/jre.rs index f83bc8b8f..4d1f44889 100644 --- a/theseus/src/api/jre.rs +++ b/theseus/src/api/jre.rs @@ -92,7 +92,7 @@ pub async fn auto_install_java(java_version: u32) -> crate::Result { let packages = fetch_json::>( Method::GET, &format!( - "https://api.azul.com/metadata/v1/zulu/packages?arch={}&java_version={}&os={}&archive_type=zip&javafx_bundled=false&java_package_type=jre&page_size=1", + "https://api.azul.com/metadata/v1/zulu/packages?arch={}&java_version={}&os={}&archive_type=zip&javafx_bundled=false&java_package_type=jdk&page_size=1", std::env::consts::ARCH, java_version, std::env::consts::OS ), None, diff --git a/theseus/src/api/mr_auth.rs b/theseus/src/api/mr_auth.rs index a87f66090..7fa61ff71 100644 --- a/theseus/src/api/mr_auth.rs +++ b/theseus/src/api/mr_auth.rs @@ -90,22 +90,6 @@ pub async fn login_2fa( Ok(creds) } -#[tracing::instrument] -pub async fn login_minecraft( - flow: &str, -) -> crate::Result { - let state = crate::State::get().await?; - let creds = - crate::state::login_minecraft(flow, &state.fetch_semaphore).await?; - - if let ModrinthCredentialsResult::Credentials(creds) = &creds { - let mut write = state.credentials.write().await; - write.login(creds.clone()).await?; - } - - Ok(creds) -} - #[tracing::instrument] pub async fn create_account( username: &str, diff --git a/theseus_cli/Cargo.toml b/theseus_cli/Cargo.toml index dbd711776..6815982d3 100644 --- a/theseus_cli/Cargo.toml +++ b/theseus_cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "theseus_cli" -version = "0.5.3" +version = "0.5.4" authors = ["Jai A "] edition = "2018" diff --git a/theseus_gui/package.json b/theseus_gui/package.json index 9f174da93..4c766697b 100644 --- a/theseus_gui/package.json +++ b/theseus_gui/package.json @@ -1,7 +1,7 @@ { "name": "theseus_gui", "private": true, - "version": "0.5.3", + "version": "0.5.4", "type": "module", "scripts": { "dev": "vite", diff --git a/theseus_gui/src-tauri/Cargo.toml b/theseus_gui/src-tauri/Cargo.toml index 3eec861ff..75db1eeff 100644 --- a/theseus_gui/src-tauri/Cargo.toml +++ b/theseus_gui/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "theseus_gui" -version = "0.5.3" +version = "0.5.4" description = "A Tauri App" authors = ["you"] license = "" diff --git a/theseus_gui/src-tauri/src/api/mr_auth.rs b/theseus_gui/src-tauri/src/api/mr_auth.rs index 0f8f1534e..e988e8ef9 100644 --- a/theseus_gui/src-tauri/src/api/mr_auth.rs +++ b/theseus_gui/src-tauri/src/api/mr_auth.rs @@ -10,7 +10,6 @@ pub fn init() -> TauriPlugin { cancel_flow, login_pass, login_2fa, - login_minecraft, create_account, refresh, logout, @@ -49,11 +48,6 @@ pub async fn login_2fa(code: &str, flow: &str) -> Result { Ok(theseus::mr_auth::login_2fa(code, flow).await?) } -#[tauri::command] -pub async fn login_minecraft(flow: &str) -> Result { - Ok(theseus::mr_auth::login_minecraft(flow).await?) -} - #[tauri::command] pub async fn create_account( username: &str, diff --git a/theseus_gui/src-tauri/tauri.conf.json b/theseus_gui/src-tauri/tauri.conf.json index 1c717cf1a..374c8501c 100644 --- a/theseus_gui/src-tauri/tauri.conf.json +++ b/theseus_gui/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "Modrinth App", - "version": "0.5.3" + "version": "0.5.4" }, "tauri": { "allowlist": { diff --git a/theseus_gui/src/components/ui/ExportModal.vue b/theseus_gui/src/components/ui/ExportModal.vue index 35ac903e2..7acf92282 100644 --- a/theseus_gui/src/components/ui/ExportModal.vue +++ b/theseus_gui/src/components/ui/ExportModal.vue @@ -38,7 +38,17 @@ const initFiles = async () => { .map((folder) => ({ path: folder, name: folder.split(sep).pop(), - selected: false, + selected: + folder.startsWith('mods') || + folder.startsWith('datapacks') || + folder.startsWith('resourcepacks') || + folder.startsWith('shaderpacks') || + folder.startsWith('config'), + disabled: + folder === 'profile.json' || + folder.startsWith('modrinth_logs') || + folder.startsWith('.fabric') || + folder.includes('.DS_Store'), })) .forEach((pathData) => { const parent = pathData.path.split(sep).slice(0, -1).join(sep) @@ -115,7 +125,7 @@ const exportPack = async () => {
-
Select files as overrides
+
Select files and folders to include in pack
@@ -125,6 +135,7 @@ const exportPack = async () => { :model-value="children.every((child) => child.selected)" :label="path.name" class="select-checkbox" + :disabled="children.every((x) => x.disabled)" @update:model-value=" (newValue) => children.forEach((child) => (child.selected = newValue)) " @@ -137,7 +148,12 @@ const exportPack = async () => {
- +
@@ -145,7 +161,12 @@ const exportPack = async () => {
- +
diff --git a/theseus_gui/src/components/ui/tutorial/ModrinthLoginScreen.vue b/theseus_gui/src/components/ui/tutorial/ModrinthLoginScreen.vue index b36823422..2227afa2d 100644 --- a/theseus_gui/src/components/ui/tutorial/ModrinthLoginScreen.vue +++ b/theseus_gui/src/components/ui/tutorial/ModrinthLoginScreen.vue @@ -14,8 +14,6 @@ import { login_2fa, create_account, login_pass, - get as getCreds, - login_minecraft, } from '@/helpers/mr_auth.js' import { handleError, useNotifications } from '@/store/state.js' import { onMounted, ref } from 'vue' @@ -33,10 +31,6 @@ const props = defineProps({ type: Boolean, required: true, }, - flow: { - type: String, - default: null, - }, }) const loggingIn = ref(true) @@ -118,15 +112,6 @@ async function createAccount() { } async function goToNextPage() { - const creds = await getCreds().catch(handleError) - if (!creds) { - try { - await login_minecraft(props.flow) - } catch { - /* empty */ - } - } - props.nextPage() } diff --git a/theseus_gui/src/helpers/mr_auth.js b/theseus_gui/src/helpers/mr_auth.js index 2509e6785..889faffd4 100644 --- a/theseus_gui/src/helpers/mr_auth.js +++ b/theseus_gui/src/helpers/mr_auth.js @@ -24,9 +24,6 @@ export async function login_2fa(code, flow) { return await invoke('plugin:mr_auth|login_2fa', { code, flow }) } -export async function login_minecraft(flow) { - return await invoke('plugin:mr_auth|login_minecraft', { flow }) -} export async function create_account(username, email, password, challenge, signUpNewsletter) { return await invoke('plugin:mr_auth|create_account', { username,