Skip to content

Commit

Permalink
Windowのタイトルにバージョン情報を載せる (#599)
Browse files Browse the repository at this point in the history
* windowのタイトルにバージョン情報を載せる

* infosの取得に失敗した場合空文字列でないか比較する

Co-authored-by: Yuto Ashida <y-chan@y-chan.dev>

* 直接アプリケーションのバージョンを取得する。

Co-authored-by: Yuto Ashida <y-chan@y-chan.dev>

* バージョン表記を Ver. に変更

* 直接アプリケーションのバージョンを取得する。

* fix

Co-authored-by: Yuto Ashida <y-chan@y-chan.dev>
  • Loading branch information
sopisoft and y-chan authored Dec 19, 2021
1 parent a41c0b3 commit 8bf3a98
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/MenuBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
{{
(isEdited ? "*" : "") +
(projectName !== undefined ? projectName + " - " : "") +
"VOICEVOX"
"VOICEVOX" +
(currentVersion ? " - Ver. " + currentVersion : "")
}}
</div>
<q-space />
Expand Down Expand Up @@ -82,7 +83,10 @@ export default defineComponent({
setup() {
const store = useStore();
const $q = useQuasar();
const currentVersion = ref("");
window.electron.getAppInfos().then((obj) => {
currentVersion.value = obj.version;
});
const uiLocked = computed(() => store.getters.UI_LOCKED);
const menubarLocked = computed(() => store.getters.MENUBAR_LOCKED);
const projectName = computed(() => store.getters.PROJECT_NAME);
Expand Down Expand Up @@ -350,6 +354,7 @@ export default defineComponent({
});
return {
currentVersion,
uiLocked,
menubarLocked,
projectName,
Expand Down

0 comments on commit 8bf3a98

Please sign in to comment.