minor ui tweaks

This commit is contained in:
nkanaev
2025-10-02 19:30:06 +01:00
parent 5a3547e32e
commit a851d8ac9d
4 changed files with 10 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ GO_TAGS = sqlite_foreign_keys sqlite_json
GO_LDFLAGS = -s -w -X 'main.Version=$(VERSION)' -X 'main.GitHash=$(GITHASH)'
GO_FLAGS = -tags "$(GO_TAGS)" -ldflags="$(GO_LDFLAGS)"
GO_FLAGS_DEBUG = -tags "$(GO_TAGS) debug"
GO_FLAGS_GUI = -tags "$(GO_TAGS) gui" -ldflags="$(GO_LDFLAGS)"
GO_FLAGS_GUI_WIN = -tags "$(GO_TAGS) gui" -ldflags="$(GO_LDFLAGS) -H windowsgui"
@@ -75,7 +76,7 @@ windows_arm64_gui: src/platform/versioninfo.rc
GOOS=windows GOARCH=arm64 go build $(GO_FLAGS_GUI_WIN) -o out/$@/yarr.exe ./cmd/yarr
serve:
go run $(GO_FLAGS) ./cmd/yarr -db local.db
go run $(GO_FLAGS_DEBUG) ./cmd/yarr -db local.db
test:
go test $(GO_FLAGS) ./...

View File

@@ -8,6 +8,7 @@ import (
"io/ioutil"
"log"
"os"
"fmt"
)
type assetsfs struct {
@@ -19,8 +20,10 @@ var FS assetsfs
func (afs assetsfs) Open(name string) (fs.File, error) {
if afs.embedded != nil {
fmt.Println("serving from embedded")
return afs.embedded.Open(name)
}
fmt.Println("serving local")
return os.DirFS("src/assets").Open(name)
}

View File

@@ -1,3 +1,5 @@
//go:build !debug
package assets
import "embed"

View File

@@ -24,21 +24,21 @@
<div class="p-2 toolbar d-flex align-items-center">
<div class="icon mx-2">{% inline "anchor.svg" %}</div>
<div class="flex-grow-1"></div>
<button class="toolbar-item"
<button class="toolbar-item ml-1"
:class="{active: filterSelected == 'unread'}"
:aria-pressed="filterSelected == 'unread'"
title="Unread"
@click="filterSelected = 'unread'">
<span class="icon">{% inline "circle-full.svg" %}</span>
</button>
<button class="toolbar-item"
<button class="toolbar-item mx-1"
:class="{active: filterSelected == 'starred'}"
:aria-pressed="filterSelected == 'starred'"
title="Starred"
@click="filterSelected = 'starred'">
<span class="icon">{% inline "star-full.svg" %}</span>
</button>
<button class="toolbar-item"
<button class="toolbar-item mr-1"
:class="{active: filterSelected == ''}"
:aria-pressed="filterSelected == ''"
title="All"