mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-10-20 15:00:11 +02:00
fix(filebrowser_quantum): drop the doubled status-bar inset in the HA app
2.0 sets viewport-fit=cover and pads its header by env(safe-area-inset-top); inside the ingress panel HA's toolbar already handles that inset. Rewrite it to viewport-fit=auto on the ingress listener only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
- Users, shares and settings in `/config/database.db` are migrated to `/config/database.sqlite` on first start.
|
||||
- `http.trustProxyHeaders` is set to `true`, because the add-on always runs behind nginx on a subpath.
|
||||
- The container healthcheck now checks FileBrowser directly on port 8080 instead of an nginx stub.
|
||||
- Remove the empty band above the search bar in the Home Assistant app: 2.0 padded its header for the phone status bar, which HA already does. This applies to ingress only.
|
||||
- Direct access on port 8071 no longer passes on a client-supplied `X-Forwarded-For`, so the IP-based login lockout cannot be bypassed now that proxy headers are trusted. Ingress keeps the forwarded chain.
|
||||
|
||||
## 2.0.0 (2026-10-10)
|
||||
|
||||
@@ -106,6 +106,11 @@ server {
|
||||
# links inside a document FileBrowser renders in its own iframe -- the
|
||||
# pdf viewer, the srcdoc markdown/html preview, OnlyOffice -- because a
|
||||
# listener on this document never sees another document's clicks.
|
||||
# 2.0 asks for viewport-fit=cover and pads its header by
|
||||
# env(safe-area-inset-top). In the Home Assistant app the panel already
|
||||
# sits below HA's toolbar, which handles that inset, so it was applied
|
||||
# twice (an empty band above the search bar). The direct port is untouched.
|
||||
sub_filter "viewport-fit=cover" "viewport-fit=auto";
|
||||
sub_filter "window.__pwaDeferredPrompt = null;" "window.__pwaDeferredPrompt = null;(function(){var o=window.open;window.open=function(u,n,f){try{var b=(window.globalVars||{}).baseURL;if(u&&n==='_blank'&&!f&&b){if(b.slice(-1)!=='/')b+='/';var t=new URL(u,location.href);if((t.protocol==='http:'||t.protocol==='https:')&&t.origin===location.origin&&(t.pathname.indexOf(b+'files/')===0||t.pathname.indexOf(b+'public/share/')===0)){location.assign(t.href);return window}}}catch(e){}return o.apply(window,arguments)};document.addEventListener('click',function(e){try{if(e.button||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;var a=e.target&&e.target.closest?e.target.closest('a'):null;if(!a||!a.href)return;var b=(window.globalVars||{}).baseURL;if(!b)return;if(b.slice(-1)!=='/')b+='/';var t=new URL(a.href,location.href);if(t.origin!==location.origin)return;if(!a.hasAttribute('download')&&t.searchParams.get('inline')!=='true'&&(t.pathname===b+'api/resources/download'||t.pathname===b+'public/api/resources/download')){a.download='';a.removeAttribute('target');return}if(a.target==='_blank'&&t.pathname.indexOf(b)===0&&navigator.userAgent.indexOf('Mobile/HomeAssistant')!==-1){a.removeAttribute('target')}}catch(err){}},true)})();";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user