fix: make the desktop editing easy to discover
This commit is contained in:
parent
e6f867da74
commit
328ddc1949
3 changed files with 30 additions and 1 deletions
|
|
@ -437,3 +437,18 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.desktop-edit{
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background-color: var(--surface-gray-7);
|
||||
position: absolute;
|
||||
bottom: 4%;
|
||||
right: 4%;
|
||||
z-index: 100;
|
||||
opacity: 0.1;
|
||||
}
|
||||
.desktop-edit:hover{
|
||||
opacity: 1;
|
||||
transition: opacity 0.3s;
|
||||
}
|
||||
|
|
@ -36,5 +36,5 @@
|
|||
<button class="save btn btn-primary ellipsis">
|
||||
{{ _("Save") }}
|
||||
</button>
|
||||
</div>`
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -179,6 +179,20 @@ class DesktopPage {
|
|||
this.setup_editing_mode();
|
||||
this.handle_route_change();
|
||||
this.setup_events();
|
||||
this.setup_edit_button();
|
||||
}
|
||||
setup_edit_button() {
|
||||
const me = this;
|
||||
this.$desktop_edit_button = $(
|
||||
"<button class='btn btn-reset desktop-edit'></button>"
|
||||
).appendTo(document.body);
|
||||
this.$desktop_edit_button.html(
|
||||
frappe.utils.icon("square-pen", "md", "", "", "", "", "white")
|
||||
);
|
||||
this.$desktop_edit_button.on("click", () => {
|
||||
me.start_editing_layout();
|
||||
me.$desktop_edit_button.hide();
|
||||
});
|
||||
}
|
||||
setup_editing_mode() {
|
||||
const me = this;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue