Skip to content

Commit

Permalink
version aware
Browse files Browse the repository at this point in the history
  • Loading branch information
davay42 committed Jul 26, 2023
1 parent 4ea3ad7 commit e963f09
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default defineConfig({
],
},
head: [

["link", { rel: "icon", href: `/${metaData.icon}` }],
["meta", { name: "referrer", content: "always" }],
["meta", { content: "955357184504374", property: "fb:app_id" }],
["meta", { content: "website", property: "og:type" }],
Expand Down
16 changes: 8 additions & 8 deletions components/MainPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ import { data } from "../synths.data";
import SynthCard from "./SynthCard.vue";
import { SlickList, SlickItem } from "vue-slicksort";
import { useElementVisibility, useStorage, useTransition } from '@vueuse/core';
import { version } from '../package.json'
const list = useStorage(`synths-${data.length}`, data)
const list = useStorage(`synths-${version}-${data.length + 1}`, data)
function isOff(n) {
return !isAccessGranted.value && n > 5
}
const players = ref([]);
const players = ref([])
const count = computed(() => players.value.length)
const counter = useTransition(count)
const counters = ref()
const visible = useElementVisibility(counters)
onMounted(() => {
fetch('https://corsproxy.io/?https://dir.defucc.me/items/players?limit=-1')
.then(response => response.json())
.then(({ data }) => players.value = data)
})
const count = computed(() => players.value.length)
const counter = useTransition(count)
//https://vue-slicksort.netlify.app/components/slicklist
const counters = ref()
const visible = useElementVisibility(counters)
</script>

<template lang='pug'>
Expand Down
File renamed without changes.
4 changes: 3 additions & 1 deletion synths.data.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ import fs from 'node:fs'
import { Directus } from '@directus/sdk';
import { parse, stringify } from 'yaml'

import { version } from './package.json'

export default {
async load() {

const dirname = path.dirname(fileURLToPath(import.meta.url));
const cacheFile = path.resolve(dirname, './synths.yaml')
const cacheFile = path.resolve(dirname, `./synths-v.${version}.yaml`)

const cached = fs.existsSync(cacheFile) ? parse(fs.readFileSync(cacheFile, 'utf8')) : []

Expand Down

0 comments on commit e963f09

Please sign in to comment.