mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2025-06-28 09:16:55 +00:00
parent
b4f3fb3b30
commit
c9d78e3f67
@ -2,10 +2,12 @@
|
||||
import {fetchGet, fetchPost} from "@/utilities/fetch.js";
|
||||
import {DashboardConfigurationStore} from "@/stores/DashboardConfigurationStore.js";
|
||||
import LocaleText from "@/components/text/localeText.vue";
|
||||
import PeerSettingsDropdownTool
|
||||
from "@/components/configurationComponents/peerSettingsDropdownComponents/peerSettingsDropdownTool.vue";
|
||||
|
||||
export default {
|
||||
name: "peerSettingsDropdown",
|
||||
components: {LocaleText},
|
||||
components: {PeerSettingsDropdownTool, LocaleText},
|
||||
setup(){
|
||||
const dashboardStore = DashboardConfigurationStore()
|
||||
return {dashboardStore}
|
||||
@ -110,21 +112,38 @@ export default {
|
||||
</li>
|
||||
</template>
|
||||
<template v-else>
|
||||
<li class="d-flex" style="padding-left: var(--bs-dropdown-item-padding-x); padding-right: var(--bs-dropdown-item-padding-x);">
|
||||
<a class="dropdown-item text-center px-0 rounded-3" role="button" @click="this.downloadPeer()">
|
||||
<i class="me-auto bi bi-download"></i>
|
||||
</a>
|
||||
<a class="dropdown-item text-center px-0 rounded-3" role="button"
|
||||
@click="this.downloadQRCode('qrcode')">
|
||||
<i class="me-auto bi bi-qr-code"></i>
|
||||
</a>
|
||||
<a class="dropdown-item text-center px-0 rounded-3" role="button"
|
||||
@click="this.downloadQRCode('configurationFile')">
|
||||
<i class="me-auto bi bi-body-text"></i>
|
||||
</a>
|
||||
<a class="dropdown-item text-center px-0 rounded-3" role="button" @click="this.$emit('share')">
|
||||
<i class="me-auto bi bi-share"></i>
|
||||
</a>
|
||||
<li>
|
||||
<div class="text-center text-muted">
|
||||
|
||||
</div>
|
||||
<div class="d-flex" style="padding-left: var(--bs-dropdown-item-padding-x); padding-right: var(--bs-dropdown-item-padding-x);">
|
||||
<!-- <a class="dropdown-item text-center px-0 rounded-3" role="button" @click="this.downloadPeer()">-->
|
||||
<!-- <i class="me-auto bi bi-download"></i>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="dropdown-item text-center px-0 rounded-3" role="button"-->
|
||||
<!-- @click="this.downloadQRCode('qrcode')">-->
|
||||
<!-- <i class="me-auto bi bi-qr-code"></i>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="dropdown-item text-center px-0 rounded-3" role="button"-->
|
||||
<!-- @click="this.downloadQRCode('configurationFile')">-->
|
||||
<!-- <i class="me-auto bi bi-body-text"></i>-->
|
||||
<!-- </a>-->
|
||||
<!-- <a class="dropdown-item text-center px-0 rounded-3" role="button" @click="this.$emit('share')">-->
|
||||
<!-- <i class="me-auto bi bi-share"></i>-->
|
||||
<!-- </a>-->
|
||||
<PeerSettingsDropdownTool icon="bi-download"
|
||||
title="Download"
|
||||
@click="this.downloadPeer()"></PeerSettingsDropdownTool>
|
||||
<PeerSettingsDropdownTool icon="bi-qr-code"
|
||||
title="QR Code"
|
||||
@click="this.downloadQRCode('qrcode')"></PeerSettingsDropdownTool>
|
||||
<PeerSettingsDropdownTool icon="bi-body-text"
|
||||
title="Configuration File"
|
||||
@click="this.downloadQRCode('configurationFile')"></PeerSettingsDropdownTool>
|
||||
<PeerSettingsDropdownTool icon="bi-share"
|
||||
title="Share"
|
||||
@click="this.$emit('share')"></PeerSettingsDropdownTool>
|
||||
</div>
|
||||
</li>
|
||||
</template>
|
||||
<li><hr class="dropdown-divider"></li>
|
||||
|
@ -0,0 +1,37 @@
|
||||
<script setup>
|
||||
import {ref} from "vue";
|
||||
|
||||
const props = defineProps({
|
||||
icon: String,
|
||||
title: String
|
||||
})
|
||||
const emit = defineEmits(["click"])
|
||||
|
||||
const show = ref(false)
|
||||
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a class="dropdown-item text-center px-0 rounded-3 position-relative" role="button"
|
||||
@mouseenter="show = true"
|
||||
@mouseleave="show = false"
|
||||
@click="emit('click')">
|
||||
<i class="me-auto bi" :class="icon"></i>
|
||||
<Transition name="zoomReversed">
|
||||
<span
|
||||
v-if="show"
|
||||
class="position-absolute d-block p-1 px-2 bg-body text-body rounded-3 border shadow">
|
||||
<small>
|
||||
{{title}}
|
||||
</small>
|
||||
</span>
|
||||
</Transition>
|
||||
</a>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
span{
|
||||
top: -34px;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
Loading…
x
Reference in New Issue
Block a user