diff --git a/.github/labeler.yml b/.github/labeler.yml index 836631f4..45236aa3 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -15,3 +15,6 @@ "repl": - "repl/**/*" + +"ui": + - "ui/**/*" diff --git a/repl/commands/portfolio.go b/repl/commands/portfolio.go index c0d8adab..64e6b902 100644 --- a/repl/commands/portfolio.go +++ b/repl/commands/portfolio.go @@ -26,9 +26,9 @@ import ( portfoliov1 "github.com/oxisto/money-gopher/gen" "github.com/oxisto/money-gopher/gen/portfoliov1connect" "github.com/oxisto/money-gopher/repl" - "google.golang.org/protobuf/types/known/timestamppb" "github.com/bufbuild/connect-go" + "google.golang.org/protobuf/types/known/timestamppb" ) type portfolioSnapshot struct{} diff --git a/service/portfolio/snapshot.go b/service/portfolio/snapshot.go index 0118f7ce..604d319c 100644 --- a/service/portfolio/snapshot.go +++ b/service/portfolio/snapshot.go @@ -119,6 +119,7 @@ func marketPrice(secmap map[string]*portfoliov1.Security, name string, netPrice } } +// TODO(oxisto): remove once maps.Keys is in the stdlib in Go 1.22 func keys[M ~map[K]V, K comparable, V any](m M) (keys []K) { keys = make([]K, 0, len(m)) diff --git a/ui/src/lib/components/Date.svelte b/ui/src/lib/components/Date.svelte new file mode 100644 index 00000000..69789d14 --- /dev/null +++ b/ui/src/lib/components/Date.svelte @@ -0,0 +1,16 @@ + + +{#if date} + +{:else} + - +{/if} diff --git a/ui/src/lib/components/Performance.svelte b/ui/src/lib/components/Performance.svelte new file mode 100644 index 00000000..affb4487 --- /dev/null +++ b/ui/src/lib/components/Performance.svelte @@ -0,0 +1,31 @@ + + +