mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-22 23:06:31 +00:00
97fb94d231
* #352 - require one date to be set to save * fix many type regressions
25 lines
665 B
Vue
25 lines
665 B
Vue
<template>
|
|
<div class="dropdown dropdown-left">
|
|
<slot>
|
|
<label tabindex="0" class="btn btn-circle btn-sm">
|
|
<Icon name="mdi-qrcode" />
|
|
</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">
|
|
function getQRCodeUrl(): string {
|
|
const currentURL = window.location.href;
|
|
|
|
return `/api/v1/qrcode?data=${encodeURIComponent(currentURL)}`;
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|