Skip to content

Commit

Permalink
Fix translation. Show update vailable dialog is the version is not th…
Browse files Browse the repository at this point in the history
…e same as current
  • Loading branch information
yuriiNazarenkoTine committed Apr 13, 2024
1 parent ff7094a commit 4089dee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/app/rr-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -500,8 +500,8 @@ Ext.define("SYNOCOMMUNITY.RRManager.Overview.Main", {
style: 'margin: 10px; overflow-y: auto; border: 1px solid #ccc; padding: 5px;',
height: '75%', // Fixed height for the scrollable area
anchor: '100%'
}
]
}
]
});
window.open();
},
Expand Down Expand Up @@ -546,9 +546,11 @@ Ext.define("SYNOCOMMUNITY.RRManager.Overview.Main", {
url: [self.rrCheckVersion.updateAllUrl]
});
}
if (self?.rrCheckVersion?.status == "update available" && self?.rrCheckVersion?.tag !="null") {
self.showPrompt('Update Available',
`The new version ${self.rrCheckVersion.tag} of RR is available. Do you want to download it?`, self.rrCheckVersion.notes, donwloadUpdate);
if (self?.rrCheckVersion?.status == "update available"
&& self?.rrCheckVersion?.tag != "null"
&& self.rrConfig.rr_version !== self?.rrCheckVersion?.tag) {
self.showPrompt(self._T('ui', 'prompt_update_available_title'),
self.formatString(self._T('ui', 'prompt_update_available_message'), self.rrCheckVersion.tag), self.rrCheckVersion.notes, donwloadUpdate);
}
})();
self.__checkDownloadFolder(self.__checkRequiredTasks.bind(self));
Expand Down Expand Up @@ -614,8 +616,7 @@ Ext.define("SYNOCOMMUNITY.RRManager.Overview.Main", {
let countUpdatesStatusAttemp = 0;

const updateStatusInterval = setInterval(async function () {
debugger;
const checksStatusResponse = await self.callCustomScript('checkUpdateStatus.cgi'); //rr_update_progress
const checksStatusResponse = await self.callCustomScript('checkUpdateStatus.cgi');
if (!checksStatusResponse?.success) {
clearInterval(updateStatusInterval);
self.owner.getEl()?.unmask();
Expand Down
4 changes: 4 additions & 0 deletions src/app/texts/enu/strings
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ col_name="Name"
col_description="Description"


prompt_update_available_title='Update Available'
prompt_update_available_message="The new version {0} of RR is available. Do you want to download it?"


[widget]
danger_status="Danger!"
danger_status_message="Your RR is not working properly."
Expand Down

0 comments on commit 4089dee

Please sign in to comment.