You've already forked AstralRinth
refactor(app): rename pirate minecraft accounts to offline
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
-- [AR] - SQL Migration
|
||||
UPDATE minecraft_users SET account_type = 'offline' WHERE account_type == 'pirate';
|
||||
@@ -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!(
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user