Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebUI: Add Web App manifest to allow standalone usage #21980

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/webui/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/qbittorrent/qBittorrent.git"
},
"scripts": {
"format": "js-beautify -r *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && prettier --write **.css",
"format": "js-beautify -r *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/*.json public/scripts/*.js && prettier --write **.css",
"lint": "eslint *.mjs private/*.html private/scripts/*.js private/views/*.html public/*.html public/scripts/*.js && stylelint **/*.css && html-validate private public"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/webui/www/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<noscript>
<link rel="stylesheet" type="text/css" href="css/noscript.css?v=${CACHEID}">
</noscript>
<link rel="manifest" href="manifest.json?v=${CACHEID}">

<script defer src="scripts/login.js?locale=${LANG}&v=${CACHEID}"></script>
</head>
Expand Down
13 changes: 13 additions & 0 deletions src/webui/www/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "QBT_TR(qBittorrent WebUI)QBT_TR[CONTEXT=Login]",
"icons": [{
"src": "images/qbittorrent32.png",
"sizes": "32x32",
"type": "image/png"
}, {
"src": "images/qbittorrent-tray.svg",
"sizes": "any",
"type": "image/svg+xml"
}],
"display": "standalone"
}
2 changes: 1 addition & 1 deletion src/webui/www/tstool.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import sys
import xml.etree.ElementTree as ET

accepted_exts = [".js", ".html", ".css"]
accepted_exts = [".js", ".html", ".css", ".json"]

no_obsolete = False
www_folder = "."
Expand Down
1 change: 1 addition & 0 deletions src/webui/www/webui.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@
<file>public/images/qbittorrent-tray.svg</file>
<file>public/images/qbittorrent32.png</file>
<file>public/index.html</file>
<file>public/manifest.json</file>
<file>public/scripts/login.js</file>
</qresource>
</RCC>
Loading