--- /dev/null
+import type { App } from "vue";
+
+// Grid
+import Container from "@/components/Container.vue";
+import Section from "@/components/Section.vue";
+
+// Elements
+import Block from "@/components/Block.vue";
+import Box from "@/components/Box.vue";
+import Notification from "@/components/Notification.vue";
+import Tags from "@/components/Tags.vue";
+import Tag from "@/components/Tag.vue";
+
+// Components
+import Modal from "@/components/Modal.vue";
+
+// Icons
+import Icon from "@/components/Icon.vue";
+
+// Loading Indicator
+import Loader from "@/components/Loader.vue";
+
+export default {
+ install(app: App) {
+ app.component("Container", Container)
+ app.component("Block", Block)
+ app.component("Box", Box)
+ app.component("Icon", Icon)
+ app.component("Loader", Loader)
+ app.component("Modal", Modal)
+ app.component("Notification", Notification)
+ app.component("Section", Section)
+ app.component("Tags", Tags)
+ app.component("Tag", Tag)
+ }
+}
import { useMirrorStore } from '@/stores/mirrors'
import { getCountryName } from "@/utils/i18n"
- // Components
- import Box from "@/components/Box.vue"
- import Loader from "@/components/Loader.vue"
- import Notification from "@/components/Notification.vue"
- import Tags from "@/components/Tags.vue"
- import Tag from "@/components/Tag.vue"
-
// Load the store
const mirrorStore = useMirrorStore()
--- /dev/null
+<script setup lang="ts">
+ import { ref } from "vue";
+
+ defineProps<{
+ open: boolean
+ }>()
+
+ defineEmits<{
+ (e: "update:open", value: boolean): void
+ }>()
+</script>
+
+<template>
+ <div class="modal" :class="{ 'is-active': open }">
+ <!-- Make a click on the background close the modal -->
+ <div class="modal-background" @click="$emit('update:open', false)"></div>
+
+ <div class="modal-content box">
+ <slot />
+ </div>
+
+ <button class="modal-close is-large" aria-label="close"
+ @click="$emit('update:open', false)"></button>
+ </div>
+</template>
import type { Package, File } from "@/api/packages";
import { fetchPackageFilelist } from "@/api/packages";
- // Components
- import Icon from "@/components/Icon.vue";
- import Loader from "@/components/Loader.vue";
- import Notification from "@/components/Notification.vue";
- import Section from "@/components/Section.vue";
-
// Utils
import { fileIsDownloadable, fileIsViewable } from "@/utils/files";
import { formatMode, formatSize } from "@/utils/format";
})
)
+// Import all basic components
+import BasicComponents from "@/components/BasicComponents"
+app.use(BasicComponents)
+
// Import icons
import "./icons"
import type { Builder } from "@/api/builders";
import { fetchBuilders } from "@/api/builders";
- // Import UI components
- import Section from "../components/Section.vue"
-
// Builders
const builders = ref<Builder[]>([]);
<script setup lang="ts">
- import Section from "../components/Section.vue"
</script>
<template>
import { useAuth } from "@/composables/auth";
const auth = useAuth();
- // Import components
- import Container from "@/components/Container.vue";
- import Icon from "@/components/Icon.vue";
- import Notification from "@/components/Notification.vue";
- import Section from "@/components/Section.vue";
-
// Error string shown to the user in case something went wrong
const error = ref<string | null>(null)
<script setup lang="ts">
// Components
import MirrorList from "@/components/MirrorList.vue"
- import Section from "@/components/Section.vue"
</script>
<template>
<script setup lang="ts">
- import Container from "@/components/Container.vue"
</script>
<template>
import type { PackageSummary } from "@/api/packages";
import { fetchPackages } from "@/api/packages";
- // Components
- import Section from "@/components/Section.vue";
-
// Create a list with all packages
const packages = ref<PackageSummary[]>([]);