Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windowのタイトルにバージョン情報を載せる #599

Merged
merged 10 commits into from
Dec 19, 2021
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 : "")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

タイトルバーはプロジェクト名も入るので出来るだけ短い方がいいかな(Ver. 0.9.3 -> v0.9.3)と思いましたが、4文字くらいならそこまで変わらないかなとも思うのでこのままでも良さそうです。

}}
</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