]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
chore: minor changes
authorEduardo San Martin Morote <posva13@gmail.com>
Wed, 11 Oct 2023 20:44:34 +0000 (22:44 +0200)
committerEduardo San Martin Morote <posva13@gmail.com>
Wed, 11 Oct 2023 20:44:34 +0000 (22:44 +0200)
packages/online-playground/src/App.vue
packages/online-playground/src/Header.vue

index bd5bc79a90596664988c1f77d6a74a7850e85cfc..da7589f571b3bdc60c3f7b9a1ef83eea79a2c525 100644 (file)
@@ -56,8 +56,6 @@ provide(PiniaVersionKey, piniaVersion)
 //     piniaVersion.value === 'latest' ? '^2.1.0' : piniaVersion.value
 // })
 
-console.log('files', store.getFiles()['import-map.json'])
-
 if (!hash) {
   store.setImportMap({
     imports: {
index 15a98ca935d076c89c4b440c13f54f9f647c3b22..ed306be53f50909a5544de4d75fbfbba127b2ccd 100644 (file)
@@ -1,6 +1,6 @@
 <script setup lang="ts">
 import { downloadProject } from './download/download'
-import { inject, provide, ref } from 'vue'
+import { inject, ref } from 'vue'
 import Sun from './icons/Sun.vue'
 import Moon from './icons/Moon.vue'
 import Share from './icons/Share.vue'
@@ -19,7 +19,8 @@ const emit = defineEmits(['toggle-theme', 'toggle-dev'])
 const { store } = props
 
 const currentCommit = __COMMIT__
-const vueVersion = ref(`latest`)
+// parse version from the runtimeURL
+const vueVersion = ref('latest')
 const piniaVersion = inject(PiniaVersionKey)!
 
 async function setVueVersion(v: string) {
@@ -28,11 +29,6 @@ async function setVueVersion(v: string) {
   vueVersion.value = `v${v}`
 }
 
-function resetVueVersion() {
-  store.resetVueVersion()
-  vueVersion.value = `latest`
-}
-
 async function copyLink(e: MouseEvent) {
   if (e.metaKey) {
     // hidden logic for going to local debug from play.vuejs.org