diff --git a/README.md b/README.md index 4e8cb646e..94d6b212c 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,8 @@ Avoid using builds with these prefixes — they may be unstable or experimental: - No ads in the entire launcher. - Custom `.svg` vector icons for a distinct UI. -- Improved compatibility with both licensed and pirate accounts. - - Use **official microsoft accounts** or **offline/pirate accounts**. +- Improved compatibility with both licensed and offline accounts. + - Use **official microsoft accounts** or **offline accounts**. - Supports license-free access for testing or personal use. - No dependence on official authentication services. - Discord Rich Presence integration: diff --git a/apps/app-frontend/src/components/ui/AccountsCard.vue b/apps/app-frontend/src/components/ui/AccountsCard.vue index ac2c5ecad..c90123436 100644 --- a/apps/app-frontend/src/components/ui/AccountsCard.vue +++ b/apps/app-frontend/src/components/ui/AccountsCard.vue @@ -305,7 +305,7 @@ const emit = defineEmits<{ }>() type MinecraftCredential = { - account_type?: 'microsoft' | 'pirate' | 'elyby' | string + account_type?: 'microsoft' | 'offline' | 'elyby' | string profile: { id: string name: string @@ -347,7 +347,7 @@ function getAccountType(account?: MinecraftCredential) { switch (account?.account_type) { case 'microsoft': return MicrosoftIcon - case 'pirate': + case 'offline': return OfflineIcon case 'elyby': return ElyByIcon diff --git a/apps/app-frontend/src/helpers/auth.js b/apps/app-frontend/src/helpers/auth.js index 3cb0135f4..0743d12b5 100644 --- a/apps/app-frontend/src/helpers/auth.js +++ b/apps/app-frontend/src/helpers/auth.js @@ -13,11 +13,12 @@ import { invoke } from '@tauri-apps/api/core' // await authenticate_await_completion() // } +// This code function is modified by AstralRinth export async function offline_login(name) { return await invoke('plugin:auth|offline_login', { name: name }) } -// This code is modified by AstralRinth +// This code function is modified by AstralRinth export async function elyby_login(uuid, login, accessToken) { return await invoke('plugin:auth|elyby_login', { uuid, @@ -26,7 +27,7 @@ export async function elyby_login(uuid, login, accessToken) { }) } -// This code is modified by AstralRinth +// This code function is modified by AstralRinth export async function elyby_auth_authenticate(login, password, clientToken) { return await invoke('plugin:auth|elyby_auth_authenticate', { login, diff --git a/packages/app-lib/migrations/20260619152801_refactor-minecraft-users.sql b/packages/app-lib/migrations/20260619152801_refactor-minecraft-users.sql new file mode 100644 index 000000000..b6dee2cd9 --- /dev/null +++ b/packages/app-lib/migrations/20260619152801_refactor-minecraft-users.sql @@ -0,0 +1,2 @@ +-- [AR] - SQL Migration +UPDATE minecraft_users SET account_type = 'offline' WHERE account_type == 'pirate'; diff --git a/packages/app-lib/src/launcher/mod.rs b/packages/app-lib/src/launcher/mod.rs index a2bf35166..cf516e391 100644 --- a/packages/app-lib/src/launcher/mod.rs +++ b/packages/app-lib/src/launcher/mod.rs @@ -720,7 +720,7 @@ pub async fn launch_minecraft( } // This code is modified by AstralRinth - if credentials.account_type == AccountType::Pirate.as_lowercase_str() { + if credentials.account_type == AccountType::Offline.as_lowercase_str() { if version_jar == "1.16.4" || version_jar == "1.16.5" { let invalid_url = "https://invalid.invalid"; let _ = emit_info(&format!( diff --git a/packages/app-lib/src/state/minecraft_auth.rs b/packages/app-lib/src/state/minecraft_auth.rs index 1301830f8..2910ed193 100644 --- a/packages/app-lib/src/state/minecraft_auth.rs +++ b/packages/app-lib/src/state/minecraft_auth.rs @@ -194,7 +194,7 @@ pub async fn offline_auth( refresh_token: refresh_token, expires: Utc::now() + Duration::days(365 * 99), active: true, - account_type: AccountType::Pirate.as_lowercase_str(), + account_type: AccountType::Offline.as_lowercase_str(), }; credentials.offline_profile = MinecraftProfile { @@ -241,7 +241,7 @@ pub async fn elyby_auth( pub enum AccountType { Unknown, Microsoft, - Pirate, + Offline, ElyBy, } @@ -250,7 +250,7 @@ impl AccountType { match self { AccountType::Unknown => "Unknown", AccountType::Microsoft => "Microsoft", - AccountType::Pirate => "Pirate", + AccountType::Offline => "Offline", AccountType::ElyBy => "ElyBy", } }