2018-04-22 17:41:09 +00:00
|
|
|
<!doctype html>
|
2017-12-02 15:10:19 +00:00
|
|
|
<html lang="en">
|
|
|
|
<head>
|
2018-04-22 17:41:09 +00:00
|
|
|
<!-- Required meta tags -->
|
2017-12-02 15:10:19 +00:00
|
|
|
<meta charset="utf-8">
|
|
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
2018-04-22 17:41:09 +00:00
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
|
|
|
2021-08-26 13:29:25 +00:00
|
|
|
<link rel="stylesheet" href="bundle.css">
|
2017-12-02 15:10:19 +00:00
|
|
|
|
2019-05-12 21:51:56 +00:00
|
|
|
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css"
|
|
|
|
integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
|
2017-12-02 15:10:19 +00:00
|
|
|
|
2021-08-26 13:29:25 +00:00
|
|
|
<style>
|
|
|
|
[v-cloak] { display: none; }
|
|
|
|
audio { width: 80%; }
|
|
|
|
</style>
|
|
|
|
|
2018-04-22 18:24:16 +00:00
|
|
|
<title>Share</title>
|
2017-12-02 15:10:19 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2021-08-26 13:29:25 +00:00
|
|
|
<div id="app" v-cloak>
|
|
|
|
<b-navbar
|
|
|
|
variant="primary"
|
|
|
|
type="dark"
|
|
|
|
>
|
|
|
|
<b-navbar-brand href="#">
|
|
|
|
<i class="fas fa-fw fa-share-alt-square mr-1"></i> Share
|
|
|
|
</b-navbar-brand>
|
|
|
|
</b-navbar>
|
|
|
|
|
|
|
|
<b-container class="mt-4">
|
|
|
|
<b-row>
|
|
|
|
<b-col>
|
|
|
|
<b-card v-if="loading">
|
|
|
|
<b-card-text class="text-center">
|
|
|
|
<h2><i class="fas fa-spinner fa-pulse"></i></h2>
|
|
|
|
{{ $t('loading') }}
|
|
|
|
</b-card-text>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<template v-else>
|
|
|
|
<b-card
|
|
|
|
v-if="error"
|
|
|
|
bg-variant="danger"
|
|
|
|
text-variant="white"
|
|
|
|
>
|
|
|
|
<b-card-text class="text-center">
|
|
|
|
<h2><i class="fas fa-exclamation-circle"></i></h2>
|
|
|
|
{{ error }}
|
|
|
|
</b-card-text>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<b-card v-else-if="fileType.startsWith('image/')">
|
|
|
|
<b-card-text class="text-center">
|
|
|
|
<a :href="path">
|
|
|
|
<b-img
|
|
|
|
:src="path"
|
|
|
|
fluid
|
|
|
|
/>
|
|
|
|
</a>
|
|
|
|
</b-card-text>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<b-card v-else-if="fileType.startsWith('video/')">
|
|
|
|
<b-embed
|
|
|
|
type="video"
|
|
|
|
:src="path"
|
|
|
|
allowfullscreen
|
|
|
|
controls
|
|
|
|
/>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<b-card v-else-if="fileType.startsWith('audio/')">
|
|
|
|
<b-card-text class="text-center">
|
|
|
|
<audio
|
|
|
|
:src="path"
|
|
|
|
controls
|
|
|
|
/>
|
|
|
|
</b-card-text>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<b-card
|
|
|
|
v-else-if="fileType.startsWith('text/markdown')"
|
|
|
|
no-body
|
|
|
|
>
|
|
|
|
<b-card-body
|
|
|
|
v-html="renderMarkdown(text)"
|
|
|
|
/>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<b-card v-else-if="fileType.startsWith('text/')">
|
|
|
|
<pre><code>{{ text }}</code></pre>
|
|
|
|
</b-card>
|
|
|
|
|
|
|
|
<b-card v-else>
|
|
|
|
<b-card-text class="text-center">
|
|
|
|
<h2><i class="fas fa-cloud-download-alt"></i></h2>
|
|
|
|
<b-button
|
|
|
|
:href="path"
|
|
|
|
variant="success"
|
|
|
|
>
|
|
|
|
{{ fileName }}
|
|
|
|
</b-button>
|
|
|
|
</b-card-text>
|
|
|
|
</b-card>
|
|
|
|
</template>
|
|
|
|
</b-col>
|
|
|
|
</b-row>
|
|
|
|
</b-container>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script src="bundle.js"></script>
|
2017-12-02 15:10:19 +00:00
|
|
|
<script src="app.js"></script>
|
|
|
|
</body>
|
|
|
|
</html>
|