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();
if (data) {
console.log(data);
username.value = "demo@example.com";
password.value = "demo";
}
@ -223,6 +222,9 @@
</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>
</template>

View File

@ -10,6 +10,13 @@
title: "Homebox | Profile",
});
const pubApi = usePublicApi();
const { data: status } = useAsyncData(async () => {
const { data } = await pubApi.status();
return data;
});
const { setTheme } = useTheme();
type ThemeOption = {
@ -341,6 +348,9 @@
</template>
</BaseCard>
</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>
</template>