diff --git a/.github/workflows/astralrinth-build.yml b/.github/workflows/astralrinth-build.yml index c0ca17290..c5a263d74 100644 --- a/.github/workflows/astralrinth-build.yml +++ b/.github/workflows/astralrinth-build.yml @@ -42,6 +42,35 @@ jobs: with: fetch-depth: 2 + - name: πŸ” Validate Git config does not introduce CRLF + shell: bash + run: | + echo "πŸ” Checking Git config for CRLF settings..." + + autocrlf=$(git config --get core.autocrlf || echo "unset") + eol_setting=$(git config --get core.eol || echo "unset") + + echo "core.autocrlf = $autocrlf" + echo "core.eol = $eol_setting" + + if [ "$autocrlf" = "true" ]; then + echo "⚠️ WARNING: core.autocrlf is set to 'true'. Consider setting it to 'input' or 'false'." + fi + + if [ "$eol_setting" = "crlf" ]; then + echo "⚠️ WARNING: core.eol is set to 'crlf'. Consider unsetting it or setting to 'lf'." + fi + + - name: πŸ” Check migration files line endings (LF only) + shell: bash + run: | + echo "πŸ” Scanning migration SQL files for CR characters (\\r)..." + if grep -Iq $'\r' packages/app-lib/migrations/*.sql; then + echo "❌ ERROR: Some migration files contain CR (\\r) characters β€” expected only LF line endings." + exit 1 + fi + echo "βœ… All migration files use LF line endings" + - name: 🧰 Setup Rust toolchain uses: actions-rust-lang/setup-rust-toolchain@v1 with: diff --git a/apps/app-frontend/src/App.vue b/apps/app-frontend/src/App.vue index a8a76db24..81107c4fe 100644 --- a/apps/app-frontend/src/App.vue +++ b/apps/app-frontend/src/App.vue @@ -161,11 +161,11 @@ async function setupApp() { initAnalytics() if (!telemetry) { - console.info("[AR] Telemetry disabled by default (Hard patched).") + console.info("[AR] β€’ Telemetry disabled by default (Hard patched).") optOutAnalytics() } if (!personalized_ads) { - console.info("[AR] Personalized ads disabled by default (Hard patched).") + console.info("[AR] β€’ Personalized ads disabled by default (Hard patched).") } if (dev) debugAnalytics() diff --git a/apps/app-frontend/src/components/ui/ErrorModal.vue b/apps/app-frontend/src/components/ui/ErrorModal.vue index bae919081..3df0cc114 100644 --- a/apps/app-frontend/src/components/ui/ErrorModal.vue +++ b/apps/app-frontend/src/components/ui/ErrorModal.vue @@ -18,11 +18,15 @@ import { cancel_directory_change } from '@/helpers/settings.ts' import { install } from '@/helpers/profile.js' import { trackEvent } from '@/helpers/analytics' import ModalWrapper from '@/components/ui/modal/ModalWrapper.vue' +import { applyMigrationFix } from '@/helpers/utils.js' const errorModal = ref() const error = ref() const closable = ref(true) const errorCollapsed = ref(false) +const language = ref('en') +const migrationFixSuccess = ref(null) // null | true | false +const migrationFixCallbackModel = ref() const title = ref('An error occurred') const errorType = ref('unknown') @@ -148,6 +152,25 @@ async function copyToClipboard(text) { copied.value = false }, 3000) } + +function toggleLanguage() { + language.value = language.value === 'en' ? 'ru' : 'en' +} + +async function onApplyMigrationFix(eol) { + console.log(`[AR] β€’ Attempting to apply migration ${eol.toUpperCase()} fix`) + try { + const result = await applyMigrationFix(eol) + migrationFixSuccess.value = result === true + console.log(`[AR] β€’ Successfully applied migration ${eol.toUpperCase()} fix`, result) + } catch (err) { + console.error(`[AR] β€’ Failed to apply migration fix:`, err) + migrationFixSuccess.value = false + } finally { + migrationFixCallbackModel.value?.show?.() + } +} +