ui fix and enhance

*update menu plugins path
*edit service button is now save instead of edit
*fix bad behavior with ace editor : difference between lib letter spacing calculation and real position leading to cursor not showing current position on text area
This commit is contained in:
Jordan Blasenhauer 2024-02-01 11:22:25 +01:00
parent a7a9055b8c
commit 4ea4c7af3f
5 changed files with 17 additions and 10 deletions

File diff suppressed because one or more lines are too long

View file

@ -116,7 +116,7 @@ class ServiceModal {
this.updateModalData(obj);
//show modal
this.resetFilterInp();
this.changeSubmitBtn("EDIT", "edit-btn");
this.changeSubmitBtn("SAVE", "valid-btn");
this.openModal();
}
} catch (err) {}

View file

@ -259,7 +259,13 @@ class FolderDropdown {
class FolderEditor {
constructor() {
this.editor = ace.edit("editor");
this.editor = ace.edit("editor", {
backwards: false,
wrap: false,
caseSensitive: false,
wholeWord: false,
regExp: false,
});
this.darkMode = document.querySelector("[data-dark-toggle]");
this.initEditor();
this.listenDarkToggle();
@ -268,6 +274,8 @@ class FolderEditor {
initEditor() {
//editor options
this.editor.setShowPrintMargin(false);
this.editor.session.setUseSoftTabs(true);
this.editor.setOption("showInvisibles", true);
this.setDarkMode();
}

View file

@ -8,16 +8,15 @@
}
* {
font-family: "Open Sans", sans-serif !important;
font-family: "Open Sans", sans-serif;
}
.ace_editor,
.ace_editor div,
.ace_content {
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro",
.ace_editor * {
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Droid Sans Mono", "Consolas",
monospace !important;
font-size: 16px !important;
font-weight: normal !important;
font-weight: 400 !important;
letter-spacing: 0 !important;
}
.sr-only {

View file

@ -449,7 +449,7 @@
<a
target="_blank"
class="{% if current_endpoint == 'logs' %}font-semibold text-slate-700 dark:bg-primary/50 rounded-lg dark:hover:bg-primary/60 bg-primary/20 hover:bg-primary/30{% else %}dark:hover:bg-primary/20 hover:bg-primary/5 {% endif %} hover:rounded-lg dark:text-white dark:opacity-80 py-1 text-sm ease-nav-brand my-0 mx-2 flex items-center whitespace-nowrap px-4 transition"
href="{{request.url_root}}plugins?plugin_id={{plugin['id']}}"
href="{{request.url_root}}plugins/{{plugin['id']}}"
>
<div
class="mr-2 flex items-center justify-center rounded-lg bg-center stroke-0 text-center p-1 xl:p-1.5"