feat: show app version (#60)

* add version and build to homepage view

* add version to profile
This commit is contained in:
Hayden 2022-10-13 16:49:29 -08:00 committed by GitHub
parent 889197994b
commit 84bf67079b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 1 deletions

View file

@ -15,7 +15,6 @@
const { data } = await api.status(); const { data } = await api.status();
if (data) { if (data) {
console.log(data);
username.value = "demo@example.com"; username.value = "demo@example.com";
password.value = "demo"; password.value = "demo";
} }
@ -223,6 +222,9 @@
</div> </div>
</div> </div>
</div> </div>
<footer v-if="status" class="absolute text-center w-full bottom-0 pb-4">
<p class="text-center text-sm">Version: {{ status.build.version }} ~ Build: {{ status.build.commit }}</p>
</footer>
</div> </div>
</template> </template>

View file

@ -10,6 +10,13 @@
title: "Homebox | Profile", title: "Homebox | Profile",
}); });
const pubApi = usePublicApi();
const { data: status } = useAsyncData(async () => {
const { data } = await pubApi.status();
return data;
});
const { setTheme } = useTheme(); const { setTheme } = useTheme();
type ThemeOption = { type ThemeOption = {
@ -341,6 +348,9 @@
</template> </template>
</BaseCard> </BaseCard>
</BaseContainer> </BaseContainer>
<footer v-if="status" class="text-center w-full bottom-0 pb-4">
<p class="text-center text-sm">Version: {{ status.build.version }} ~ Build: {{ status.build.commit }}</p>
</footer>
</div> </div>
</template> </template>