mirror of
https://github.com/hay-kot/homebox.git
synced 2024-11-24 17:45:41 +00:00
f91b33db38
* change all icons to use iconify * fix minor UI elements * fix layout of table
28 lines
747 B
Vue
28 lines
747 B
Vue
<template>
|
|
<div class="dropdown dropdown-left">
|
|
<slot>
|
|
<label tabindex="0" class="btn btn-circle btn-sm">
|
|
<MdiQrcode />
|
|
</label>
|
|
</slot>
|
|
<div tabindex="0" class="card compact dropdown-content shadow-lg bg-base-100 rounded-box w-64">
|
|
<div class="card-body">
|
|
<h2 class="text-center">Page URL</h2>
|
|
<img :src="getQRCodeUrl()" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import { route } from "../../lib/api/base";
|
|
import MdiQrcode from "~icons/mdi/qrcode";
|
|
|
|
function getQRCodeUrl(): string {
|
|
const currentURL = window.location.href;
|
|
|
|
return route(`/qrcode`, { data: encodeURIComponent(currentURL) });
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|