Skip to content

Commit

Permalink
feat: don't show version on dev channel
Browse files Browse the repository at this point in the history
  • Loading branch information
sxzz committed May 15, 2024
1 parent a7e6ceb commit d751238
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion components/NavBar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script setup lang="ts">
import { version } from '../package.json'
const { branch } = useAppConfig()
const disableOverrideVersion = computed(
() => currentParser.value.versionOverridable === false,
)
Expand All @@ -21,7 +23,7 @@ function editVersion() {
<div flex="~ gap1">
<Logo />
<h1 text-lg font-bold>AST Explorer</h1>
<small>v{{ version }}</small>
<small>{{ branch === 'release' ? `v${version}` : 'dev' }}</small>
</div>
<LanguageSelect />
<div flex gap2>
Expand Down
2 changes: 2 additions & 0 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import process from 'node:process'
import { nodePolyfills } from 'vite-plugin-node-polyfills'

// https://nuxt.com/docs/api/configuration/nuxt-config
Expand Down Expand Up @@ -64,5 +65,6 @@ export default defineNuxtConfig({
autoTrack: false,
ignoreLocalhost: true,
},
branch: process.env.VERCEL_GIT_COMMIT_REF,
},
})

0 comments on commit d751238

Please sign in to comment.