-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12c9f4f
commit 975b633
Showing
13 changed files
with
218 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,10 @@ jobs: | |
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Vars | ||
id: vars | ||
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} | ||
shell: bash | ||
- name: Install Project Dep | ||
run: | | ||
go mod download | ||
|
@@ -66,7 +70,7 @@ jobs: | |
- name: Setup Account | ||
run: mkdir -p ~/.wails && echo '{"email":"[email protected]","name":"REDDY PRASAD"}' > ~/.wails/wails.json | ||
- name: Build GUI | ||
run: wails build -p | ||
run: wails build -p -ldflags "-X main.CurrentVersionStr=${{ steps.vars.outputs.tag }}" | ||
- name: Make DMG | ||
run: npx create-dmg ./build/hsk00.app ./build | ||
continue-on-error: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,10 @@ jobs: | |
if: ${{ matrix.os == 'ubuntu-20.04' }} | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Vars | ||
id: vars | ||
run: echo ::set-output name=tag::${GITHUB_REF/refs\/tags\//} | ||
shell: bash | ||
- name: Install Project Dep | ||
run: | | ||
go mod download | ||
|
@@ -49,7 +53,7 @@ jobs: | |
- name: Setup Account | ||
run: mkdir -p ~/.wails && echo '{"email":"[email protected]","name":"REDDY PRASAD"}' > ~/.wails/wails.json | ||
- name: Build GUI | ||
run: wails build -p | ||
run: wails build -p -ldflags "-X main.CurrentVersionStr=${{ steps.vars.outputs.tag }}" | ||
- name: Make DMG | ||
run: npx create-dmg ./build/hsk00.app ./build | ||
continue-on-error: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import React, { useEffect, useState } from "react"; | ||
import { useTranslation } from "react-i18next"; | ||
import GitHubIcon from "./GitHubIcon"; | ||
import "./Footer.scss"; | ||
|
||
function Footer({ onLangChange }) { | ||
const { t } = useTranslation("translation"); | ||
const [version, setVersion] = useState({ current: undefined, latest: undefined, hasUpdate: false }); | ||
|
||
const handleUpdateClick = (e) => { | ||
e.preventDefault(); | ||
window.backend.Runtime.OpenURL("https://github.com/dev-drprasad/hsk00/releases/latest"); | ||
}; | ||
|
||
const handleGHClick = () => { | ||
window.backend.Runtime.OpenURL("https://github.com/dev-drprasad/hsk00/"); | ||
}; | ||
|
||
useEffect(() => { | ||
window.backend.Runtime.GetVersion().then(setVersion).catch(console.error); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<select className="language-select FormControl form-control-sm" onChange={(e) => onLangChange(e.target.value)}> | ||
<option value="en">English</option> | ||
<option value="ru">русский</option> | ||
</select> | ||
|
||
<span className="version"> | ||
{version.current}{" "} | ||
{version.hasUpdate && ( | ||
<a onClick={handleUpdateClick} href="https://github.com/dev-drprasad/hsk00/releases/latest"> | ||
({"🎉"} {t("update available")} : {version.latest}) | ||
</a> | ||
)} | ||
</span> | ||
<span onClick={handleGHClick} className="github-link"> | ||
<GitHubIcon /> | ||
</span> | ||
</> | ||
); | ||
} | ||
|
||
export default Footer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@import "variables.scss"; | ||
|
||
.language-select { | ||
bottom: 0.5rem; | ||
left: 1rem; | ||
width: 20%; | ||
color: #cccccc; | ||
position: absolute; | ||
} | ||
|
||
.version { | ||
position: absolute; | ||
bottom: 0.5rem; | ||
width: 100%; | ||
text-align: center; | ||
line-height: 1.3rem; | ||
font-size: 0.85em; | ||
z-index: -1; | ||
|
||
> a { | ||
color: inherit; | ||
} | ||
} | ||
|
||
.github-link { | ||
position: absolute; | ||
bottom: 0.5rem; | ||
right: 1rem; | ||
font-size: 1.2rem; | ||
color: #cccccc; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.