diff --git a/theseus_gui/package.json b/theseus_gui/package.json index 5f078da38..dc15b7d5f 100644 --- a/theseus_gui/package.json +++ b/theseus_gui/package.json @@ -2,7 +2,7 @@ "name": "theseus_gui", "private": true, "version": "0.6.3", - "patch_version": "16 • Beta", + "patch_version": "17 • Beta", "type": "module", "scripts": { "dev": "vite", diff --git a/theseus_gui/src-tauri/tauri.conf.json b/theseus_gui/src-tauri/tauri.conf.json index 4f973e48a..f78e82c32 100644 --- a/theseus_gui/src-tauri/tauri.conf.json +++ b/theseus_gui/src-tauri/tauri.conf.json @@ -8,7 +8,7 @@ }, "package": { "productName": "AstralRinth App", - "version": "0.6.316" + "version": "0.6.317" }, "tauri": { "allowlist": { diff --git a/theseus_gui/src/components/ui/AccountsCard.vue b/theseus_gui/src/components/ui/AccountsCard.vue index 0a4de1445..60583af45 100644 --- a/theseus_gui/src/components/ui/AccountsCard.vue +++ b/theseus_gui/src/components/ui/AccountsCard.vue @@ -26,40 +26,46 @@
-

{{ printAccountNameType(selectedAccount) }}

+

{{ t('AccountsCard.Active') }}

-

{{ t('AccountsCard.NoAccount') }}

- +
-
@@ -127,26 +133,17 @@ + + diff --git a/theseus_gui/src/components/ui/render/Pirate.vue b/theseus_gui/src/components/ui/render/Pirate.vue new file mode 100644 index 000000000..a36ee6b87 --- /dev/null +++ b/theseus_gui/src/components/ui/render/Pirate.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/theseus_gui/src/components/ui/render/PirateShip.vue b/theseus_gui/src/components/ui/render/PirateShip.vue new file mode 100644 index 000000000..cc56c885a --- /dev/null +++ b/theseus_gui/src/components/ui/render/PirateShip.vue @@ -0,0 +1,20 @@ + + + + + diff --git a/theseus_gui/src/components/ui/render/vectors/microsoft.svg b/theseus_gui/src/components/ui/render/vectors/microsoft.svg new file mode 100644 index 000000000..ef6ebd158 --- /dev/null +++ b/theseus_gui/src/components/ui/render/vectors/microsoft.svg @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + diff --git a/theseus_gui/src/components/ui/render/vectors/pirate.svg b/theseus_gui/src/components/ui/render/vectors/pirate.svg new file mode 100644 index 000000000..15611c7d9 --- /dev/null +++ b/theseus_gui/src/components/ui/render/vectors/pirate.svg @@ -0,0 +1,47 @@ + + + + + + + + + + diff --git a/theseus_gui/src/components/ui/render/vectors/pirate_ship.svg b/theseus_gui/src/components/ui/render/vectors/pirate_ship.svg new file mode 100644 index 000000000..76be3b729 --- /dev/null +++ b/theseus_gui/src/components/ui/render/vectors/pirate_ship.svg @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/theseus_gui/src/languages/en_us.json b/theseus_gui/src/languages/en_us.json index b0502dccd..dc82180bf 100644 --- a/theseus_gui/src/languages/en_us.json +++ b/theseus_gui/src/languages/en_us.json @@ -109,7 +109,7 @@ "AccountsCard": { "MinecraftAccounts": "Minecraft accounts", "Active": "Active", - "NoAccount": "You don't have account", + "NoAccount": "You don't have account, please authenticate", "Logout": "Log out", "LoginLicense": "Log in Microsoft", "LoginOffline": "Log in Pirate", @@ -121,7 +121,7 @@ "CopyCode": "Copy code", "CopyLink": "Copy link", "PasteMS": "Paste the copied code in the browser on the Microsoft page.", - "Username": "Provide minecraft user name", + "Username": "Provide minecraft nickname", "UsernamePl": "The input field", "Add": "Add", "TryAgainError": "Unfortunately, we cannot accept such a username, please try again!", diff --git a/theseus_gui/src/languages/ru_ru.json b/theseus_gui/src/languages/ru_ru.json index 459cece34..ff4a7051d 100644 --- a/theseus_gui/src/languages/ru_ru.json +++ b/theseus_gui/src/languages/ru_ru.json @@ -109,7 +109,7 @@ "AccountsCard": { "MinecraftAccounts": "Аккаунты Minecraft", "Active": "Активный", - "NoAccount": "У вас нет аккаунта", + "NoAccount": "У вас нет аккаунта, авторизируйтесь", "Logout": "Выйти", "LoginLicense": "Войти в Microsoft", "LoginOffline": "Войти в обычный", @@ -121,7 +121,7 @@ "CopyCode": "Скопировать код", "CopyLink": "Скопировать ссылку", "PasteMS": "Вставьте скопированный код в браузере на странице Microsoft.", - "Username": "Укажите имя пользователя Minecraft", + "Username": "Введите никнейм Minecraft", "UsernamePl": "Поле для ввода", "Add": "Добавить", "TryAgainError": "К сожалению, мы не можем принять такое имя пользователя, пожалуйста, попробуйте снова!", diff --git a/theseus_gui/src/pages/Settings.vue b/theseus_gui/src/pages/Settings.vue index 09a86eb11..94029c998 100644 --- a/theseus_gui/src/pages/Settings.vue +++ b/theseus_gui/src/pages/Settings.vue @@ -12,6 +12,7 @@ import { BoxIcon, FolderSearchIcon, UpdatedIcon, + DownloadIcon } from 'omorphia' import { handleError, useTheming } from '@/store/state' import { is_dir_writeable, change_config_dir, get, set } from '@/helpers/settings' @@ -25,6 +26,7 @@ import { getOS } from '@/helpers/utils.js' import { version, patch_version } from '../../package.json' import { useLanguage } from '@/store/language.js' import { i18n } from '@/main.js'; +import PirateShipIcon from '../components/ui/render/PirateShip.vue' const t = i18n.global.t; const pageOptions = ['Home', 'Library'] @@ -146,6 +148,62 @@ async function refreshDir() { settings.value = await accessSettings().catch(handleError) settingsDir.value = settings.value.loaded_config_dir } + + +const astraliumHref = "https://www.astralium.su/get/ar" +const githubHref = "https://github.com/DIDIRUS4/AstralRinth/releases/latest" +const apiUrl = `https://api.github.com/repos/DIDIRUS4/AstralRinth/releases/latest` +const failedPattern = `Failed to fetch remote AR releases:` +const blockdownload = ref(true) +async function forceRefreshRemote() { + fetch(apiUrl) + .then((response) => { + if (!response.ok) { + throw new Error(`Failed to fetch releases. Status: ${response.status}`); + } + return response.json(); + }) + .then((data) => { + const latestRelease = data.name; + + const releaseData = document.getElementById('releaseData'); + if (!releaseData) { + console.error("Release data element not found."); + return; + } + + releaseData.textContent = latestRelease; + + const v = `v`; + const localVersion = `${v}${version}${patch_version}`; + const remoteVersion = `${releaseData.textContent}`; + + if (remoteVersion && remoteVersion.startsWith(localVersion)) { + console.log('No updates found.'); + blockdownload.value = true + } else if (remoteVersion && remoteVersion.startsWith(v)) { + console.log('New update available'); + blockdownload.value = false + } else { + blockdownload.value = true + } + + console.log(blockdownload.value) + }) + .catch((error) => { + console.log(failedPattern, error) + const errorData = document.getElementById('releaseData'); + if (errorData) { + errorData.textContent = `${error.message}`; + } + blockdownload.value = true + + console.log(blockdownload.value) + + }) +} + +await forceRefreshRemote() // Calling when Settings.vue opened