Skip to content

Commit

Permalink
Add v3 button
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Jul 12, 2024
1 parent 3bcf5c6 commit 3e00304
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
12 changes: 11 additions & 1 deletion etc/v4/flecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ const flecs = {
path = this._.escapePath(path);
return this._.request(this, "PUT", "toggle/" + path, {
enable: true, component: component

});
},

Expand All @@ -302,12 +301,23 @@ const flecs = {
});
},

// Create entity
create: function(path) {
path = this._.escapePath(path);
return this._.request(this, "PUT", "entity/" + path, {});
},

// Delete entity
delete: function(path) {
path = this._.escapePath(path);
return this._.request(this, "DELETE", "entity/" + path, {});
},

// Get all entities in world
world: function(reply, err) {
return this._.request(this, "GET", "world", {}, reply, err);
},

// Update script code
scriptUpdate: function(path, code, params, recv, err) {
if (!params) params = {};
Expand Down
31 changes: 20 additions & 11 deletions etc/v4/js/components/widgets/title-bar/title-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
target="_blank">
</a>
</div>
<div class="title-bar-v3">
<a href="v3">
<button>v3 explorer</button>
</a>
</div>
<div class="title-bar-controls">
<play-control
:conn="conn"
Expand Down Expand Up @@ -54,7 +59,7 @@ const app_params = defineModel("app_params");
div.title-bar {
display: grid;
grid-template-columns: 2.5rem 1fr 30rem 1fr auto auto 0.0rem;
grid-template-columns: 2.5rem auto 1fr 30rem 1fr auto auto 0.0rem;
gap: var(--gap);
font-size: 0.9rem;
}
Expand All @@ -63,16 +68,26 @@ div.title-bar-logo a {
grid-column: 1;
}
div.title-bar-controls {
div.title-bar-v3 {
grid-column: 2;
}
div.title-bar-v3 button {
background-color: var(--orange);
color: black;
font-weight: bold;
}
div.title-bar-controls {
grid-column: 3;
text-align: center;
padding: 4px;
}
div.title-bar-logo {
grid-column: 1;
display: grid;
grid-template-columns: 1fr;
grid-column: 1;
padding: 2px;
}
Expand All @@ -82,17 +97,11 @@ div.title-info {
}
div.title-info-right-1 {
grid-column: 5;
/* position: absolute; */
/* right: calc(var(--gap) + 1.0rem); */
/* height: var(--header-height); */
grid-column: 6;
}
div.title-info-right-2 {
grid-column: 6;
/* position: absolute; */
/* right: var(--gap); */
/* height: var(--header-height); */
grid-column: 7;
}
@media screen and (max-width: 800px) {
Expand Down
2 changes: 1 addition & 1 deletion etc/v4/js/components/widgets/title-bar/url-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function onChange() {
-moz-appearance: none;
outline: none;
position: relative;
grid-column: 3;
grid-column: 4;
border-style: solid;
border-width: 1px;
border-radius: var(--border-radius-large);
Expand Down

0 comments on commit 3e00304

Please sign in to comment.