diff options
| author | historia <[not public]> | 2026-07-10 00:43:29 -0400 |
|---|---|---|
| committer | historia <[not public]> | 2026-07-10 00:43:29 -0400 |
| commit | 6e7c0b3ec4253bb58a815979b1f4574d08cb1f53 (patch) | |
| tree | dbff1952bdbf14cd58a6128775e263b53fc64ec1 /internal/admin/templates | |
| parent | 9836513d287396fabcba85956366e6410d7363ef (diff) | |
| download | thehouseoficarus-6e7c0b3ec4253bb58a815979b1f4574d08cb1f53.tar.gz | |
feat(admin): add triggers to rooms, add global triggers
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}} |
