fix: manifest.json path, deprecated meta tag, minor code style
This commit is contained in:
@@ -2279,7 +2279,7 @@ function bindStaticEventListeners() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Delegated input save with debounce for remote instance URL/name fields
|
// Delegated input save with debounce for remote instance URL/name fields
|
||||||
var _remoteDebounceTimer;
|
let _remoteDebounceTimer;
|
||||||
remoteInstancesContainer.addEventListener('input', function(e) {
|
remoteInstancesContainer.addEventListener('input', function(e) {
|
||||||
var input = e.target.closest && e.target.closest('.settings-remote-url, .settings-remote-name, .settings-remote-key');
|
var input = e.target.closest && e.target.closest('.settings-remote-url, .settings-remote-name, .settings-remote-key');
|
||||||
if (!input) return;
|
if (!input) return;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||||
<meta name="theme-color" content="#0D1117" />
|
<meta name="theme-color" content="#0D1117" />
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes" />
|
<meta name="mobile-web-app-capable" content="yes" />
|
||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<link rel="manifest" href="/manifest.json" />
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
"theme_color": "#0D1117",
|
"theme_color": "#0D1117",
|
||||||
"icons": [
|
"icons": [
|
||||||
{"src": "/pwa-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any"},
|
{"src": "/pwa-192.png", "sizes": "192x192", "type": "image/png", "purpose": "any"},
|
||||||
{"src": "/pwa-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any maskable"}
|
{"src": "/pwa-512.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable"},
|
||||||
|
{"src": "/pwa-512.png", "sizes": "512x512", "type": "image/png", "purpose": "any"}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ _SOUP: BeautifulSoup = BeautifulSoup(HTML_PATH.read_text(), "html.parser")
|
|||||||
|
|
||||||
|
|
||||||
def test_html_pwa_meta() -> None:
|
def test_html_pwa_meta() -> None:
|
||||||
"""apple-mobile-web-app-capable, rel=manifest, theme-color, apple-mobile-web-app-status-bar-style."""
|
"""mobile-web-app-capable, rel=manifest, theme-color, apple-mobile-web-app-status-bar-style."""
|
||||||
soup = _SOUP
|
soup = _SOUP
|
||||||
# rel=manifest
|
# rel=manifest
|
||||||
assert soup.find("link", rel="manifest"), "Missing <link rel='manifest'>"
|
assert soup.find("link", rel="manifest"), "Missing <link rel='manifest'>"
|
||||||
@@ -20,9 +20,9 @@ def test_html_pwa_meta() -> None:
|
|||||||
assert soup.find("meta", attrs={"name": "theme-color"}), (
|
assert soup.find("meta", attrs={"name": "theme-color"}), (
|
||||||
"Missing <meta name='theme-color'>"
|
"Missing <meta name='theme-color'>"
|
||||||
)
|
)
|
||||||
# apple-mobile-web-app-capable
|
# mobile-web-app-capable (modern replacement for deprecated apple-mobile-web-app-capable)
|
||||||
assert soup.find("meta", attrs={"name": "apple-mobile-web-app-capable"}), (
|
assert soup.find("meta", attrs={"name": "mobile-web-app-capable"}), (
|
||||||
"Missing <meta name='apple-mobile-web-app-capable'>"
|
"Missing <meta name='mobile-web-app-capable'>"
|
||||||
)
|
)
|
||||||
# apple-mobile-web-app-status-bar-style
|
# apple-mobile-web-app-status-bar-style
|
||||||
assert soup.find("meta", attrs={"name": "apple-mobile-web-app-status-bar-style"}), (
|
assert soup.find("meta", attrs={"name": "apple-mobile-web-app-status-bar-style"}), (
|
||||||
|
|||||||
Reference in New Issue
Block a user