mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-25 20:32:46 +00:00
60 lines
1.5 KiB
Vue
60 lines
1.5 KiB
Vue
<script setup>
|
|
import { ref, computed } from "vue";
|
|
import { options as globalOptions } from "virtual:jekyll-data";
|
|
import HelpPages from "virtual:tuna-help-pages";
|
|
import BootStrapPopover from "bootstrap/js/dist/popover";
|
|
import SearchBox from "./SearchBox.vue";
|
|
import UpdateField from "./UpdateField.vue";
|
|
import { useMirrorList } from "../lib/mirrorList";
|
|
import processingHandlers from "../lib/mirrorListDataProcessing";
|
|
|
|
const { unlistedMirrors: unlisted, genMainMirrorList } =
|
|
processingHandlers(globalOptions);
|
|
|
|
const rawMirrorList = useMirrorList(unlisted);
|
|
|
|
const mirrorList = computed(() => {
|
|
return genMainMirrorList(rawMirrorList.value, HelpPages);
|
|
});
|
|
const filter = ref("");
|
|
|
|
const filteredMirrorList = computed(() => {
|
|
var filterText = filter.value.toLowerCase();
|
|
return mirrorList.value.filter((m) => {
|
|
return m.is_master && m.name.toLowerCase().indexOf(filterText) !== -1;
|
|
});
|
|
});
|
|
|
|
const vWithPopover = {
|
|
mounted: (el) => {
|
|
BootStrapPopover.getOrCreateInstance(el);
|
|
},
|
|
beforeUnmount: (el) => {
|
|
BootStrapPopover.getInstance(el)?.dispose();
|
|
},
|
|
};
|
|
</script>
|
|
<template src="./main-mirror-list.html" lang="liquid"></template>
|
|
|
|
<style lang="scss" scoped>
|
|
@use "../styles/3-wave.scss" as wave;
|
|
@use "../styles/sync-status.scss";
|
|
@use "../styles/badge-new.scss";
|
|
|
|
a.mirror-item-label::after {
|
|
content: " ";
|
|
}
|
|
|
|
tbody {
|
|
td {
|
|
padding: 4px 8px;
|
|
border-style: none;
|
|
}
|
|
font-size: 12pt;
|
|
}
|
|
#mirror-title {
|
|
margin-top: 10px;
|
|
margin-bottom: 10px;
|
|
}
|
|
</style>
|