add version chooser icon top right

This commit is contained in:
Stewart Allen 2022-02-25 14:06:28 -05:00
commit 094d4ba7c9
4 changed files with 12 additions and 7 deletions

View file

@ -31,4 +31,5 @@
* `C` add preferences for normal length and color * `C` add preferences for normal length and color
* `-` add preferences for face selection and matching * `-` add preferences for face selection and matching
* `-` svg and image import conversion (share code with Kiri:Moto) * `-` svg and image import conversion (share code with Kiri:Moto)
* `-` add version chooser
* `-` welcome help menu * `-` welcome help menu

View file

@ -540,6 +540,10 @@ const api = exports({
window.open("https://docs.grid.space/projects/mesh-tool"); window.open("https://docs.grid.space/projects/mesh-tool");
}, },
version() {
window.location = "/choose";
},
clear() { clear() {
for (let group of group.list()) { for (let group of group.list()) {
group.remove(group); group.remove(group);

View file

@ -226,6 +226,9 @@ function ui_build() {
// add a help button // add a help button
h.bind($('top-right'), [ h.bind($('top-right'), [
h.div({ id: "top-version", onclick: api.version }, [
h.div({ class: "fas fa-hashtag" }),
]),
h.div({ id: "top-settings", onclick: api.settings }, [ h.div({ id: "top-settings", onclick: api.settings }, [
h.div({ class: "fas fa-sliders-h" }), h.div({ class: "fas fa-sliders-h" }),
]), ]),

View file

@ -170,10 +170,13 @@ button:hover {
bottom: 0; bottom: 0;
right: 3px; right: 3px;
top: 0; top: 0;
gap: 5px; gap: 8px;
} }
#top-right > div { #top-right > div {
flex-direction: column;
justify-content: center;
align-items: center;
flex-direction: row; flex-direction: row;
color: #888; color: #888;
} }
@ -190,12 +193,6 @@ button:hover {
color: white; color: white;
} }
#top-settings, #top-help {
flex-direction: column;
justify-content: center;
align-items: center
}
.export { .export {
flex-direction: column; flex-direction: column;
font-family: monospace; font-family: monospace;