From e9bc01b0c7198511ea41871cd4aed1b67bc0907d Mon Sep 17 00:00:00 2001 From: didirus Date: Tue, 27 Jan 2026 20:50:55 +0300 Subject: [PATCH] refactor: update comments to reflect modifications by AstralRinth --- apps/app-frontend/src/App.vue | 11 +++++----- .../src/components/ui/AccountsCard.vue | 22 +++++++++---------- .../src/components/ui/ErrorModal.vue | 2 +- .../components/ui/modal/AppSettingsModal.vue | 2 +- apps/app-frontend/src/helpers/auth.js | 4 ++-- apps/app-frontend/src/helpers/events.js | 2 +- apps/app-frontend/src/helpers/utils.js | 6 ++--- apps/app/src/api/utils.rs | 6 ++--- packages/app-lib/src/api/mod.rs | 2 +- packages/app-lib/src/launcher/mod.rs | 4 ++-- packages/app-lib/src/lib.rs | 2 +- packages/app-lib/src/state/db.rs | 5 +++-- packages/app-lib/src/state/dirs.rs | 2 +- packages/app-lib/src/state/discord.rs | 8 +++---- packages/app-lib/src/state/minecraft_auth.rs | 6 ++--- packages/app-lib/src/util/mod.rs | 2 +- packages/app-lib/src/util/utils.rs | 6 ++--- packages/assets/index.ts | 2 +- packages/assets/styles/neon-button.scss | 4 ++-- packages/assets/styles/neon-icon.scss | 4 ++-- packages/assets/styles/neon-text.scss | 2 +- 21 files changed, 53 insertions(+), 51 deletions(-) diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index 5d8b7c88..efdcab6f 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -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', diff --git a/apps/app-frontend/src/components/ui/AccountsCard.vue b/apps/app-frontend/src/components/ui/AccountsCard.vue index 1e60f947..0e0066ee 100644 --- a/apps/app-frontend/src/components/ui/AccountsCard.vue +++ b/apps/app-frontend/src/components/ui/AccountsCard.vue @@ -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) diff --git a/apps/app-frontend/src/components/ui/ErrorModal.vue b/apps/app-frontend/src/components/ui/ErrorModal.vue index 1636ce4a..54c9cbd8 100644 --- a/apps/app-frontend/src/components/ui/ErrorModal.vue +++ b/apps/app-frontend/src/components/ui/ErrorModal.vue @@ -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' diff --git a/apps/app-frontend/src/components/ui/modal/AppSettingsModal.vue b/apps/app-frontend/src/components/ui/modal/AppSettingsModal.vue index c4dbed40..e0eaf980 100644 --- a/apps/app-frontend/src/components/ui/modal/AppSettingsModal.vue +++ b/apps/app-frontend/src/components/ui/modal/AppSettingsModal.vue @@ -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) diff --git a/apps/app-frontend/src/helpers/auth.js b/apps/app-frontend/src/helpers/auth.js index 3f3753ec..3cb0135f 100644 --- a/apps/app-frontend/src/helpers/auth.js +++ b/apps/app-frontend/src/helpers/auth.js @@ -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, diff --git a/apps/app-frontend/src/helpers/events.js b/apps/app-frontend/src/helpers/events.js index d318cc0e..2e585ba7 100644 --- a/apps/app-frontend/src/helpers/events.js +++ b/apps/app-frontend/src/helpers/events.js @@ -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)) } diff --git a/apps/app-frontend/src/helpers/utils.js b/apps/app-frontend/src/helpers/utils.js index 7eb67546..139a05cf 100644 --- a/apps/app-frontend/src/helpers/utils.js +++ b/apps/app-frontend/src/helpers/utils.js @@ -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 }) } diff --git a/apps/app/src/api/utils.rs b/apps/app/src/api/utils.rs index 89159d0d..9abc2920 100644 --- a/apps/app/src/api/utils.rs +++ b/apps/app/src/api/utils.rs @@ -31,7 +31,7 @@ pub fn init() -> tauri::plugin::TauriPlugin { .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 { 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, diff --git a/packages/app-lib/src/api/mod.rs b/packages/app-lib/src/api/mod.rs index ff0dc7f9..bd08d88b 100644 --- a/packages/app-lib/src/api/mod.rs +++ b/packages/app-lib/src/api/mod.rs @@ -13,7 +13,7 @@ pub mod process; pub mod profile; pub mod server_address; pub mod settings; -pub mod update; // [AR] Feature +pub mod update; // This code is modified by AstralRinth pub mod tags; pub mod worlds; diff --git a/packages/app-lib/src/launcher/mod.rs b/packages/app-lib/src/launcher/mod.rs index 8a0cb8a2..a76d49a4 100644 --- a/packages/app-lib/src/launcher/mod.rs +++ b/packages/app-lib/src/launcher/mod.rs @@ -18,7 +18,7 @@ use chrono::Utc; use daedalus as d; use daedalus::minecraft::{LoggingSide, RuleAction, VersionInfo}; use daedalus::modded::LoaderVersion; -use rand::seq::SliceRandom; // [AR] Feature +use rand::seq::SliceRandom; // This code is modified by AstralRinth use regex::Regex; use serde::Deserialize; use st::Profile; @@ -796,7 +796,7 @@ pub async fn launch_minecraft( } } - // [AR] Feature + // This code is modified by AstralRinth let selected_phrase = ACTIVE_STATE.choose(&mut rand::thread_rng()).unwrap(); let _ = state .discord_rpc diff --git a/packages/app-lib/src/lib.rs b/packages/app-lib/src/lib.rs index 8fd85c10..a326ab01 100644 --- a/packages/app-lib/src/lib.rs +++ b/packages/app-lib/src/lib.rs @@ -8,7 +8,7 @@ and launching Modrinth mod packs #![deny(unused_must_use)] #[macro_use] -pub mod util; // [AR] Refactor +pub mod util; // This code is modified by AstralRinth mod api; mod error; diff --git a/packages/app-lib/src/state/db.rs b/packages/app-lib/src/state/db.rs index c939fd64..88d570e4 100644 --- a/packages/app-lib/src/state/db.rs +++ b/packages/app-lib/src/state/db.rs @@ -23,7 +23,8 @@ pub(crate) async fn connect() -> crate::Result> { Ok(pool) } -// [AR] Feature. Implement SQLite3 connection without SQLx migrations. +// This code is modified by AstralRinth +// Implement SQLite3 connection without SQLx migrations. async fn connect_without_migrate() -> crate::Result> { let settings_dir = DirectoryInfo::get_initial_settings_dir().ok_or( ErrorKind::FSError("Could not find valid config dir".to_string()), @@ -72,7 +73,7 @@ async fn stale_data_cleanup(pool: &Pool) -> crate::Result<()> { Ok(()) } /* -// [AR] Patch fix +// This code is modified by AstralRinth Problem files, view detailed information in .gitattributes: /packages/app-lib/migrations/20240711194701_init.sql !eol CRLF -> 4c47e326f16f2b1efca548076ce638d4c90dd610172fe48c47d6de9bc46ef1c5abeadfdea05041ddd72c3819fa10c040 diff --git a/packages/app-lib/src/state/dirs.rs b/packages/app-lib/src/state/dirs.rs index b0f5a46a..1bf05d0b 100644 --- a/packages/app-lib/src/state/dirs.rs +++ b/packages/app-lib/src/state/dirs.rs @@ -22,7 +22,7 @@ pub struct DirectoryInfo { impl DirectoryInfo { // Get the settings directory // init() is not needed for this function - // [AR] Patch fix. From PR. + // This code is modified by AstralRinth pub fn get_initial_settings_dir() -> Option { Self::env_path("THESEUS_CONFIG_DIR").or_else(|| { if std::env::current_dir().ok()?.join("portable.txt").exists() { diff --git a/packages/app-lib/src/state/discord.rs b/packages/app-lib/src/state/discord.rs index 0c87d1e5..792de7db 100644 --- a/packages/app-lib/src/state/discord.rs +++ b/packages/app-lib/src/state/discord.rs @@ -1,17 +1,17 @@ -// [AR] Feature +// This code is modified by AstralRinth use std::{ sync::{atomic::AtomicBool, Arc}, time::{SystemTime, UNIX_EPOCH}, }; use discord_rich_presence::{ - activity::{Activity, Assets, Timestamps}, // [AR] Feature + activity::{Activity, Assets, Timestamps}, // This code is modified by AstralRinth DiscordIpc, DiscordIpcClient, }; -use rand::seq::SliceRandom; // [AR] Feature +use rand::seq::SliceRandom; // This code is modified by AstralRinth use tokio::sync::RwLock; -use crate::util::utils; // [AR] Feature +use crate::util::utils; // This code is modified by AstralRinth use crate::State; pub struct DiscordGuard { diff --git a/packages/app-lib/src/state/minecraft_auth.rs b/packages/app-lib/src/state/minecraft_auth.rs index 020629ee..65a3356c 100644 --- a/packages/app-lib/src/state/minecraft_auth.rs +++ b/packages/app-lib/src/state/minecraft_auth.rs @@ -179,7 +179,7 @@ pub async fn login_finish( Ok(credentials) } -// [AR] Feature +// This code is modified by AstralRinth #[tracing::instrument] pub async fn offline_auth( name: &str, @@ -209,7 +209,7 @@ pub async fn offline_auth( Ok(credentials) } -// [AR] Feature +// This code is modified by AstralRinth #[tracing::instrument] pub async fn elyby_auth( uuid: Uuid, @@ -237,7 +237,7 @@ pub async fn elyby_auth( Ok(credentials) } -/// [AR] • Feature +// This code is modified by AstralRinth #[derive(Deserialize, Debug)] pub enum AccountType { Unknown, diff --git a/packages/app-lib/src/util/mod.rs b/packages/app-lib/src/util/mod.rs index 4039af8e..51771147 100644 --- a/packages/app-lib/src/util/mod.rs +++ b/packages/app-lib/src/util/mod.rs @@ -4,7 +4,7 @@ pub mod io; pub mod jre; pub mod network; pub mod platform; -pub mod utils; // [AR] Feature +pub mod utils; // This code is modified by AstralRinth pub mod protocol_version; pub mod rpc; pub mod server_ping; diff --git a/packages/app-lib/src/util/utils.rs b/packages/app-lib/src/util/utils.rs index b21f4e9b..45735956 100644 --- a/packages/app-lib/src/util/utils.rs +++ b/packages/app-lib/src/util/utils.rs @@ -1,8 +1,8 @@ use crate::api::update; use crate::state::db; /// -/// [AR] Feature Utils -/// +/// This code is modified by AstralRinth +/// /// Version: 0.1.1 /// use crate::{Result, State}; @@ -84,7 +84,7 @@ pub async fn get_or_download_elyby_injector() -> Result { Err(err) => { if let Some((local_path, _)) = local_authlib_injectors .iter() - .max_by(|a, b| a.1.cmp(&b.1)) + .max_by(|a, b| a.1.cmp(&b.1)) { tracing::info!("[AR] • Found local AuthLib Injector(s):"); for (path, time) in &local_authlib_injectors { diff --git a/packages/assets/index.ts b/packages/assets/index.ts index 50511a0b..7e3ed1d1 100644 --- a/packages/assets/index.ts +++ b/packages/assets/index.ts @@ -117,7 +117,7 @@ export const USDCColorIcon = _USDCColorIcon export const VisaIcon = _VisaIcon export const MinecraftServerIcon = _MinecraftServerIcon -// [AR] Styles +// This code is modified by AstralRinth import _AstralRinthLogo from './icons/astralrinth-logo.svg?component' import _ElyByIcon from './icons/elyby-icon.svg?component' import _MicrosoftIcon from './icons/microsoft.svg?component' diff --git a/packages/assets/styles/neon-button.scss b/packages/assets/styles/neon-button.scss index 91e201f3..d6f21e01 100644 --- a/packages/assets/styles/neon-button.scss +++ b/packages/assets/styles/neon-button.scss @@ -1,4 +1,4 @@ -// [AR] Feature +// This code is modified by AstralRinth .neon-button.neon :deep(:is(button, a, .button-like)), .neon-button.neon :slotted(:is(button, a, .button-like)), .neon-button.neon :slotted(*) :is(button, a, .button-like) { @@ -36,4 +36,4 @@ text-shadow: 0 0 2px rgba(16, 250, 229, 0.4), 0 0 4px rgba(16, 250, 229, 0.25); -} \ No newline at end of file +} diff --git a/packages/assets/styles/neon-icon.scss b/packages/assets/styles/neon-icon.scss index a0e2fb62..cc6ea91b 100644 --- a/packages/assets/styles/neon-icon.scss +++ b/packages/assets/styles/neon-icon.scss @@ -1,4 +1,4 @@ -// [AR] Feature +// This code is modified by AstralRinth .neon-icon { background-color: transparent; color: #3e8cde; @@ -34,4 +34,4 @@ 50% { filter: drop-shadow(0 0 12px #10fae5); } -} \ No newline at end of file +} diff --git a/packages/assets/styles/neon-text.scss b/packages/assets/styles/neon-text.scss index 1899f2b6..a10fc85b 100644 --- a/packages/assets/styles/neon-text.scss +++ b/packages/assets/styles/neon-text.scss @@ -1,4 +1,4 @@ -// [AR] Feature +// This code is modified by AstralRinth .neon-text { background-color: transparent; color: #3e8cde;