Skip to content

Commit

Permalink
[bug] Fix check install Aurora CLI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Vitaliy Zarubin committed Nov 4, 2024
1 parent 91f8307 commit 1b379c1
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 38 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

### Subscribe and like!

[![Version](https://img.shields.io/badge/deb_package-0.0.10-blue)](https://github.com/keygenqt/aurora-toolbox/releases)
[![Version](https://img.shields.io/badge/deb_package-0.0.11-blue)](https://github.com/keygenqt/aurora-toolbox/releases)

![Preview](https://raw.githubusercontent.com/keygenqt/aurora-toolbox/refs/heads/main/files/images/preview_telegram.png)

Expand Down
2 changes: 1 addition & 1 deletion data/ui/dialogs/AboutDialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<property name="presentation-mode">floating</property>
<property name="application-icon">com.keygenqt.aurora-toolbox</property>
<property name="application-name" translatable="yes">Aurora Toolbox</property>
<property name="version">0.0.10</property>
<property name="version">0.0.11</property>
<property name="copyright">© 2024 KeyGenQt</property>
<property name="issue_url">https://github.com/keygenqt/aurora-toolbox/issues</property>
<property name="developer-name" translatable="yes">Vitaliy Zarubin</property>
Expand Down
4 changes: 2 additions & 2 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ hide:

Установка на примере дистрибутива Ubuntu, но так же доступен rpm пакет, который можно установит примерно так:
```shell
sudo rpm -i aurora-toolbox_0.0.10-1_x86_64.rpm
sudo rpm -i aurora-toolbox_0.0.11-1_x86_64.rpm
```


#### Install

```shell
sudo dpkg -i aurora-toolbox_0.0.10-1_amd64.deb
sudo dpkg -i aurora-toolbox_0.0.11-1_amd64.deb
```

#### Update/Install dependency
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Define our project
project(
'aurora-toolbox',
version: '0.0.10',
version: '0.0.11',
license: ['Apache 2.0'],
meson_version: '>= 0.59.0',
default_options: ['cpp_std=c++17', 'cpp_rtti=false', 'cpp_eh=none',
Expand Down
2 changes: 1 addition & 1 deletion src/base/constants/AppConstants.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import GLib from 'gi://GLib';

export const AppConstants = Object.freeze({
App: {
version: '0.0.10',
version: '0.0.11',
doc: 'https://keygenqt.github.io/aurora-toolbox/',
docInstall: 'https://keygenqt.github.io/aurora-toolbox/install/',
latestRelease: 'https://api.github.com/repos/keygenqt/aurora-toolbox/releases/latest',
Expand Down
62 changes: 30 additions & 32 deletions src/feature/pages/welcome/WelcomePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,40 +74,38 @@ export const WelcomePage = GObject.registerClass({
this.#window.navigation().push(this.utils.constants.Pages.ToolsPage);
return
}
if (response && response.code === 200) {
// Failed to retrieve data
if (response.cliLatest === undefined) {
response.cliLatest = response.cliInstalled;
}
if (response.toolboxLatest === undefined) {
response.toolboxLatest = response.toolboxInstalled;
}
// Check new version
const hasNewVersionCLI = response.cliInstalled !== response.cliLatest;
const hasNewVersionToolbox = response.toolboxInstalled !== response.toolboxLatest;
// If has new version
if (hasNewVersionToolbox) {
this.#setStateUpdate(response.toolboxLatest, true);
this.#statePage(WelcomePageStates.UPDATE);
return
}
else if (hasNewVersionCLI) {
this.#setStateUpdate(response.cliLatest, false);
this.#statePage(WelcomePageStates.UPDATE);
// Failed to retrieve data
if (response.cliLatest === undefined && response.toolboxLatest === undefined) {
response.cliLatest = response.cliInstalled;
response.toolboxLatest = response.toolboxInstalled;
}
if (response.cliLatest === undefined) {
this.#statePage(WelcomePageStates.NOT_FOUND);
return;
}
// Check new version
const hasNewVersionCLI = response.cliInstalled !== response.cliLatest;
const hasNewVersionToolbox = response.toolboxInstalled !== response.toolboxLatest;
// If has new version
if (hasNewVersionToolbox) {
this.#setStateUpdate(response.toolboxLatest, true);
this.#statePage(WelcomePageStates.UPDATE);
return
}
else if (hasNewVersionCLI) {
this.#setStateUpdate(response.cliLatest, false);
this.#statePage(WelcomePageStates.UPDATE);
return
}
else {
// If first app open
if (settings.get_boolean('first-open')) {
this._IdConnect.version = `${response.cliInstalled}`;
this.#statePage(WelcomePageStates.CONNECT);
return
}
else {
// If first app open
if (settings.get_boolean('first-open')) {
this._IdConnect.version = `${response.cliInstalled}`;
this.#statePage(WelcomePageStates.CONNECT);
return
}
// Open tools
this.#window.navigation().push(this.utils.constants.Pages.ToolsPage);
}
} else {
this.#statePage(WelcomePageStates.NOT_FOUND);
// Open tools
this.#window.navigation().push(this.utils.constants.Pages.ToolsPage);
}
} catch(e) {
this.#statePage(WelcomePageStates.NOT_FOUND);
Expand Down

0 comments on commit 1b379c1

Please sign in to comment.