mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-27 20:58:01 +02:00
add t/strings for copy to clipboard
This commit is contained in:
parent
23ea92f124
commit
4efb38a1e0
4 changed files with 10 additions and 4 deletions
|
@ -8,12 +8,14 @@ import { useUpdatePlaylist } from '@/scripts/db.js';
|
||||||
|
|
||||||
import { useResults, useArtist } from '@/stores/results.js';
|
import { useResults, useArtist } from '@/stores/results.js';
|
||||||
import { useData, usePlayer } from '@/stores/player.js';
|
import { useData, usePlayer } from '@/stores/player.js';
|
||||||
|
import { useI18n } from '@/stores/misc.js';
|
||||||
|
|
||||||
const rand = useRand(),
|
const rand = useRand(),
|
||||||
data = useData(),
|
data = useData(),
|
||||||
results = useResults(),
|
results = useResults(),
|
||||||
player = usePlayer(),
|
player = usePlayer(),
|
||||||
artist = useArtist();
|
artist = useArtist(),
|
||||||
|
{ t } = useI18n();
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
index: Number,
|
index: Number,
|
||||||
|
|
|
@ -70,7 +70,8 @@
|
||||||
"no_info": "Keine Informationen verfügbar",
|
"no_info": "Keine Informationen verfügbar",
|
||||||
"see_all": "Alle sehen",
|
"see_all": "Alle sehen",
|
||||||
"search": "Suche starten",
|
"search": "Suche starten",
|
||||||
"saved": "Gespeichert!"
|
"saved": "Gespeichert!",
|
||||||
|
"copied_to_clipboard": "In die Zwischenablage kopiert"
|
||||||
},
|
},
|
||||||
"instances": {
|
"instances": {
|
||||||
"up_to_date": "Aktuell",
|
"up_to_date": "Aktuell",
|
||||||
|
|
|
@ -70,7 +70,8 @@
|
||||||
"see_all": "See All",
|
"see_all": "See All",
|
||||||
"search": "Start Searching",
|
"search": "Start Searching",
|
||||||
"no_info": "No Information Available",
|
"no_info": "No Information Available",
|
||||||
"saved": "Saved!"
|
"saved": "Saved!",
|
||||||
|
"copied_to_clipboard": "Copied to Clipboard"
|
||||||
},
|
},
|
||||||
"instances": {
|
"instances": {
|
||||||
"hyp": "Hyperpipe Instance",
|
"hyp": "Hyperpipe Instance",
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import DOMPurify from 'dompurify';
|
import DOMPurify from 'dompurify';
|
||||||
|
import { useI18n } from '@/stores/misc.js';
|
||||||
|
|
||||||
export function useSanitize(txt) {
|
export function useSanitize(txt) {
|
||||||
return DOMPurify.sanitize(txt, {
|
return DOMPurify.sanitize(txt, {
|
||||||
|
@ -47,9 +48,10 @@ export function useShare(data) {
|
||||||
console.err(err);
|
console.err(err);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
const { t } = useI18n()
|
||||||
navigator.clipboard.writeText(data.url).then(
|
navigator.clipboard.writeText(data.url).then(
|
||||||
() => {
|
() => {
|
||||||
alert('Copied to Clipboard');
|
alert(t('info.copied_to_clipboard'));
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
alert(err);
|
alert(err);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue