refactor: update comments to reflect modifications by AstralRinth

This commit is contained in:
2026-01-27 20:50:55 +03:00
parent 572800d9ca
commit e9bc01b0c7
21 changed files with 53 additions and 51 deletions

View File

@@ -95,7 +95,7 @@ import { generateSkinPreviews } from './helpers/rendering/batch-skin-renderer'
import { get_available_capes, get_available_skins } from './helpers/skins'
import { AppNotificationManager } from './providers/app-notifications'
// [AR] Imports
// This code is modified by AstralRinth
import { get, set } from '@/helpers/settings.ts'
import { getRemote, updateState } from '@/helpers/update.js'
@@ -164,9 +164,10 @@ const authUnreachable = computed(() => {
return false
})
// This code is modified by AstralRinth
onMounted(async () => {
await useCheckDisableMouseover()
await getRemote(false) // [AR] Check for updates
await getRemote(false)
document.querySelector('body').addEventListener('click', handleClick)
document.querySelector('body').addEventListener('auxclick', handleAuxClick)
@@ -210,8 +211,8 @@ const messages = defineMessages({
},
})
// This code is modified by AstralRinth
async function setupApp() {
// [AR] Patched
const settings = await get()
settings.personalized_ads = false
settings.telemetry = false
@@ -258,7 +259,7 @@ async function setupApp() {
isMaximized.value = await getCurrentWindow().isMaximized()
})
// [AR] Patched
// This code is modified by AstralRinth
if (!telemetry) {
console.info("[AR] • Telemetry disabled by default (Hard patched).")
optOutAnalytics()
@@ -286,7 +287,7 @@ async function setupApp() {
}),
)
// [AR] Info listener
// This code is modified by AstralRinth
await info_listener((e) =>
addNotification({
title: 'Info',

View File

@@ -286,7 +286,7 @@ const microsoftLoginDisabled = ref(false)
const elyByLoginDisabled = ref(false)
const defaultUser = ref()
// [AR] • Feature
// This code is modified by AstralRinth
const clientToken = 'astralrinth'
const addOfflineModal = ref(null)
const addElyByModal = ref(null)
@@ -304,7 +304,7 @@ const maxOfflinePlayerNameLength = 20
const nameExp = 'a-zA-Z0-9_'
const nameRegex = new RegExp(`^[${nameExp}]+$`)
// [AR] • Feature
// This code is modified by AstralRinth
function getAccountType(account) {
switch (account.account_type) {
case 'microsoft':
@@ -316,24 +316,24 @@ function getAccountType(account) {
}
}
// [AR] • Feature
// This code is modified by AstralRinth
function showOfflineLoginModal() {
addOfflineModal.value?.show()
}
// [AR] • Feature
// This code is modified by AstralRinth
function showElyByLoginModal() {
addElyByModal.value?.show()
}
// [AR] • Feature
// This code is modified by AstralRinth
function retryAddOfflineProfile() {
inputOfflineErrorModal.value?.hide()
clearOfflineFields()
showOfflineLoginModal()
}
// [AR] • Feature
// This code is modified by AstralRinth
function retryAddElyByProfile() {
authenticationElyByErrorModal.value?.hide()
inputElyByErrorModal.value?.hide()
@@ -342,19 +342,19 @@ function retryAddElyByProfile() {
showElyByLoginModal()
}
// [AR] • Feature
// This code is modified by AstralRinth
function clearElyByFields() {
elyByLogin.value = ''
elyByPassword.value = ''
elyByTwoFactorCode.value = ''
}
// [AR] • Feature
// This code is modified by AstralRinth
function clearOfflineFields() {
offlinePlayerName.value = ''
}
// [AR] • Feature
// This code is modified by AstralRinth
async function addOfflineProfile() {
const name = offlinePlayerName.value.trim()
const isValidName =
@@ -388,7 +388,7 @@ async function addOfflineProfile() {
}
}
// [AR] • Feature
// This code is modified by AstralRinth
async function addElyByProfile() {
elyByLoginDisabled.value = true
if (!elyByLogin.value || !elyByPassword.value) {
@@ -450,7 +450,7 @@ async function addElyByProfile() {
}
}
// [AR] • Feature
// This code is modified by AstralRinth
function convertRawStringToUUIDv4(rawId) {
if (rawId.length !== 32) {
console.warn('Invalid UUID string:', rawId)

View File

@@ -19,7 +19,7 @@ import { install } from '@/helpers/profile.js'
import { cancel_directory_change } from '@/helpers/settings.ts'
import { handleSevereError } from '@/store/error.js'
// [AR] Imports
// This code is modified by AstralRinth
import { applyMigrationFix } from '@/helpers/utils.js'
import { restartApp } from '@/helpers/utils.js'

View File

@@ -26,7 +26,7 @@ import PrivacySettings from '@/components/ui/settings/PrivacySettings.vue'
import ResourceManagementSettings from '@/components/ui/settings/ResourceManagementSettings.vue'
import { get, set } from '@/helpers/settings.ts'
// [AR] Imports
// This code is modified by AstralRinth
import { installState, getRemote, updateState } from '@/helpers/update.js'
const updateModalView = ref(null)

View File

@@ -17,7 +17,7 @@ export async function offline_login(name) {
return await invoke('plugin:auth|offline_login', { name: name })
}
// [AR] • Feature
// This code is modified by AstralRinth
export async function elyby_login(uuid, login, accessToken) {
return await invoke('plugin:auth|elyby_login', {
uuid,
@@ -26,7 +26,7 @@ export async function elyby_login(uuid, login, accessToken) {
})
}
// [AR] • Feature
// This code is modified by AstralRinth
export async function elyby_auth_authenticate(login, password, clientToken) {
return await invoke('plugin:auth|elyby_auth_authenticate', {
login,

View File

@@ -98,7 +98,7 @@ export async function friend_listener(callback) {
return await listen('friend', (event) => callback(event.payload))
}
// [AR] Payload for the 'info' event
// This code is modified by AstralRinth
export async function info_listener(callback) {
return await listen('info', (event) => callback(event.payload))
}

View File

@@ -27,18 +27,18 @@ export async function getOS() {
return await invoke('plugin:utils|get_os')
}
// [AR] Feature. Updater
// This code is modified by AstralRinth
export async function initUpdateLauncher(downloadUrl, filename, osType, autoUpdateSupported) {
console.log('Downloading build', downloadUrl, filename, osType, autoUpdateSupported)
return await invoke('plugin:utils|init_update_launcher', { downloadUrl, filename, osType, autoUpdateSupported })
}
// [AR] Migration. Patch
// This code is modified by AstralRinth
export async function applyMigrationFix(eol) {
return await invoke('plugin:utils|apply_migration_fix', { eol })
}
// [AR] Feature. Ely.by
// This code is modified by AstralRinth
export async function initAuthlibPatching(minecraftVersion, isMojang) {
return await invoke('plugin:utils|init_authlib_patching', { minecraftVersion, isMojang })
}

View File

@@ -31,7 +31,7 @@ pub fn init<R: Runtime>() -> tauri::plugin::TauriPlugin<R> {
.build()
}
/// [AR] Feature. Ely.by
// This code is modified by AstralRinth
#[tauri::command]
pub async fn init_authlib_patching(
minecraft_version: &str,
@@ -42,14 +42,14 @@ pub async fn init_authlib_patching(
Ok(result)
}
/// [AR] Migration. Patch
// This code is modified by AstralRinth
#[tauri::command]
pub async fn apply_migration_fix(eol: &str) -> Result<bool> {
let result = utils::apply_migration_fix(eol).await?;
Ok(result)
}
/// [AR] Feature. Updater
// This code is modified by AstralRinth
#[tauri::command]
pub async fn init_update_launcher(
download_url: &str,