diff --git a/assets/css/extra.css b/assets/css/extra.css index bd2de00..8f09c58 100644 --- a/assets/css/extra.css +++ b/assets/css/extra.css @@ -48,12 +48,12 @@ --blueBtn-bottom: rgb(44, 78, 180); } :root[theme="onedark"] { - --background: #282C34 ; + --background: #282c34; --text: #d2d6df; - --box-main: #4D515D; - --box-toggle: #2F333D; + --box-main: #4d515d; + --box-toggle: #2f333d; --box-toggleOn: #13a3b7; - --item-bg: #4D515D; + --item-bg: #4d515d; --select: #57b6c2; --greenBtn: #85cf50; --greenBtn-bottom: #406923; @@ -63,13 +63,13 @@ --blueBtn-bottom: rgb(44, 78, 180); } :root[theme="matrix"] { - --background: #0D0208; - --text: #00FF41; + --background: #0d0208; + --text: #00ff41; --box-main: #0c2216; --box-toggle: #214338; --box-toggleOn: #24782e; --item-bg: #214338; - --select: #00FF41; + --select: #00ff41; --greenBtn: #19b42b; --greenBtn-bottom: #10701c; --redBtn: #19b42b; @@ -79,23 +79,23 @@ } :root[theme="github"] { - --background: #F6F8FA; - --text: #292D31; - --box-main: #FFFFFF; - --box-toggle: #F3f3f3; + --background: #f6f8fa; + --text: #292d31; + --box-main: #ffffff; + --box-toggle: #f3f3f3; --box-toggleOn: #cce5ff; - --item-bg: #3A66D150; + --item-bg: #3a66d150; --select: #cce5ff; --greenBtn: #0a9431; --greenBtn-bottom: #0c6826; --redBtn: #d73a49; --redBtn-bottom: #9b2733; - --blueBtn: #005CC5; + --blueBtn: #005cc5; --blueBtn-bottom: #00428e; } :root[theme="latte"] { - --background: #dce0e8 ; + --background: #dce0e8; --text: #4c4f69; --box-main: #eff1f5; --box-toggle: #e6e9ef; @@ -111,10 +111,10 @@ } :root[theme="solarized-dark"] { - --background: #002B36; + --background: #002b36; --text: #a4b1b3; --box-main: #003745; - --box-toggle: #2E4C52; + --box-toggle: #2e4c52; --box-toggleOn: #005a6f; --item-bg: #003745; --select: #2aa198; @@ -123,7 +123,7 @@ --redBtn: #dc322f; --redBtn-bottom: #af2523; --blueBtn: #268bd2; - --blueBtn-bottom:#2074b1; + --blueBtn-bottom: #2074b1; } body { @@ -171,6 +171,14 @@ input[type="text"], background-color: var(--box-main); } +#flatpakTxt { + margin: 0 15px; + padding: 20px 15px; + cursor: pointer; + text-decoration: underline; + color: var(--blueBtn); +} + .prefBox { flex-direction: row; } @@ -286,6 +294,6 @@ body::-webkit-scrollbar { width: 10px; } body::-webkit-scrollbar-thumb { - background:linear-gradient(rgb(110, 110, 110), rgb(77, 77, 77)); + background: linear-gradient(rgb(110, 110, 110), rgb(77, 77, 77)); border-radius: 8px; -} \ No newline at end of file +} diff --git a/html/preferences.html b/html/preferences.html index 12ad2e7..bc74a65 100644 --- a/html/preferences.html +++ b/html/preferences.html @@ -109,8 +109,7 @@

Preferences

- -
+

Select browser to use cookies from ℹ️ @@ -126,7 +125,6 @@

Preferences

-
diff --git a/package.json b/package.json index ab6162c..acdff38 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "yt-dlp-wrap-plus": "^2.3.18" }, "name": "ytdownloader", - "version": "3.16.0", + "version": "3.16.1", "main": "main.js", "scripts": { "start": "electron .", diff --git a/src/translate_preferences.js b/src/translate_preferences.js index 0519a66..6e8baa9 100644 --- a/src/translate_preferences.js +++ b/src/translate_preferences.js @@ -1,3 +1,5 @@ +const { shell } = require("electron"); + function getId(id) { return document.getElementById(id); } @@ -37,3 +39,12 @@ getId("trayTxt").textContent = i18n.__("Close app to system tray"); getId("autoUpdateTxt").textContent = i18n.__("Disable auto updates"); getId("showMoreFormatsTxt").textContent = i18n.__("Show more format options"); getId("preferredVideoCodecTxt").textContent = i18n.__("Preferred video codec"); + +if (process.env.FLATPAK_ID) { + getId("flatpakTxt").textContent = i18n.__( + "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'" + ); + getId("flatpakTxt").addEventListener("click", () => { + shell.openExternal("https://flathub.org/apps/com.github.tchx84.Flatseal") + }) +} diff --git a/translations/en.json b/translations/en.json index 9b95651..7c274f6 100644 --- a/translations/en.json +++ b/translations/en.json @@ -23,90 +23,91 @@ "Source Code is available ": "Source Code is available ", "here": "here", "Processing": "Processing", - "Some error has occurred. Check your network and use correct URL":"Some error has occurred. Check your network and use correct URL", + "Some error has occurred. Check your network and use correct URL": "Some error has occurred. Check your network and use correct URL", "Failed to download necessary files. Please check your network and try again": "Failed to download necessary files. Please check your network and try again", - "Try again":"Try again", - "Unknown size":"Unknown size", - "MB":"MB", - "Unknown quality":"Unknown quality", - "Downloading...":"Downloading...", - "Some error has occurred. Hover to see details":"Some error has occurred. Hover to see details", - "File saved successfully":"File saved successfully", - "File saved. Click to Open":"File saved. Click to Open", - "Preparing...":"Preparing...", - "Progress":"Progress", - "Speed":"Speed", - "Quality":"Quality", - "Restart app":"Restart app", - "Subtitles":"Subtitles", - "Download subtitles if available":"Download subtitles if available", - "Download auto generated subtitles":"Download auto generated subtitles", - "Extract Audio from Video":"Extract Audio from Video", - "Extract":"Extract", - "Downloading necessary files":"Downloading necessary files", - "low":"low", - "medium":"medium", - "ytDownloader lets you download videos and audios from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on":"ytDownloader lets you download videos and audios from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on", + "Try again": "Try again", + "Unknown size": "Unknown size", + "MB": "MB", + "Unknown quality": "Unknown quality", + "Downloading...": "Downloading...", + "Some error has occurred. Hover to see details": "Some error has occurred. Hover to see details", + "File saved successfully": "File saved successfully", + "File saved. Click to Open": "File saved. Click to Open", + "Preparing...": "Preparing...", + "Progress": "Progress", + "Speed": "Speed", + "Quality": "Quality", + "Restart app": "Restart app", + "Subtitles": "Subtitles", + "Download subtitles if available": "Download subtitles if available", + "Download auto generated subtitles": "Download auto generated subtitles", + "Extract Audio from Video": "Extract Audio from Video", + "Extract": "Extract", + "Downloading necessary files": "Downloading necessary files", + "low": "low", + "medium": "medium", + "ytDownloader lets you download videos and audios from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on": "ytDownloader lets you download videos and audios from hundreds of sites like Youtube, Facebook, Instagram, Tiktok, Twitter and so on", "Click to paste video link from clipboard [Ctrl + V]": "Click to paste video link from clipboard [Ctrl + V]", "Click to paste playlist link from clipboard [Ctrl + V]": "Click to paste playlist link from clipboard [Ctrl + V]", "Link:": "Link:", "Downloading playlist:": "Downloading playlist:", - "Download playlist":"Download playlist", - "Playlist downloaded":"Playlist downloaded", - "This option lets you download restricted content. You will get errors if cookies are not there":"This option lets you download restricted content. You will get errors if cookies are not there", - "Select browser to use cookies from":"Select browser to use cookies from", - "None":"None", - "A new version is available, do you want to download it?":"A new version is available, do you want to download it?", - "A new version is available, do you want to update?":"A new version is available, do you want to update?", - "Update":"Update", - "No":"No", - "Install and restart now?":"Install and restart now?", - "Restart":"Restart", - "Later":"Later", - "Extract Audio":"Extract Audio", - "Select Video Format ":"Select Video Format ", - "Select Audio Format ":"Select Audio Format ", - "Maximum number of active downloads":"Maximum number of active downloads", + "Download playlist": "Download playlist", + "Playlist downloaded": "Playlist downloaded", + "This option lets you download restricted content. You will get errors if cookies are not there": "This option lets you download restricted content. You will get errors if cookies are not there", + "Select browser to use cookies from": "Select browser to use cookies from", + "None": "None", + "A new version is available, do you want to download it?": "A new version is available, do you want to download it?", + "A new version is available, do you want to update?": "A new version is available, do you want to update?", + "Update": "Update", + "No": "No", + "Install and restart now?": "Install and restart now?", + "Restart": "Restart", + "Later": "Later", + "Extract Audio": "Extract Audio", + "Select Video Format ": "Select Video Format ", + "Select Audio Format ": "Select Audio Format ", + "Maximum number of active downloads": "Maximum number of active downloads", "Preferred video quality": "Preferred video quality", "Preferred audio format": "Preferred audio format", "Best": "Best", - "File saved.":"File saved.", - "Open download folder":"Open download folder", - "Path:":"Path:", - "Select config file":"Select config file", - "Use configuration file":"Use configuration file", - "Filename format for playlists":"Filename format for playlists", - "Folder name format for playlists":"Folder name format for playlists", - "Reset to default":"Reset to default", - "Playlist range":"Playlist range", + "File saved.": "File saved.", + "Open download folder": "Open download folder", + "Path:": "Path:", + "Select config file": "Select config file", + "Use configuration file": "Use configuration file", + "Filename format for playlists": "Filename format for playlists", + "Folder name format for playlists": "Folder name format for playlists", + "Reset to default": "Reset to default", + "Playlist range": "Playlist range", "Thumbnail": "Thumbnail", - "Link added":"Link added", - "Download thumbnails":"Download thumbnails", + "Link added": "Link added", + "Download thumbnails": "Download thumbnails", "Save video links to a file": "Save video links to a file", - "Close app to system tray":"Close app to system tray", - "Use config file":"Use config file", - "Open app":"Open app", - "Paste video link":"Paste video link", - "Quit":"Quit", - "Error Details":"Error Details", - "Click to copy":"Click to copy", - "Copied text":"Copied text", - "Normal":"Normal", - "Good":"Good", - "Bad":"Bad", - "Worst":"Worst", - "Select Quality":"Select Quality", - "Disable auto updates":"Disable auto updates", - "ultralow":"ultralow", - "Close app when download finishes":"Close app when download finishes", - "Auto":"Auto", - "Theme":"Theme", - "Light":"Light", - "Dark":"Dark", - "Frappé":"Frappé", - "One Dark":"One Dark", - "Matrix":"Matrix", + "Close app to system tray": "Close app to system tray", + "Use config file": "Use config file", + "Open app": "Open app", + "Paste video link": "Paste video link", + "Quit": "Quit", + "Error Details": "Error Details", + "Click to copy": "Click to copy", + "Copied text": "Copied text", + "Normal": "Normal", + "Good": "Good", + "Bad": "Bad", + "Worst": "Worst", + "Select Quality": "Select Quality", + "Disable auto updates": "Disable auto updates", + "ultralow": "ultralow", + "Close app when download finishes": "Close app when download finishes", + "Auto": "Auto", + "Theme": "Theme", + "Light": "Light", + "Dark": "Dark", + "Frappé": "Frappé", + "One Dark": "One Dark", + "Matrix": "Matrix", "Solarized Dark": "Solarized Dark", "Preferred video codec": "Preferred video codec", - "Show more format options": "Show more format options" + "Show more format options": "Show more format options", + "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'": "You need to give the app permission to access home directory to use this. You can do it with Flatseal by enabling the permission with text 'filesystem=home'" }