mirror of
https://github.com/hay-kot/homebox.git
synced 2024-12-21 06:16:31 +00:00
06eb6c1f91
* Fixed 3 places where API URLs were not constructed by function route(path, params). * autofix --------- Co-authored-by: Hayden <64056131+hay-kot@users.noreply.github.com>
27 lines
715 B
Vue
27 lines
715 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">
|
|
import { route } from "../../lib/api/base";
|
|
|
|
function getQRCodeUrl(): string {
|
|
const currentURL = window.location.href;
|
|
|
|
return route(`/qrcode`, { data: encodeURIComponent(currentURL) });
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped></style>
|