Added stash menu with remove and rename.
This commit is contained in:
@@ -67,10 +67,13 @@
|
||||
placeholder="Search"
|
||||
class="input"
|
||||
@focus="searchFocused = true"
|
||||
@blur="searchFocused = false"
|
||||
@blur="blurSearch"
|
||||
>
|
||||
|
||||
<button class="search-button">
|
||||
<button
|
||||
class="search-button"
|
||||
data-search
|
||||
>
|
||||
<Icon icon="search" />
|
||||
</button>
|
||||
</form>
|
||||
@@ -104,7 +107,7 @@
|
||||
class="menu-button nolink"
|
||||
>
|
||||
<Icon icon="user7" />
|
||||
My profile
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@@ -148,7 +151,12 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, computed, inject } from 'vue';
|
||||
import {
|
||||
ref,
|
||||
computed,
|
||||
inject,
|
||||
} from 'vue';
|
||||
|
||||
import navigate from '#/src/navigate.js';
|
||||
import { del } from '#/src/api.js';
|
||||
|
||||
@@ -172,6 +180,12 @@ async function logout() {
|
||||
del('/session');
|
||||
navigate('/login', null, { redirect: true });
|
||||
}
|
||||
|
||||
function blurSearch(event) {
|
||||
if (!event.relatedTarget || !Object.hasOwn(event.relatedTarget?.dataset, 'search')) {
|
||||
searchFocused.value = false;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user