diff --git a/main.js b/main.js index 2042452..e4500f3 100644 --- a/main.js +++ b/main.js @@ -224,9 +224,9 @@ async function start() { try { sendToTauri('status', { message: 'Inspecting local workspace and installed files...' }); - let isFirstRun = !patcher.verifyExtraction(); - let localVersion = patcher.getCurrentVersion(); - let localSha = patcher.getCurrentSha(); + let isFirstRun = false; + let localVersion = '0.0.0'; + let localSha = 'force-update-sha'; debugLog(`Is First Run: ${isFirstRun}, Local Version: ${localVersion}, Local SHA: ${localSha}`); function findLocalZip() { @@ -249,36 +249,10 @@ async function start() { return null; } - const localFound = findLocalZip(); - let localZipPath = localFound ? localFound.zipPath : null; - let localManifestPath = localFound ? localFound.manifestPath : null; + let localZipPath = null; + let localManifestPath = null; let localZipManifest = null; - if (localManifestPath) { - try { - localZipManifest = JSON.parse(fs.readFileSync(localManifestPath, 'utf8')); - } catch (e) { } - } - - if (localZipPath && (isFirstRun || (localZipManifest && localZipManifest.sha256 !== localSha))) { - debugLog(`Applying local development payload from: ${localZipPath}`); - sendToTauri('status', { message: 'Extracting local development payload...' }); - patcher.purgeOldCode(); - patcher.extractZipPayload(localZipPath); - patcher.applyPatches(getReplacementsConfig()); - patcher.bridgeCredentials(serviceManager.credentialManager); - - const ver = localZipManifest ? localZipManifest.version : '1.1.32'; - const sha = localZipManifest ? localZipManifest.sha256 : null; - patcher.saveCurrentVersion(ver, sha); - serviceManager.envConfig = getEnvConfig(); - - isFirstRun = false; - localVersion = ver; - localSha = sha; - debugLog("Local payload applied successfully."); - } - sendToTauri('status', { message: 'Connecting to update servers...' }); let release = null; try { @@ -292,17 +266,6 @@ async function start() { } catch (e) { } if (release && release.version) { - const rVer = release.version.replace('v', '').split('.').map(Number); - const aVer = appPkgVer.split('.').map(Number); - let isOlder = false; - for (let i = 0; i < 3; i++) { - if ((rVer[i] || 0) < (aVer[i] || 0)) { isOlder = true; break; } - if ((rVer[i] || 0) > (aVer[i] || 0)) { break; } - } - if (isOlder) { - debugLog(`Remote version ${release.version} is older than local package ${appPkgVer}. Ignoring remote release.`); - release = null; - } } } catch (e) { debugLog(`Update check failed (offline?): ${e.message}`); @@ -323,7 +286,7 @@ async function start() { } else if (hasUpdate) { debugLog("Update available. Prompting user..."); - sendToTauri('status', { message: `New update available (${release.version}). Awaiting confirmation...` }); + sendToTauri('status', { message: `New update available (${release.version}).` }); try { if (process.platform === 'win32') { diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index d169945..0292835 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -269,110 +269,11 @@ const LINK_HANDLER_SCRIPT: &str = }, true); function injectLiquidNavBar() { - if (document.getElementById('vyla-floating-nav')) return; + if (document.getElementById('tauri-custom-titlebar')) return; if (!document.body) return; const style = document.createElement('style'); style.innerHTML = ` - #vyla-floating-nav { - position: fixed !important; - top: 12px !important; - left: 12px !important; - z-index: 2147483647 !important; - height: 42px !important; - width: 42px !important; - border-radius: 9999px !important; - display: flex !important; - align-items: center !important; - background: rgba(255, 255, 255, 0.04) !important; - backdrop-filter: blur(16px) saturate(1.8) contrast(1.1) !important; - -webkit-backdrop-filter: blur(16px) saturate(1.8) contrast(1.1) !important; - box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45) !important; - transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important; - overflow: hidden !important; - padding: 0 !important; - user-select: none !important; - pointer-events: auto !important; - -webkit-app-region: no-drag !important; - } - - #vyla-floating-nav:hover { - width: 82px !important; - padding-right: 6px !important; - } - - .vyla-nav-logo-wrap { - width: 42px !important; - min-width: 42px !important; - height: 42px !important; - display: flex !important; - align-items: center !important; - justify-content: center !important; - cursor: pointer !important; - border-radius: 9999px !important; - position: relative !important; - z-index: 2147483647 !important; - pointer-events: auto !important; - padding: 0 !important; - } - - .vyla-nav-logo-wrap img { - width: 26px !important; - height: 26px !important; - min-width: 26px !important; - min-height: 26px !important; - object-fit: contain !important; - pointer-events: none !important; - display: block !important; - } - - .vyla-nav-links { - display: flex !important; - align-items: center !important; - gap: 4px !important; - opacity: 0 !important; - transform: translateX(-6px) !important; - transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important; - pointer-events: none !important; - position: relative !important; - z-index: 2 !important; - margin-left: 2px !important; - } - - #vyla-floating-nav:hover .vyla-nav-links { - opacity: 1 !important; - transform: translateX(0) !important; - pointer-events: auto !important; - } - - .vyla-nav-btn { - width: 32px !important; - min-width: 32px !important; - height: 32px !important; - border-radius: 9999px !important; - border: none !important; - outline: none !important; - background: transparent !important; - box-shadow: none !important; - color: #ffffff !important; - display: flex !important; - align-items: center !important; - justify-content: center !important; - cursor: pointer !important; - transition: transform 0.15s ease, opacity 0.2s ease !important; - opacity: 0.85 !important; - padding: 0 !important; - } - - .vyla-nav-btn:hover { opacity: 1 !important; } - .vyla-nav-btn svg { - width: 20px !important; - height: 20px !important; - fill: #ffffff !important; - pointer-events: none !important; - display: block !important; - } - #tauri-custom-titlebar { position: fixed !important; top: 0 !important; @@ -429,38 +330,6 @@ const LINK_HANDLER_SCRIPT: &str = `; document.head.appendChild(style); - const nav = document.createElement('div'); - nav.id = 'vyla-floating-nav'; - nav.innerHTML = ` -
- Logo -
- - `; - document.body.appendChild(nav); - - const logoBtn = nav.querySelector('.vyla-nav-logo-wrap'); - if (logoBtn) { - logoBtn.onclick = (e) => { - e.preventDefault(); - e.stopPropagation(); - window.location.href = 'http://127.0.0.1:4890'; - }; - } - - const btnDiscord = nav.querySelector('#vyla-btn-discord'); - if (btnDiscord) { - btnDiscord.onclick = (e) => { - e.preventDefault(); - e.stopPropagation(); - openExternalUrl('https://discord.gg/5eqRhKeywG'); - }; - } - const tb = document.createElement('div'); tb.id = 'tauri-custom-titlebar'; tb.innerHTML = ` diff --git a/ui/index.html b/ui/index.html index 4805213..8f7e443 100644 --- a/ui/index.html +++ b/ui/index.html @@ -196,7 +196,7 @@
Starting runtime engine...