fix: make sure condensed view works in pop out windows

This commit is contained in:
Alejandro Gómez
2026-03-31 09:03:19 +02:00
parent 4ca9c2ffbd
commit 0af86b667e
3 changed files with 21 additions and 11 deletions

View File

@@ -17,7 +17,12 @@
"title": "grimoire",
"description": "a nostr client for magicians",
"publishAppHandler": false,
"profile": { "name": "grimoire", "about": "a nostr client for magicians", "picture": "https://grimoire.rocks/favicon.ico", "website": "https://grimoire.rocks" },
"profile": {
"name": "grimoire",
"about": "a nostr client for magicians",
"picture": "https://grimoire.rocks/favicon.ico",
"website": "https://grimoire.rocks"
},
"appHandler": {
"id": "k50nvf8d85",
"kinds": [777, 10777, 30777],
@@ -26,12 +31,12 @@
"icon": "https://grimoire.rocks/favicon.ico",
"platforms": {
"web": {
"patterns": [
{
"url": "https://grimoire.rocks/<bech32>",
"entities": ["npub", "nprofile", "nevent", "naddr"]
}
]
"patterns": [
{
"url": "https://grimoire.rocks/<bech32>",
"entities": ["npub", "nprofile", "nevent", "naddr"]
}
]
}
}
}

View File

@@ -1135,13 +1135,15 @@ export default function ReqViewer({
}, [events, exportFilename]);
const handleViewModeUpdate = () => {
const newViewMode = viewMode == "compact" ? "list" : "compact";
setViewMode(newViewMode);
// Update global state if window exists (not available in pop-out mode)
const windowState = state.windows[windowId];
if (!windowState) return;
let { commandString } = windowState;
const newViewMode = viewMode == "compact" ? "list" : "compact";
if (commandString && commandString.indexOf("--view") > -1) {
if (newViewMode == "list") {
commandString = commandString.replace("--view compact", "--view list");
@@ -1158,8 +1160,6 @@ export default function ReqViewer({
view: newViewMode,
},
});
setViewMode(newViewMode);
};
return (

View File

@@ -302,6 +302,11 @@ function reconstructReqCommand(props: any): string {
parts.push("--search", filter.search);
}
// View mode
if (props.view && props.view !== "list") {
parts.push("--view", props.view);
}
// Close on EOSE
if (props.closeOnEose) {
parts.push("--close-on-eose");