This commit is contained in:
dmitry-vsl
2025-10-18 01:16:06 +00:00
parent 88476ffee0
commit e9edd9ff6c
3 changed files with 355 additions and 259 deletions

View File

@@ -54,10 +54,16 @@ const serve_response_from_dir = async event => {
} else if(dir_handle != null) { } else if(dir_handle != null) {
file = await read_file(dir_handle, path) file = await read_file(dir_handle, path)
} else { } else {
/* Get app_window */
let client = await self.clients.get(event.clientId) let client = await self.clients.get(event.clientId)
/*
After open_app_window, event.clientId is empty string, and client is
null. Try to find main window and get dir_handle from it.
TODO better use event.resultingClientId
*/
if(client == null) { if(client == null) {
// Try to find main window and get dir_handle from it
for(const c of await self.clients.matchAll()) { for(const c of await self.clients.matchAll()) {
if(new URL(c.url).pathname == '/') { if(new URL(c.url).pathname == '/') {
client = c client = c
@@ -65,9 +71,6 @@ const serve_response_from_dir = async event => {
} }
} }
// client is null for app_window initial page load, and is app_window for
// js scripts
if(client == null) { if(client == null) {
// User probably reloaded app_window by manually hitting F5 after IDE // User probably reloaded app_window by manually hitting F5 after IDE
// window was closed // window was closed

File diff suppressed because one or more lines are too long

View File

@@ -115,14 +115,22 @@ dialog {
.tabs > .tab { .tabs > .tab {
margin-right: 1em; margin-right: 1em;
padding: 0.3em 1em; padding: 0.3em 0.8em 0.3em 1em;
display: flex; display: flex;
align-items: center; align-items: center;
color: inherit;
text-decoration: none;
.hotkey_key {
font-size: 0.8em;
} }
.tab_label {
.tabs > .tab.active { color: linktext;
text-decoration: underline;
}
&.active {
background-color: rgb(225, 244, 253); background-color: rgb(225, 244, 253);
} }
}
/* debugger */ /* debugger */
@@ -151,6 +159,18 @@ dialog {
overflow: auto; overflow: auto;
} }
.debugger .run_button {
margin: 1em;
color: inherit;
text-decoration: none;
font-family: system-ui;
.run_button_label {
color: linktext;
text-decoration: underline;
}
}
.logs, .io_trace { .logs, .io_trace {
padding-left: 1em; padding-left: 1em;
} }
@@ -191,6 +211,9 @@ dialog {
.callnode .active { .callnode .active {
background-color: var(--active_color); background-color: var(--active_color);
} }
.callnode .deferred_calls {
margin-left: 0em;
}
.call_el { .call_el {
/* /*
Make active callnode background start from the left of the calltree Make active callnode background start from the left of the calltree
@@ -204,8 +227,7 @@ dialog {
display: inline-block; display: inline-block;
} }
.call_el .expand_icon, .call_el .expand_icon_placeholder { .call_el .expand_icon, .call_el .expand_icon_placeholder {
padding-left: 5px; padding: 0px 5px;
padding-right: 2px;
} }
.call_header { .call_header {
@@ -375,6 +397,8 @@ dialog {
} }
.embed_value_explorer_content { .embed_value_explorer_content {
overflow-x: auto;
overflow-y: hidden; /* hide vertical scrollbar */
pointer-events: initial; pointer-events: initial;
white-space: pre; white-space: pre;
max-width: fit-content; max-width: fit-content;
@@ -391,6 +415,46 @@ dialog {
margin-left: 0 !important; margin-left: 0 !important;
} }
.embed_value_explorer_content {
.hotkey_step_into {
margin-right: 1em;
}
&:not(:focus) {
.hotkey_unfocus {
display: none;
}
}
&:focus {
.hotkey_focus {
display: none;
}
}
&.hotkeys_right {
display: flex;
flex-direction: row;
}
.value_explorer_hotkeys {
font-weight: 200;
font-family: system-ui;
font-size: 0.9em;
}
&.hotkeys_bottom {
.value_explorer_hotkeys {
margin: 1em 0.5em 0.3em 0.5em;
}
}
&.hotkeys_right {
.value_explorer_hotkeys {
margin: 0em 1em;
}
}
}
.value_explorer_node { .value_explorer_node {
margin-left: 1em; margin-left: 1em;
&.is_calltree_node_explorer > .value_explorer_header { &.is_calltree_node_explorer > .value_explorer_header {
@@ -420,6 +484,11 @@ dialog {
font-weight: bold; font-weight: bold;
} }
.jump_here {
padding: 0em 1em;
font-family: system-ui;
}
/* status */ /* status */
.statusbar { .statusbar {
@@ -438,17 +507,27 @@ dialog {
.status { .status {
font-size: 1.5em; font-size: 1.5em;
}
.status {
color: red; color: red;
margin-left: 1em;
} }
.statusbar_action, .options { .statusbar_module_with_spinner {
margin-right: 2em; display: flex;
flex-direction: row;
align-items: center;
} }
.statusbar_action.first { .statusbar_controls {
margin-left: auto; display: flex;
flex: 1;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.statusbar_actions {
display: flex;
flex-direction: column;
} }
.open_app_window_button { .open_app_window_button {
@@ -482,17 +561,24 @@ dialog {
transform: translate(-50%); transform: translate(-50%);
} }
.options { .statusbar_links {
padding: 5px; display: flex;
} flex-direction: column;
.options > * {
margin: 5px;
} }
.show_help, .github { .options {
display: flex;
flex-direction: column;
}
.show_help, .website {
margin: 0em 0.5em; margin: 0em 0.5em;
} }
.website:visited {
color: linktext;
}
.statusbar_button, .upload_button { .statusbar_button, .upload_button {
border: none; border: none;
color: white; color: white;
@@ -580,6 +666,13 @@ dialog::backdrop {
margin-bottom: 1em; margin-bottom: 1em;
} }
.hotkey_key {
margin-left: 5px;
background-color: #e5e5e5;
border-radius: 5px;
padding: 0px 8px;
}
.panel:not([open]) { .panel:not([open]) {
display: none; display: none;
} }