Fix mobile share button
This commit is contained in:
@@ -28,8 +28,8 @@
|
|||||||
window.user_authenticated = {{.Authenticated}};
|
window.user_authenticated = {{.Authenticated}};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<link rel='stylesheet' href='/res/svelte/file_viewer.css'>
|
<link rel='stylesheet' href='/res/svelte/file_viewer.css?v1'>
|
||||||
<script defer src='/res/svelte/file_viewer.js'></script>
|
<script defer src='/res/svelte/file_viewer.js?v1'></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body id="body"></body>
|
<body id="body"></body>
|
||||||
|
@@ -99,10 +99,12 @@ let update_charts = () => {
|
|||||||
<td>Upload Date</td>
|
<td>Upload Date</td>
|
||||||
<td>{formatDate(file.date_upload, true, true, true)}</td>
|
<td>{formatDate(file.date_upload, true, true, true)}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
{#if file.description}
|
||||||
<td>Description</td>
|
<tr>
|
||||||
<td>{file.description}</td>
|
<td>Description</td>
|
||||||
</tr>
|
<td>{file.description}</td>
|
||||||
|
</tr>
|
||||||
|
{/if}
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h2>Downloads</h2>
|
<h2>Downloads</h2>
|
||||||
|
@@ -51,6 +51,20 @@ let toggle_shuffle = () => {
|
|||||||
let sharebar
|
let sharebar
|
||||||
let sharebar_visible = false
|
let sharebar_visible = false
|
||||||
let toggle_sharebar = () => {
|
let toggle_sharebar = () => {
|
||||||
|
if (navigator.share) {
|
||||||
|
let name = current_file.name
|
||||||
|
if (is_list) {
|
||||||
|
name = current_list.title
|
||||||
|
}
|
||||||
|
|
||||||
|
navigator.share({
|
||||||
|
title: name,
|
||||||
|
text: "I would like to share '" + name + "' with you",
|
||||||
|
url: window.location.href
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
sharebar_visible = !sharebar_visible
|
sharebar_visible = !sharebar_visible
|
||||||
if (sharebar_visible) {
|
if (sharebar_visible) {
|
||||||
sharebar.show()
|
sharebar.show()
|
||||||
|
Reference in New Issue
Block a user