Add global search

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2022-08-26 16:08:58 +02:00
parent bfc936f57c
commit 48935e2168
216 changed files with 3646 additions and 2806 deletions

View File

@@ -1,5 +1,5 @@
<template>
<span class="icon has-text-primary is-large">
<span class="text-black dark:text-white dark:fill-white">
<svg
version="1.1"
viewBox="0 0 65.131 65.131"
@@ -12,7 +12,7 @@
/>
<path
d="m23.631 51.953c-2.348-1.5418-6.9154-5.1737-7.0535-5.6088-0.06717-0.21164 0.45125-0.99318 3.3654-5.0734 2.269-3.177 3.7767-5.3581 3.7767-5.4637 0-0.03748-1.6061-0.60338-3.5691-1.2576-6.1342-2.0442-8.3916-2.9087-8.5288-3.2663-0.03264-0.08506 0.09511-0.68598 0.28388-1.3354 0.643-2.212 2.7038-8.4123 2.7959-8.4123 0.05052 0 2.6821 0.85982 5.848 1.9107 3.1659 1.0509 5.897 1.9222 6.0692 1.9362 0.3089 0.02514 0.31402 0.01925 0.38295-0.44107 0.09851-0.65784 0.26289-5.0029 0.2633-6.9599 1.87e-4 -0.90267 0.02801-2.5298 0.06184-3.6158l0.0615-1.9746h10.392l0.06492 4.4556c0.06287 4.3148 0.18835 7.8236 0.29865 8.3513 0.0295 0.14113 0.11236 0.2566 0.18412 0.2566 0.07176 0 1.6955-0.50861 3.6084-1.1303 4.5213-1.4693 6.2537-2.0038 7.3969-2.2822 0.87349-0.21269 0.94061-0.21704 1.0505-0.06806 0.45169 0.61222 3.3677 9.2365 3.1792 9.4025-0.33681 0.29628-2.492 1.1048-6.9823 2.6194-5.3005 1.7879-5.1321 1.7279-5.1321 1.8283 0 0.13754 0.95042 1.522 3.5468 5.1666 1.3162 1.8475 2.6802 3.7905 3.0311 4.3176l0.63804 0.95842-0.27216 0.28519c-1.1112 1.1644-7.3886 5.8693-7.8309 5.8693-0.22379 0-1.2647-1.2321-2.9284-3.4663-0.90374-1.2137-2.264-3.0402-3.0228-4.059-0.75878-1.0188-1.529-2.0203-1.7116-2.2256l-0.33201-0.37324-0.32674 0.37324c-0.43918 0.50169-2.226 2.867-3.8064 5.0388-2.1662 2.9767-3.6326 4.8055-3.8532 4.8055-0.05161 0-0.4788-0.25278-0.94931-0.56173z"
fill="#fff"
fill="transparent"
stroke-width=".093311"
/>
</svg>

View File

@@ -1,5 +1,5 @@
<template>
<span class="icon has-text-primary is-large">
<span class="text-primary dark:text-white">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 216.4144 232.00976">
<title>Mastodon logo</title>
<path

View File

@@ -5,13 +5,13 @@
</header>
<section class="flex">
<div class="">
<div class="w-full">
<slot></slot>
<o-field :label="inputLabel" label-for="url-text">
<o-input id="url-text" ref="URLInput" :modelValue="url" expanded />
<p class="control">
<o-tooltip
:label="$t('URL copied to clipboard')"
:label="t('URL copied to clipboard')"
:active="showCopiedTooltip"
always
variant="success"
@@ -23,7 +23,7 @@
native-type="button"
@click="copyURL"
@keyup.enter="copyURL"
:title="$t('Copy URL to clipboard')"
:title="t('Copy URL to clipboard')"
/>
</o-tooltip>
</p>
@@ -34,7 +34,7 @@
target="_blank"
rel="nofollow noopener"
title="Twitter"
><Twitter :size="48"
><Twitter :size="48" class="dark:text-white"
/></a>
<a
:href="mastodonShare"
@@ -50,14 +50,14 @@
target="_blank"
rel="nofollow noopener"
title="Facebook"
><Facebook :size="48"
><Facebook :size="48" class="dark:text-white"
/></a>
<a
:href="whatsAppShare"
target="_blank"
rel="nofollow noopener"
title="WhatsApp"
><Whatsapp :size="48"
><Whatsapp :size="48" class="dark:text-white"
/></a>
<a
:href="telegramShare"
@@ -73,7 +73,7 @@
target="_blank"
rel="nofollow noopener"
title="LinkedIn"
><LinkedIn :size="48"
><LinkedIn :size="48" class="dark:text-white"
/></a>
<a
:href="diasporaShare"
@@ -90,7 +90,7 @@
rel="nofollow noopener"
title="Email"
>
<Email :size="48" />
<Email :size="48" class="dark:text-white" />
</a>
</div>
</div>
@@ -118,6 +118,7 @@ import {
twitterShareUrl,
whatsAppShareUrl,
} from "@/utils/share";
import { useI18n } from "vue-i18n";
const props = withDefaults(
defineProps<{
@@ -129,7 +130,9 @@ const props = withDefaults(
{}
);
const URLInput = ref<HTMLElement | null>(null);
const { t } = useI18n({ useScope: "global" });
const URLInput = ref<{ $refs: { input: HTMLInputElement } } | null>(null);
const showCopiedTooltip = ref(false);
@@ -159,7 +162,6 @@ const mastodonShare = computed((): string | undefined =>
);
const copyURL = (): void => {
console.log("URLInput", URLInput.value);
URLInput.value?.$refs.input.select();
document.execCommand("copy");
showCopiedTooltip.value = true;

View File

@@ -1,5 +1,5 @@
<template>
<span class="icon has-text-primary is-large">
<span class="text-primary dark:text-white dark:fill-white">
<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>Telegram</title>
<path