Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b2cfc45c1 | ||
|
|
c8be41ce6c | ||
|
|
ec2f710d06 | ||
|
|
71112173b9 | ||
|
|
1615c20e66 | ||
|
|
fbcea12786 | ||
|
|
047d13afd1 |
@@ -552,6 +552,10 @@ kbd:active {
|
|||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.summary::-webkit-details-marker {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
.details[open] .summary {
|
.details[open] .summary {
|
||||||
margin-bottom: .8rem;
|
margin-bottom: .8rem;
|
||||||
}
|
}
|
||||||
@@ -1128,7 +1132,7 @@ details[open] .summary::after {
|
|||||||
|
|
||||||
.calendar-date {
|
.calendar-date {
|
||||||
padding: 0.4rem 0;
|
padding: 0.4rem 0;
|
||||||
color: var(--color-text-paragraph);
|
color: var(--color-text-base);
|
||||||
position: relative;
|
position: relative;
|
||||||
border-radius: var(--border-radius);
|
border-radius: var(--border-radius);
|
||||||
background: none;
|
background: none;
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{{ template "widget-base.html" . }}
|
{{ template "widget-base.html" . }}
|
||||||
|
|
||||||
{{- define "widget-content" }}
|
{{- define "widget-content" }}
|
||||||
<div class="dynamic-columns list-gap-20 list-with-separator">
|
<ul class="dynamic-columns list-gap-20 list-with-separator">
|
||||||
{{- range .Containers }}
|
{{- range .Containers }}
|
||||||
<div class="docker-container flex items-center gap-15">
|
<li class="docker-container flex items-center gap-15">
|
||||||
<div class="shrink-0" data-popover-type="html" data-popover-position="above" data-popover-offset="0.25" data-popover-margin="0.1rem" data-popover-max-width="400px">
|
<div class="shrink-0" data-popover-type="html" data-popover-position="above" data-popover-offset="0.25" data-popover-margin="0.1rem" data-popover-max-width="400px" aria-hidden="true">
|
||||||
<img class="docker-container-icon{{ if .Icon.IsFlatIcon }} flat-icon{{ end }}" src="{{ .Icon.URL }}" alt="" loading="lazy">
|
<img class="docker-container-icon{{ if .Icon.IsFlatIcon }} flat-icon{{ end }}" src="{{ .Icon.URL }}" alt="" loading="lazy">
|
||||||
<div data-popover-html>
|
<div data-popover-html>
|
||||||
<div class="color-highlight text-truncate block">{{ .Image }}</div>
|
<div class="color-highlight text-truncate block">{{ .Image }}</div>
|
||||||
@@ -33,31 +33,33 @@
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="margin-left-auto shrink-0" data-popover-type="text" data-popover-position="above" data-popover-text="{{ .State }}">
|
<div class="margin-left-auto shrink-0" data-popover-type="text" data-popover-position="above" data-popover-text="{{ .State }}" aria-label="{{ .State }}">
|
||||||
{{ template "state-icon" .StateIcon }}
|
{{ template "state-icon" .StateIcon }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
<div class="visually-hidden" aria-label="{{ .StateText }}"></div>
|
||||||
|
</li>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<div class="text-center">No containers available to show.</div>
|
<div class="text-center">No containers available to show.</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</div>
|
</ul>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
{{- define "state-icon" }}
|
{{- define "state-icon" }}
|
||||||
{{- if eq . "ok" }}
|
{{- if eq . "ok" }}
|
||||||
<svg class="docker-container-status-icon" fill="var(--color-positive)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
<svg class="docker-container-status-icon" fill="var(--color-positive)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true">
|
||||||
<path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M10 18a8 8 0 1 0 0-16 8 8 0 0 0 0 16Zm3.857-9.809a.75.75 0 0 0-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 1 0-1.06 1.061l2.5 2.5a.75.75 0 0 0 1.137-.089l4-5.5Z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
{{- else if eq . "warn" }}
|
{{- else if eq . "warn" }}
|
||||||
<svg class="docker-container-status-icon" fill="var(--color-negative)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
<svg class="docker-container-status-icon" fill="var(--color-negative)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true">
|
||||||
<path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495ZM10 5a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 10 5Zm0 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
{{- else if eq . "paused" }}
|
{{- else if eq . "paused" }}
|
||||||
<svg class="docker-container-status-icon" fill="var(--color-text-base)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
<svg class="docker-container-status-icon" fill="var(--color-text-base)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true">
|
||||||
<path fill-rule="evenodd" d="M2 10a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm5-2.25A.75.75 0 0 1 7.75 7h.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-4.5Zm4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-4.5Z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M2 10a8 8 0 1 1 16 0 8 8 0 0 1-16 0Zm5-2.25A.75.75 0 0 1 7.75 7h.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-4.5Zm4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 .75.75v4.5a.75.75 0 0 1-.75.75h-.5a.75.75 0 0 1-.75-.75v-4.5Z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
{{- else }}
|
{{- else }}
|
||||||
<svg class="docker-container-status-icon" fill="var(--color-text-base)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20">
|
<svg class="docker-container-status-icon" fill="var(--color-text-base)" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" aria-hidden="true">
|
||||||
<path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0ZM8.94 6.94a.75.75 0 1 1-1.061-1.061 3 3 0 1 1 2.871 5.026v.345a.75.75 0 0 1-1.5 0v-.5c0-.72.57-1.172 1.081-1.287A1.5 1.5 0 1 0 8.94 6.94ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
|
<path fill-rule="evenodd" d="M18 10a8 8 0 1 1-16 0 8 8 0 0 1 16 0ZM8.94 6.94a.75.75 0 1 1-1.061-1.061 3 3 0 1 1 2.871 5.026v.345a.75.75 0 0 1-1.5 0v-.5c0-.72.57-1.172 1.081-1.287A1.5 1.5 0 1 0 8.94 6.94ZM10 15a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z" clip-rule="evenodd" />
|
||||||
</svg>
|
</svg>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<li class="flex thumbnail-parent gap-10 items-center">
|
<li class="flex thumbnail-parent gap-10 items-center">
|
||||||
<img class="video-horizontal-list-thumbnail thumbnail" loading="lazy" src="{{ .ThumbnailUrl }}" alt="">
|
<img class="video-horizontal-list-thumbnail thumbnail" loading="lazy" src="{{ .ThumbnailUrl }}" alt="">
|
||||||
<div class="min-width-0">
|
<div class="min-width-0">
|
||||||
<a class="block text-truncate color-primary-if-not-visited" href="{{ .Url }}">{{ .Title }}</a>
|
<a class="block text-truncate color-primary-if-not-visited" href="{{ .Url }}" target="_blank" rel="noreferrer">{{ .Title }}</a>
|
||||||
<ul class="list-horizontal-text flex-nowrap">
|
<ul class="list-horizontal-text flex-nowrap">
|
||||||
<li class="shrink-0" {{ dynamicRelativeTimeAttrs .TimePosted }}></li>
|
<li class="shrink-0" {{ dynamicRelativeTimeAttrs .TimePosted }}></li>
|
||||||
<li class="min-width-0">
|
<li class="min-width-0">
|
||||||
|
|||||||
@@ -153,12 +153,12 @@ func (r *decoratedGJSONResult) String(key string) string {
|
|||||||
return r.Get(key).String()
|
return r.Get(key).String()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *decoratedGJSONResult) Int(key string) int64 {
|
func (r *decoratedGJSONResult) Int(key string) int {
|
||||||
if key == "" {
|
if key == "" {
|
||||||
return r.Result.Int()
|
return int(r.Result.Int())
|
||||||
}
|
}
|
||||||
|
|
||||||
return r.Get(key).Int()
|
return int(r.Get(key).Int())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *decoratedGJSONResult) Float(key string) float64 {
|
func (r *decoratedGJSONResult) Float(key string) float64 {
|
||||||
@@ -179,11 +179,11 @@ func (r *decoratedGJSONResult) Bool(key string) bool {
|
|||||||
|
|
||||||
var customAPITemplateFuncs = func() template.FuncMap {
|
var customAPITemplateFuncs = func() template.FuncMap {
|
||||||
funcs := template.FuncMap{
|
funcs := template.FuncMap{
|
||||||
"toFloat": func(a int64) float64 {
|
"toFloat": func(a int) float64 {
|
||||||
return float64(a)
|
return float64(a)
|
||||||
},
|
},
|
||||||
"toInt": func(a float64) int64 {
|
"toInt": func(a float64) int {
|
||||||
return int64(a)
|
return int(a)
|
||||||
},
|
},
|
||||||
"add": func(a, b float64) float64 {
|
"add": func(a, b float64) float64 {
|
||||||
return a + b
|
return a + b
|
||||||
|
|||||||
@@ -644,7 +644,10 @@ func fetchPiholeSessionID(instanceURL string, client *http.Client, password stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
if jsonResponse.Session.SID == "" {
|
if jsonResponse.Session.SID == "" {
|
||||||
return "", errors.New("authentication response returned empty session ID")
|
return "", fmt.Errorf(
|
||||||
|
"authentication response returned empty session ID, status code %d, message '%s'",
|
||||||
|
response.StatusCode, jsonResponse.Session.Message,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
return jsonResponse.Session.SID, nil
|
return jsonResponse.Session.SID, nil
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ func (widget *videosWidget) initialize() error {
|
|||||||
widget.Channels = append(widget.Channels, make([]string, len(widget.Playlists))...)
|
widget.Channels = append(widget.Channels, make([]string, len(widget.Playlists))...)
|
||||||
|
|
||||||
for i := range widget.Playlists {
|
for i := range widget.Playlists {
|
||||||
widget.Channels[initialLen+i] = "playlist:" + widget.Playlists[i]
|
widget.Channels[initialLen+i] = videosWidgetPlaylistPrefix + widget.Playlists[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user