fixes: remove buggy favorites-bar behavior, switch settings app back to non-subdomain for this release

This commit is contained in:
dr-frmr 2024-06-06 16:16:41 -06:00
parent 27f1c1e5a5
commit 0e5470405b
No known key found for this signature in database
8 changed files with 51 additions and 53 deletions

View File

@ -9,7 +9,7 @@
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1.00001, viewport-fit=cover" />
<script type="module" crossorigin src="/assets/index-BkgGa32-.js"></script>
<script type="module" crossorigin src="/assets/index-BVEbM5H5.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BS5LP50I.css">
</head>

View File

@ -9,7 +9,7 @@
<meta httpEquiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport"
content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1.00001, viewport-fit=cover" />
<script type="module" crossorigin src="/assets/index-BkgGa32-.js"></script>
<script type="module" crossorigin src="/assets/index-BVEbM5H5.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-BS5LP50I.css">
</head>

View File

@ -27,7 +27,7 @@ const AppsDock: React.FC = () => {
final = final.filter(a => a)
unorderedApps.forEach(a => final.push(a))
console.log({ final })
// console.log({ final })
setDockedApps(final)
}, [apps, favoriteApps])
@ -59,7 +59,7 @@ const AppsDock: React.FC = () => {
const faves = { ...favoriteApps }
packageNames.forEach((name, i) => {
console.log('setting order for', name, 'to', i)
// console.log('setting order for', name, 'to', i)
faves[name].order = i
})
@ -75,9 +75,6 @@ const AppsDock: React.FC = () => {
credentials: 'include',
body: JSON.stringify(packageNames)
})
.then(data => {
console.log({ data })
})
.catch(e => console.error(e));
}
@ -95,23 +92,23 @@ const AppsDock: React.FC = () => {
'flex-col': dockedApps.length === 0
})}
>
{dockedApps.length === 0
{/*dockedApps.length === 0
? <AppDisplay app={apps.find(app => app.package_name === 'app_store')!} />
: dockedApps.map(app => <Draggable
key={app.package_name}
draggableId={app.package_name}
index={dockedApps.indexOf(app)}
>
{(provided, _snapshot) => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<AppDisplay app={app} />
</div>
)}
</Draggable>)}
: */ dockedApps.map(app => <Draggable
key={app.package_name}
draggableId={app.package_name}
index={dockedApps.indexOf(app)}
>
{(provided, _snapshot) => (
<div
ref={provided.innerRef}
{...provided.draggableProps}
{...provided.dragHandleProps}
>
<AppDisplay app={app} />
</div>
)}
</Draggable>)}
{provided.placeholder}
{dockedApps.length === 0 && <div>Favorite an app to pin it to your dock.</div>}
</div>

View File

@ -33,7 +33,7 @@ function Homepage() {
fetch(getFetchUrl('/main:app_store:sys/apps'), { credentials: 'include' }).then(res => res.json()).catch(() => []),
fetch(getFetchUrl('/version'), { credentials: 'include' }).then(res => res.text()).catch(() => '')
]).then(([appsData, appStoreData, version]) => {
console.log({ appsData, appStoreData, version })
// console.log({ appsData, appStoreData, version })
setVersion(version)

View File

@ -34,9 +34,6 @@ const usePersistentStore = create<PersistentStore>()(
setFavoriteApps: (favoriteApps: PersistentStore['favoriteApps']) => set({ favoriteApps }),
toggleWidgetVisibility: (package_name: string) => {
const { widgetSettings } = get()
if (!window.confirm(`Really hide this widget?`)) {
return
}
set({
widgetSettings: {
...widgetSettings,

View File

@ -157,9 +157,9 @@ fn initialize(our: Address) {
.unwrap();
// Serve the index.html and other UI files found in pkg/ui at the root path.
http::secure_serve_ui(&our, "ui", vec!["/"]).unwrap();
http::secure_bind_http_path("/ask").unwrap();
http::secure_bind_ws_path("/", false).unwrap();
http::serve_ui(&our, "ui", true, false, vec!["/"]).unwrap();
http::bind_http_path("/ask", true, false).unwrap();
http::bind_ws_path("/", true, false).unwrap();
// Grab our state, then enter the main event loop.
let mut state: SettingsState = SettingsState::new(our);

View File

@ -1194,7 +1194,11 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
}
const firstPathItem = window.location.pathname.split('/')[1];
document.getElementById("node-and-domain").innerText = "${node} " + firstPathItem;
if (firstPathItem === '') {
document.getElementById("node-and-domain").innerText = "${node} ";
} else {
document.getElementById("node-and-domain").innerText = "${node}: authenticate for secure subdomain app " + firstPathItem;
}
async function login(password) {
document.getElementById("signup-form").style.display = "none";