mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-21 07:26:18 -05:00
Only showing file name in preview, not full path.
This commit is contained in:
parent
e23d18e495
commit
1c3288d910
1 changed files with 6 additions and 3 deletions
|
|
@ -36,9 +36,10 @@ function getIframeModal(path) {
|
|||
|
||||
function getImageModal(path) {
|
||||
const url = getMediaPathURL(path);
|
||||
const name = path['path'].replace(/^.*[\\\/]/, '');
|
||||
return <React.Fragment>
|
||||
<ModalHeader>
|
||||
{path['path']}
|
||||
{name}
|
||||
</ModalHeader>
|
||||
<ModalContent>
|
||||
<a href={url}>
|
||||
|
|
@ -63,10 +64,11 @@ function getEpubModal(path) {
|
|||
|
||||
function getVideoModal(path) {
|
||||
const url = getMediaPathURL(path);
|
||||
const name = path['path'].replace(/^.*[\\\/]/, '');
|
||||
const type = path['mimetype'] ? path['mimetype'] : 'video/mp4';
|
||||
return <React.Fragment>
|
||||
<ModalHeader>
|
||||
{path['path']}
|
||||
{name}
|
||||
</ModalHeader>
|
||||
<ModalContent>
|
||||
<SHeader as='h5'>{path['path']}</SHeader>
|
||||
|
|
@ -84,10 +86,11 @@ function getVideoModal(path) {
|
|||
|
||||
function getAudioModal(path) {
|
||||
const url = getMediaPathURL(path);
|
||||
const name = path['path'].replace(/^.*[\\\/]/, '');
|
||||
const type = path['mimetype'] !== 'application/octet-stream' ? path['mimetype'] : 'audio/mpeg';
|
||||
return <React.Fragment>
|
||||
<ModalHeader>
|
||||
{path['path']}
|
||||
{name}
|
||||
</ModalHeader><ModalContent>
|
||||
<audio controls
|
||||
autoPlay={true}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue