HomePilot Deploy Bot commited on
Commit
cec8735
·
1 Parent(s): f407866

chore(hf): sync HomePilot to HF Space

Browse files
.gitattributes CHANGED
@@ -1,9 +1,9 @@
1
  *.hpersona filter=lfs diff=lfs merge=lfs -text
2
- *.jpeg filter=lfs diff=lfs merge=lfs -text
3
- *.woff filter=lfs diff=lfs merge=lfs -text
4
- *.woff2 filter=lfs diff=lfs merge=lfs -text
5
- *.ico filter=lfs diff=lfs merge=lfs -text
6
  *.png filter=lfs diff=lfs merge=lfs -text
7
  *.jpg filter=lfs diff=lfs merge=lfs -text
8
  *.webp filter=lfs diff=lfs merge=lfs -text
9
  *.svg filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
1
  *.hpersona filter=lfs diff=lfs merge=lfs -text
 
 
 
 
2
  *.png filter=lfs diff=lfs merge=lfs -text
3
  *.jpg filter=lfs diff=lfs merge=lfs -text
4
  *.webp filter=lfs diff=lfs merge=lfs -text
5
  *.svg filter=lfs diff=lfs merge=lfs -text
6
+ *.woff2 filter=lfs diff=lfs merge=lfs -text
7
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
8
+ *.woff filter=lfs diff=lfs merge=lfs -text
9
+ *.ico filter=lfs diff=lfs merge=lfs -text
frontend/.cache-bust CHANGED
@@ -1 +1 @@
1
- 1789231998
 
1
+ 1789232245
frontend/src/ui/SettingsPanelWithMedia.tsx CHANGED
@@ -29,6 +29,19 @@ type MountedHosts = {
29
  const MEDIA_TAB_ATTR = 'data-homepilot-audio-video-tab';
30
  const MEDIA_CONTENT_ATTR = 'data-homepilot-audio-video-content';
31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  /**
33
  * Additive wrapper around the canonical Enterprise Settings panel.
34
  *
@@ -61,12 +74,11 @@ export default function SettingsPanelWithMedia(props: SettingsPanelProps) {
61
  ? Array.from(dialog.querySelectorAll<HTMLElement>('nav[aria-label="Settings sections"]'))
62
  : [];
63
  const body = navElements[0]?.parentElement ?? null;
64
- const content = body
65
- ? Array.from(body.children).find(
66
- (node): node is HTMLElement =>
67
- node instanceof HTMLElement && node.classList.contains('overflow-y-auto'),
68
- ) ?? null
69
- : null;
70
 
71
  if (!dialog || navElements.length === 0 || !content) {
72
  attempts += 1;
@@ -108,6 +120,8 @@ export default function SettingsPanelWithMedia(props: SettingsPanelProps) {
108
  const contentHost = document.createElement('div');
109
  contentHost.setAttribute(MEDIA_CONTENT_ATTR, 'true');
110
  contentHost.style.display = 'none';
 
 
111
  content.appendChild(contentHost);
112
 
113
  if (!cancelled) {
 
29
  const MEDIA_TAB_ATTR = 'data-homepilot-audio-video-tab';
30
  const MEDIA_CONTENT_ATTR = 'data-homepilot-audio-video-content';
31
 
32
+ function findSettingsContentHost(body: HTMLElement, navElements: HTMLElement[]) {
33
+ return (
34
+ Array.from(body.children).find(
35
+ (node): node is HTMLElement =>
36
+ node instanceof HTMLElement &&
37
+ node.tagName !== 'NAV' &&
38
+ !navElements.includes(node) &&
39
+ node.classList.contains('flex-1') &&
40
+ node.classList.contains('overflow-y-auto'),
41
+ ) ?? null
42
+ );
43
+ }
44
+
45
  /**
46
  * Additive wrapper around the canonical Enterprise Settings panel.
47
  *
 
74
  ? Array.from(dialog.querySelectorAll<HTMLElement>('nav[aria-label="Settings sections"]'))
75
  : [];
76
  const body = navElements[0]?.parentElement ?? null;
77
+ // Both the desktop sidebar and the right content pane scroll. The old
78
+ // selector picked the first `overflow-y-auto` child, which is the sidebar
79
+ // on desktop. Only accept the non-nav, flexing sibling that owns the
80
+ // Settings section content.
81
+ const content = body ? findSettingsContentHost(body, navElements) : null;
 
82
 
83
  if (!dialog || navElements.length === 0 || !content) {
84
  attempts += 1;
 
120
  const contentHost = document.createElement('div');
121
  contentHost.setAttribute(MEDIA_CONTENT_ATTR, 'true');
122
  contentHost.style.display = 'none';
123
+ contentHost.style.width = '100%';
124
+ contentHost.style.minWidth = '0';
125
  content.appendChild(contentHost);
126
 
127
  if (!cancelled) {