mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
export consts to common files
This commit is contained in:
parent
c2c62efc49
commit
c8fd12ed2e
|
|
@ -1,5 +1,6 @@
|
|||
<script setup>
|
||||
import { ref, defineEmits, computed, onMounted, nextTick } from "vue";
|
||||
import { ISOINFO_JSON_PATH } from "../lib/consts";
|
||||
|
||||
const distroList = ref([]);
|
||||
const selected = ref({});
|
||||
|
|
@ -13,7 +14,7 @@ const knownCategories = {
|
|||
|
||||
const emit = defineEmits(["ready"]);
|
||||
|
||||
fetch("/static/status/isoinfo.json").then((res) => res.json()).then((isoinfo) => {
|
||||
fetch(ISOINFO_JSON_PATH).then((res) => res.json()).then((isoinfo) => {
|
||||
distroList.value = isoinfo;
|
||||
availableCategories.value = [...new Set(isoinfo.map((x) => x.category))];
|
||||
curCategory.value = availableCategories.value[0];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
export const TUNASYNC_JSON_PATH = "/static/tunasync.json";
|
||||
export const ISOINFO_JSON_PATH = "/static/status/isoinfo.json";
|
||||
Loading…
Reference in New Issue