Skip to content

Commit 140933f

Browse files
committed
Support spaces from medium links, rename active_tab to tab
1 parent d59f558 commit 140933f

6 files changed

Lines changed: 11 additions & 8 deletions

File tree

etc/js/app.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const defaultAppParams = {
2727
},
2828
entities: {
2929
path: undefined,
30-
active_tab: "Overview",
30+
tab: "Overview",
3131
inspector_tab: "Inspect",
3232
tree_mode: "Entities",
3333
},
@@ -50,7 +50,7 @@ function newAppParams() {
5050
let result = structuredClone(defaultAppParams);
5151

5252
result.run_playground = function() {
53-
this.entities.active_tab = "Scene";
53+
this.entities.tab = "Scene";
5454
this.entities.inspector_tab = "Script";
5555
this.entities.path = "etc.assets.scene\\.flecs";
5656
this.host = "flecs_explorer.wasm";
@@ -524,6 +524,9 @@ Promise.all(components).then((values) => {
524524
value = url.slice(paramValuePos + 1);
525525
}
526526

527+
// medium links encode spaces as +
528+
value = value.replaceAll("+", "%20");
529+
527530
if (key.length == 1) {
528531
const type = typeof this.app_params[key[0]];
529532
this.app_params[key[0]] =

etc/js/components/pages/entities/page.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<pane-content :conn="conn" :app_state="app_state"
2525
ref="pane_content"
26-
v-model:active_tab="appParams.entities.active_tab"
26+
v-model:tab="appParams.entities.tab"
2727
v-model:scripts="appParams.scripts"
2828
@onCodeChange="onCodeChange">
2929
</pane-content>

etc/js/components/pages/entities/pane-content.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const props = defineProps({
3535
});
3636
3737
const emit = defineEmits(["onCodeChange"]);
38-
const activeTab = defineModel("active_tab");
38+
const activeTab = defineModel("tab");
3939
const scripts = defineModel("scripts");
4040
const changed = ref(false);
4141

etc/js/components/widgets/edit-tabs.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ div.edit-tabs-container {
145145
146146
div.edit-tabs-content {
147147
grid-row: 2;
148-
height: calc(100% - 4px);
149-
overflow-y: auto;
148+
height: 100%;
149+
overflow-y: none;
150150
}
151151
152152
div.edit-tabs-tabs {

etc/js/components/widgets/scene-canvas.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ onUnmounted(() => {
5252
});
5353
5454
watch(() => [props.app_state.has3DCanvas, props.app_params.page,
55-
props.app_params.sidebar, props.app_params.entities.active_tab,
55+
props.app_params.sidebar, props.app_params.entities.tab,
5656
props.app_params.script], () =>
5757
{
5858
handleResize();

etc/js/components/widgets/title-bar/url-bar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function onConnect() {
8484
app_params.value.scripts = [];
8585
app_params.value.code = undefined;
8686
app_params.value.code_url = undefined;
87-
app_params.value.entities.active_tab = "Overview";
87+
app_params.value.entities.tab = "Overview";
8888
app_params.value.entities.inspector_tab = "Inspect";
8989
app_params.value.entities.path = undefined;
9090
app_params.value.host = "localhost";

0 commit comments

Comments
 (0)