From a0ba83c9d46cab8b0e5d2edf2fbf75690cc83e74 Mon Sep 17 00:00:00 2001 From: Daniel Shleifman Date: Sun, 19 Jun 2022 20:12:39 +0300 Subject: [PATCH] VLC button support added --- web/public/site.webmanifest | 2 +- .../Table/index.jsx | 20 ++++++++++++++----- .../components/Settings/MobileAppSettings.jsx | 20 +++++++++++++++++++ .../components/Settings/SettingsDialog.jsx | 12 +++++++++++ web/src/locales/en/translation.json | 7 +++++-- web/src/locales/ru/translation.json | 7 +++++-- web/src/locales/ua/translation.json | 7 +++++-- 7 files changed, 63 insertions(+), 12 deletions(-) create mode 100644 web/src/components/Settings/MobileAppSettings.jsx diff --git a/web/public/site.webmanifest b/web/public/site.webmanifest index e8e9a68..6ba810e 100644 --- a/web/public/site.webmanifest +++ b/web/public/site.webmanifest @@ -1,5 +1,5 @@ { - "name": "", + "name": "TorrServer", "short_name": "TorrServer", "icons": [ { diff --git a/web/src/components/DialogTorrentDetailsContent/Table/index.jsx b/web/src/components/DialogTorrentDetailsContent/Table/index.jsx index 8a15bb1..dd65182 100644 --- a/web/src/components/DialogTorrentDetailsContent/Table/index.jsx +++ b/web/src/components/DialogTorrentDetailsContent/Table/index.jsx @@ -28,6 +28,8 @@ const Table = memo( // if files in list is more then 1 and no season text detected by ptt.parse, show full name const shouldDisplayFullFileName = playableFileList.length > 1 && !fileHasEpisodeText + const isVlcUsed = JSON.parse(localStorage.getItem('isVlcUsed')) ?? true + return !playableFileList?.length ? ( 'No playable files in this torrent' ) : ( @@ -133,11 +135,19 @@ const Table = memo( {t('Preload')} - - - + {isVlcUsed ? ( + + + + ) : ( + + + + )}