mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-06-04 09:41:13 +02:00
fix: make sure condensed view works in pop out windows
This commit is contained in:
@@ -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"]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 (
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user