diff options
Diffstat (limited to 'internal/admin/templates')
| -rw-r--r-- | internal/admin/templates/layout.html | 2 | ||||
| -rw-r--r-- | internal/admin/templates/triggers.html | 19 |
2 files changed, 21 insertions, 0 deletions
diff --git a/internal/admin/templates/layout.html b/internal/admin/templates/layout.html index 009e1f7..fe4e0f9 100644 --- a/internal/admin/templates/layout.html +++ b/internal/admin/templates/layout.html @@ -21,6 +21,7 @@ <a href="/editor/players" class="{{if eq .Page "players"}}active{{end}}">Players</a> <a href="/editor/dashboard" class="{{if eq .Page "dashboard"}}active{{end}}">Dashboard</a> <a href="/editor/files" class="{{if eq .Page "files"}}active{{end}}">Files</a> + <a href="/editor/triggers" class="{{if eq .Page "triggers"}}active{{end}}">Triggers</a> <div class="undo-bar"> <span class="undo-label"></span> <button class="undo-btn" onclick="doUndo()" title="">⟲ Undo</button> @@ -40,6 +41,7 @@ {{else if eq .Page "players"}}{{template "body-players" .}} {{else if eq .Page "dashboard"}}{{template "body-dashboard" .}} {{else if eq .Page "files"}}{{template "body-files" .}} +{{else if eq .Page "triggers"}}{{template "body-triggers" .}} {{else if eq .Page "duplicate-rooms"}}{{template "body-duplicate-rooms" .}} {{else}}<p style="color:#888;text-align:center;margin-top:60px">Unknown page: {{.Page}}</p>{{end}} </body> diff --git a/internal/admin/templates/triggers.html b/internal/admin/templates/triggers.html new file mode 100644 index 0000000..3b32765 --- /dev/null +++ b/internal/admin/templates/triggers.html @@ -0,0 +1,19 @@ +{{define "body-triggers"}} +<div class="editor-container"> + <div class="editor-list" id="itemList"> + <div class="search-bar"><input placeholder="Search triggers..." oninput="filterList(this.value)"></div> + <div id="listEntries"></div> + <button class="btn btn-primary btn-sm" style="margin-top:8px;width:100%" onclick="createNew()">+ New Trigger</button> + </div> + <div class="editor-main" id="editorMain"> + <p style="color:#888;text-align:center;margin-top:60px">Select a trigger to edit</p> + </div> +</div> +<script src="/static/editor.js"></script> +<script src="/static/cardeditor.js"></script> +<script src="/static/intereditor.js"></script> +<script src="/static/triggerseditor.js"></script> +<script> +initTriggerEditor(); +</script> +{{end}} |
