Skip to content

Commit

Permalink
Add: Updater in GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
18870 committed Jan 10, 2022
1 parent 1d716b2 commit 1c460bd
Show file tree
Hide file tree
Showing 11 changed files with 336 additions and 105 deletions.
18 changes: 18 additions & 0 deletions assets/gui/css/alas.css
Original file line number Diff line number Diff line change
Expand Up @@ -440,4 +440,22 @@ button.btn.dropdown-toggle {
*[style*="--input--"] {
margin: 0;
padding-right: .25rem;
}

*[style*="--loading-glow--"] {
width: 1.5rem;
height: 1.5rem;
}

*[style*="--loading-border--"] {
width: 1.5rem;
height: 1.5rem;
border: .2em solid currentColor;
border-right-color: transparent;
}

*[style*="--loading-border-fill--"] {
width: 1.5rem;
height: 1.5rem;
border: .2em solid currentColor;
}
16 changes: 16 additions & 0 deletions module/config/argument/gui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Button:
ScrollOFF:
ClearLog:
Setting:
CheckUpdate:
ClickToUpdate:
RetryUpdate:
CancelUpdate:

Toast:
DisableTranslateMode:
Expand All @@ -34,6 +38,7 @@ MenuAlas:
MenuDevelop:
HomePage:
Translate:
Update:

Overview:
Scheduler:
Expand All @@ -50,5 +55,16 @@ AddAlas:
Confirm:
FileExist:

Update:
UpToDate:
HaveUpdate:
UpdateFailed:
UpdateStart:
UpdateWait:
UpdateRun:
UpdateSuccess:
UpdateFailed:
UpdateChecking:

Text:
InvalidFeedBack:
19 changes: 17 additions & 2 deletions module/config/i18n/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,11 @@
"ScrollON": "Auto Scroll ON",
"ScrollOFF": "Auto Scroll OFF",
"ClearLog": "Clear Log",
"Setting": "Setting"
"Setting": "Setting",
"CheckUpdate": "Check update",
"ClickToUpdate": "Click to update",
"RetryUpdate": "Retry update",
"CancelUpdate": "Cancel update"
},
"Toast": {
"DisableTranslateMode": "Click here to disable translate mode",
Expand All @@ -1786,7 +1790,8 @@
},
"MenuDevelop": {
"HomePage": "Home",
"Translate": "Translate"
"Translate": "Translate",
"Update": "Updater"
},
"Overview": {
"Scheduler": "Scheduler",
Expand All @@ -1803,6 +1808,16 @@
"Confirm": "Add",
"FileExist": "A config with the same name exists, please choose another one"
},
"Update": {
"UpToDate": "Latest version",
"HaveUpdate": "A new version is available",
"UpdateFailed": "Update failed. Logs can be found in ./log/*_gui.txt",
"UpdateStart": "Start update",
"UpdateWait": "Waiting for all alas complete current task",
"UpdateRun": "Updating",
"UpdateSuccess": "Update succeeded, restarting",
"UpdateChecking": "Checking for updates"
},
"Text": {
"InvalidFeedBack": "Invalid format. Example: {0}"
}
Expand Down
19 changes: 17 additions & 2 deletions module/config/i18n/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,11 @@
"ScrollON": "Gui.Button.ScrollON",
"ScrollOFF": "Gui.Button.ScrollOFF",
"ClearLog": "Gui.Button.ClearLog",
"Setting": "Gui.Button.Setting"
"Setting": "Gui.Button.Setting",
"CheckUpdate": "Gui.Button.CheckUpdate",
"ClickToUpdate": "Gui.Button.ClickToUpdate",
"RetryUpdate": "Gui.Button.RetryUpdate",
"CancelUpdate": "Gui.Button.CancelUpdate"
},
"Toast": {
"DisableTranslateMode": "Gui.Toast.DisableTranslateMode",
Expand All @@ -1786,7 +1790,8 @@
},
"MenuDevelop": {
"HomePage": "Gui.MenuDevelop.HomePage",
"Translate": "Gui.MenuDevelop.Translate"
"Translate": "Gui.MenuDevelop.Translate",
"Update": "Gui.MenuDevelop.Update"
},
"Overview": {
"Scheduler": "Gui.Overview.Scheduler",
Expand All @@ -1803,6 +1808,16 @@
"Confirm": "Gui.AddAlas.Confirm",
"FileExist": "Gui.AddAlas.FileExist"
},
"Update": {
"UpToDate": "Gui.Update.UpToDate",
"HaveUpdate": "Gui.Update.HaveUpdate",
"UpdateFailed": "Gui.Update.UpdateFailed",
"UpdateStart": "Gui.Update.UpdateStart",
"UpdateWait": "Gui.Update.UpdateWait",
"UpdateRun": "Gui.Update.UpdateRun",
"UpdateSuccess": "Gui.Update.UpdateSuccess",
"UpdateChecking": "Gui.Update.UpdateChecking"
},
"Text": {
"InvalidFeedBack": "Gui.Text.InvalidFeedBack"
}
Expand Down
19 changes: 17 additions & 2 deletions module/config/i18n/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,11 @@
"ScrollON": "自动滚动 开",
"ScrollOFF": "自动滚动 关",
"ClearLog": "清空日志",
"Setting": "设置"
"Setting": "设置",
"CheckUpdate": "检查更新",
"ClickToUpdate": "进行更新",
"RetryUpdate": "重试更新",
"CancelUpdate": "取消更新"
},
"Toast": {
"DisableTranslateMode": "点击这里关闭翻译模式",
Expand All @@ -1786,7 +1790,8 @@
},
"MenuDevelop": {
"HomePage": "主页",
"Translate": "翻译"
"Translate": "翻译",
"Update": "更新器"
},
"Overview": {
"Scheduler": "调度器",
Expand All @@ -1803,6 +1808,16 @@
"Confirm": "添加",
"FileExist": "存在同名的配置文件,请重新输入一个"
},
"Update": {
"UpToDate": "已是最新版本",
"HaveUpdate": "有新版本可用",
"UpdateFailed": "更新失败,可在./log/*_gui.txt中找到错误日志",
"UpdateStart": "开始更新",
"UpdateWait": "等待所有 Alas 完成当前任务",
"UpdateRun": "更新中",
"UpdateSuccess": "更新成功,正在重启",
"UpdateChecking": "检查更新中"
},
"Text": {
"InvalidFeedBack": "格式错误。 示例:{0}"
}
Expand Down
19 changes: 17 additions & 2 deletions module/config/i18n/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -1767,7 +1767,11 @@
"ScrollON": "自動滾動 開",
"ScrollOFF": "自動滾動 關",
"ClearLog": "清空日誌",
"Setting": "設定"
"Setting": "設定",
"CheckUpdate": "檢查更新",
"ClickToUpdate": "進行更新",
"RetryUpdate": "重試更新",
"CancelUpdate": "取消更新"
},
"Toast": {
"DisableTranslateMode": "點擊這裡關閉翻譯模式",
Expand All @@ -1786,7 +1790,8 @@
},
"MenuDevelop": {
"HomePage": "主頁",
"Translate": "翻譯"
"Translate": "翻譯",
"Update": "更新器"
},
"Overview": {
"Scheduler": "調度器",
Expand All @@ -1803,6 +1808,16 @@
"Confirm": "添加",
"FileExist": "存在同名的設定檔案,請重新命名"
},
"Update": {
"UpToDate": "已是最新版本",
"HaveUpdate": "有新版本可用",
"UpdateFailed": "更新失敗,可在./log/*_gui.txt中找到錯誤日誌",
"UpdateStart": "開始更新",
"UpdateWait": "等待所有 Alas 完成當前任務",
"UpdateRun": "更新中",
"UpdateSuccess": "更新成功,正在重啓",
"UpdateChecking": "檢查更新中"
},
"Text": {
"InvalidFeedBack": "格式錯誤。 示例:{0}"
}
Expand Down
Loading

0 comments on commit 1c460bd

Please sign in to comment.