mirror of
https://codeberg.org/Hyperpipe/Hyperpipe
synced 2025-06-29 05:28:00 +02:00
Closes #110, Added support for Portuguese
This commit is contained in:
parent
1b5d6d4ae1
commit
0a81fcf341
7 changed files with 55 additions and 33 deletions
|
@ -35,6 +35,23 @@ export function useStore() {
|
|||
}
|
||||
}
|
||||
|
||||
export function useShare(data) {
|
||||
if ('share' in navigator) {
|
||||
navigator.share(data).catch(err => {
|
||||
console.err(err);
|
||||
});
|
||||
} else {
|
||||
navigator.clipboard.writeText(data.url).then(
|
||||
() => {
|
||||
alert('Copied to Clipboard');
|
||||
},
|
||||
err => {
|
||||
alert(err);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export function useMetadata(url, urls, data) {
|
||||
if ('mediaSession' in navigator) {
|
||||
const now = urls.find(u => u.url === url);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue