mirror of
https://github.com/amir20/dozzle.git
synced 2025-12-27 23:46:39 +01:00
feat: search textbox is now draggable (#2737)
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
<template>
|
||||
<transition name="slide">
|
||||
<div class="fixed right-4 top-2 z-10 flex items-center" v-show="showSearch" v-if="search">
|
||||
<div
|
||||
class="fixed z-10 flex w-full justify-end p-2"
|
||||
v-show="showSearch"
|
||||
v-if="search"
|
||||
ref="container"
|
||||
:style="style"
|
||||
>
|
||||
<div class="input input-primary flex h-auto items-center !shadow-lg">
|
||||
<mdi:magnify />
|
||||
<input
|
||||
@@ -19,8 +25,11 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
const input = ref<HTMLInputElement>();
|
||||
const container = ref<HTMLDivElement>();
|
||||
const { searchFilter, showSearch, resetSearch } = useSearchFilter();
|
||||
|
||||
const { style } = useDraggable(container);
|
||||
|
||||
onKeyStroke("f", (e) => {
|
||||
if (e.ctrlKey || e.metaKey) {
|
||||
showSearch.value = true;
|
||||
|
||||
Reference in New Issue
Block a user