Skip to content

Commit

Permalink
feat: add version and contribution note
Browse files Browse the repository at this point in the history
  • Loading branch information
thepiwo committed May 8, 2023
1 parent 4937657 commit 69af2e2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<template>
<Editor />
<Version />
</template>

<script setup lang="ts">
Expand All @@ -8,6 +9,7 @@ import Editor from "./components/Editor.vue";
import { useSdkStore } from "./stores/sdkStore";
import { onMounted } from "vue";
import { useContractStore } from "./stores/contractStore";
import Version from "./components/Version.vue";
const sdkStore = useSdkStore();
const { initSdk } = sdkStore;
Expand Down
18 changes: 18 additions & 0 deletions src/components/Version.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<template>
<div class="w-full text-center mb-2 text-gray-500 text-sm">
<div>
Contribute on GitHub:
<a
class="underline text-blue-400"
target="_blank"
href="https://github.com/aeternity/aepp-contracts"
>https://github.com/aeternity/aepp-contracts</a
>
</div>
<div>Version {{ version }}</div>
</div>
</template>
<script setup lang="ts">
// eslint-disable-next-line no-undef
const version = __APP_VERSION__;
</script>
1 change: 1 addition & 0 deletions src/vite-env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="vite/client" />
declare const __APP_VERSION__: string;
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ import vue from "@vitejs/plugin-vue";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
define: {
__APP_VERSION__: JSON.stringify(process.env.npm_package_version),
},
});

0 comments on commit 69af2e2

Please sign in to comment.