mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
chore: minor ui improvements
This commit is contained in:
parent
7c4a2024b6
commit
561198b203
@ -6,6 +6,7 @@ import (
|
|||||||
"github.com/muety/wakapi/repositories"
|
"github.com/muety/wakapi/repositories"
|
||||||
"github.com/muety/wakapi/utils"
|
"github.com/muety/wakapi/utils"
|
||||||
"github.com/patrickmn/go-cache"
|
"github.com/patrickmn/go-cache"
|
||||||
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/muety/wakapi/models"
|
"github.com/muety/wakapi/models"
|
||||||
@ -90,8 +91,16 @@ func (srv *HeartbeatService) GetEntitySetByUser(entityType uint8, user *models.U
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
srv.cache.Set(cacheKey, utils.StringsToSet(results), cache.DefaultExpiration)
|
|
||||||
return results, nil
|
filtered := make([]string, 0, len(results))
|
||||||
|
for _, r := range results {
|
||||||
|
if strings.TrimSpace(r) != "" {
|
||||||
|
filtered = append(filtered, r)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
srv.cache.Set(cacheKey, utils.StringsToSet(filtered), cache.DefaultExpiration)
|
||||||
|
return filtered, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (srv *HeartbeatService) DeleteBefore(t time.Time) error {
|
func (srv *HeartbeatService) DeleteBefore(t time.Time) error {
|
||||||
|
26
static/assets/vendor/tailwind.dist.css
vendored
26
static/assets/vendor/tailwind.dist.css
vendored
@ -641,6 +641,12 @@ video {
|
|||||||
background-color: rgba(47, 133, 90, var(--bg-opacity));
|
background-color: rgba(47, 133, 90, var(--bg-opacity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hover\:bg-gray-700:hover {
|
||||||
|
--bg-opacity: 1;
|
||||||
|
background-color: #4a5568;
|
||||||
|
background-color: rgba(74, 85, 104, var(--bg-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
.hover\:bg-red-600:hover {
|
.hover\:bg-red-600:hover {
|
||||||
--bg-opacity: 1;
|
--bg-opacity: 1;
|
||||||
background-color: #e53e3e;
|
background-color: #e53e3e;
|
||||||
@ -713,6 +719,10 @@ video {
|
|||||||
border-radius: 0.375rem;
|
border-radius: 0.375rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rounded-full {
|
||||||
|
border-radius: 9999px;
|
||||||
|
}
|
||||||
|
|
||||||
.border {
|
.border {
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
@ -753,6 +763,10 @@ video {
|
|||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inline-flex {
|
||||||
|
display: inline-flex;
|
||||||
|
}
|
||||||
|
|
||||||
.table {
|
.table {
|
||||||
display: table;
|
display: table;
|
||||||
}
|
}
|
||||||
@ -821,6 +835,10 @@ video {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-4 {
|
||||||
|
height: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.h-8 {
|
.h-8 {
|
||||||
height: 2rem;
|
height: 2rem;
|
||||||
}
|
}
|
||||||
@ -853,6 +871,10 @@ video {
|
|||||||
font-size: 2.25rem;
|
font-size: 2.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leading-none {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.list-inside {
|
.list-inside {
|
||||||
list-style-position: inside;
|
list-style-position: inside;
|
||||||
}
|
}
|
||||||
@ -1186,6 +1208,10 @@ video {
|
|||||||
overflow-wrap: break-word;
|
overflow-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-4 {
|
||||||
|
width: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
.w-1\/2 {
|
.w-1\/2 {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
@ -244,18 +244,24 @@
|
|||||||
<h3 class="inline-block font-semibold text-md border-b border-green-700 text-white mb-2">Add Label</h3>
|
<h3 class="inline-block font-semibold text-md border-b border-green-700 text-white mb-2">Add Label</h3>
|
||||||
<form action="" method="post">
|
<form action="" method="post">
|
||||||
<input type="hidden" name="action" value="add_label">
|
<input type="hidden" name="action" value="add_label">
|
||||||
<div class="flex items-center mt-2 w-full text-gray-500 text-sm">
|
<div class="flex flex-col space-y-4">
|
||||||
<span class="mr-2">Project:</span>
|
<div class="flex justify-between items-center mt-2 w-full text-gray-500 text-sm space-x-4">
|
||||||
<select name="key" id="select-project"
|
<div class="w-1/2 flex flex-col flex-grow">
|
||||||
class="shadow appearance-nonshadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded py-1 px-3 cursor-pointer">
|
<span>Project</span>
|
||||||
{{ range $i, $p := .Projects }}
|
<select name="key" id="select-project"
|
||||||
<option value="{{ $p }}">{{ $p }}</option>
|
class="shadow appearance-nonshadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded py-1 px-3 cursor-pointer">
|
||||||
{{ end }}
|
{{ range $i, $p := .Projects }}
|
||||||
</select>
|
<option value="{{ $p }}">{{ $p }}</option>
|
||||||
<span class="ml-8 mr-2">Label:</span>
|
{{ end }}
|
||||||
<input class="shadow appearance-nonshadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded py-1 px-3"
|
</select>
|
||||||
type="text" id="label-value" style="width: 130px;"
|
</div>
|
||||||
name="value" placeholder="work" minlength="1" required>
|
<div class="w-1/2 flex flex-col flex-grow">
|
||||||
|
<span>Label</span>
|
||||||
|
<input class="shadow appearance-nonshadow appearance-none bg-gray-800 focus:bg-gray-700 text-gray-300 border-green-700 focus:border-gray-500 border rounded py-1 px-3"
|
||||||
|
type="text" id="label-value"
|
||||||
|
name="value" placeholder="work" minlength="1" required>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="flex-grow flex justify-end">
|
<div class="flex-grow flex justify-end">
|
||||||
<button type="submit"
|
<button type="submit"
|
||||||
class="py-1 px-3 rounded bg-green-700 hover:bg-green-800 text-white text-sm">
|
class="py-1 px-3 rounded bg-green-700 hover:bg-green-800 text-white text-sm">
|
||||||
|
Loading…
Reference in New Issue
Block a user