mirror of
https://github.com/lone-cloud/prism
synced 2026-06-03 08:43:10 -07:00
64 lines
2.2 KiB
HTML
64 lines
2.2 KiB
HTML
{{if .}}
|
||
<ul class="app-list">
|
||
{{range .}}
|
||
{{$app := .}}
|
||
<li class="app-item">
|
||
<div class="app-info">
|
||
<div class="app-name"><strong>{{.AppName}}</strong></div>
|
||
{{if .Channels}}
|
||
<div class="app-subscriptions">
|
||
{{range .Channels}}
|
||
{{$channel := .}}
|
||
{{if .Toggleable}}
|
||
{{if .Active}}
|
||
<button type="button"
|
||
class="channel-badge channel-{{.Channel}} badge-active"
|
||
hx-delete="/apps/{{$app.AppName}}/subscriptions/{{(index .Subscriptions 0).ID}}"
|
||
hx-target="#apps-list"
|
||
hx-swap="innerHTML"
|
||
aria-label="Disable {{.Label}} for {{$app.AppName}}">
|
||
{{.Label}}
|
||
<span class="tooltip">Channel ID: {{(index .Subscriptions 0).ID}}</span>
|
||
</button>
|
||
{{else}}
|
||
<button type="button"
|
||
class="channel-badge channel-{{.Channel}} badge-inactive"
|
||
hx-post="/apps/{{$app.AppName}}/subscriptions"
|
||
hx-target="#apps-list"
|
||
hx-swap="innerHTML"
|
||
hx-vals='{"channel":"{{.Channel}}"}'
|
||
aria-label="Enable {{.Label}} for {{$app.AppName}}">
|
||
+ {{.Label}}
|
||
<span class="tooltip">Click to enable</span>
|
||
</button>
|
||
{{end}}
|
||
{{else}}
|
||
{{range .Subscriptions}}
|
||
<span class="channel-badge channel-{{$channel.Channel}} badge-subscribed">
|
||
{{$channel.Label}}
|
||
<span class="tooltip">Channel ID: {{.ID}}</span>
|
||
<button type="button"
|
||
class="btn-delete-sub"
|
||
data-action="delete-subscription"
|
||
data-url="/apps/{{$app.AppName}}/subscriptions/{{.ID}}"
|
||
aria-label="Remove {{$channel.Channel}} channel from {{$app.AppName}}">×</button>
|
||
</span>
|
||
{{end}}
|
||
{{end}}
|
||
{{end}}
|
||
</div>
|
||
{{else}}
|
||
<div class="app-no-subscriptions">
|
||
<span class="channel-badge channel-not-configured">No integrations linked</span>
|
||
</div>
|
||
{{end}}
|
||
</div>
|
||
<div class="app-actions">
|
||
<button type="button" class="btn-danger" data-action="delete-app" data-app-name="{{.AppName}}">Delete</button>
|
||
</div>
|
||
</li>
|
||
{{end}}
|
||
</ul>
|
||
{{else}}
|
||
<p>No apps registered yet. See <a href="https://github.com/lone-cloud/prism?tab=readme-ov-file#real-world-examples" target="_blank" rel="noopener noreferrer">real-world examples</a> to get started.</p>
|
||
{{end}}
|