1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

Compare commits

..

10 Commits

11 changed files with 50 additions and 43 deletions

View File

@ -45,6 +45,6 @@ jobs:
ghcr.io/${{ github.repository }}:latest
ghcr.io/${{ github.repository }}:alpine
ghcr.io/${{ github.repository }}:${{ env.GIT_TAG }}
platforms: linux/amd64,linux/arm64
platforms: linux/amd64,linux/arm64,linux/arm/v7
cache-from: type=registry,ref=n1try/wakapi:buildcache-alpine
cache-to: type=registry,ref=n1try/wakapi:buildcache-alpine,mode=max

View File

@ -1,19 +1,26 @@
# Build Stage
# To build locally: docker buildx build . -t wakapi --load
FROM golang:1.16-alpine AS build-env
# Preparation to save some time
FROM --platform=$BUILDPLATFORM golang:1.17-alpine AS prep-env
WORKDIR /src
# Required for go-sqlite3
RUN apk add gcc musl-dev
ADD ./go.mod .
RUN go mod download
ADD . .
RUN wget "https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh" -O wait-for-it.sh && \
chmod +x wait-for-it.sh
ADD . .
RUN go build -o wakapi
# Build Stage
FROM golang:1.17-alpine AS build-env
# Required for go-sqlite3
RUN apk add --no-cache gcc musl-dev
WORKDIR /src
COPY --from=prep-env /src .
RUN go build -v -o wakapi
WORKDIR /app
RUN cp /src/wakapi . && \
@ -31,7 +38,7 @@ RUN cp /src/wakapi . && \
FROM alpine:3
WORKDIR /app
RUN apk update && apk add bash ca-certificates tzdata && rm -rf /var/cache/apk
RUN apk add --no-cache bash ca-certificates tzdata
# See README.md and config.default.yml for all config options
ENV ENVIRONMENT prod

View File

@ -29,7 +29,7 @@
</div>
<p align="center">
<img src="static/assets/images/screenshot.png" width="500px">
<img src="static/assets/images/screenshot.webp" width="500px">
</p>
Installation instructions can be found below and in the [Wiki](https://github.com/muety/wakapi/wiki).

View File

@ -1,8 +1,8 @@
#!/bin/bash
if [ "$WAKAPI_DB_TYPE" == "sqlite3" ] || [ "$WAKAPI_DB_TYPE" == "" ]; then
./wakapi
exec ./wakapi
else
echo "Waiting for database to come up"
./wait-for-it.sh "$WAKAPI_DB_HOST:$WAKAPI_DB_PORT" -s -t 60 -- ./wakapi
fi
exec ./wait-for-it.sh "$WAKAPI_DB_HOST:$WAKAPI_DB_PORT" -s -t 60 -- ./wakapi
fi

View File

@ -17,7 +17,7 @@ import (
const (
intervalPattern = `interval:([a-z0-9_]+)`
entityFilterPattern = `(project|os|editor|language|machine):([_a-zA-Z0-9-\s]+)`
entityFilterPattern = `(project|os|editor|language|machine|label):([_a-zA-Z0-9-\s]+)`
)
type BadgeHandler struct {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -1 +1 @@
2.0.0-RC1
2.0.0

View File

@ -5,7 +5,7 @@
<meta property="og:title" content="Wakapi - Coding Statistics" />
<meta property="og:type" content="website" />
<meta property="og:description" content="Wakapi is an open-source tool that helps you keep track of the time you have spent coding on different projects in different programming languages and more. Ideal for statistics freaks and anyone else.">
<meta property="og:image" content="assets/images/screenshot.png" />
<meta property="og:image" content="assets/images/screenshot.webp" />
<link rel="apple-touch-icon" sizes="180x180" href="assets/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon-16x16.png">

View File

@ -58,7 +58,7 @@
</p>
<div class="flex justify-center my-8">
<img alt="App screenshot" src="assets/images/screenshot.png">
<img alt="App screenshot" src="assets/images/screenshot.webp">
</div>
<div class="flex flex-col items-center mt-10">

View File

@ -266,33 +266,33 @@
</div>
{{end}}
<div class="mb-8"></div>
{{ if .Projects }}
<h3 class="inline-block font-semibold text-gray-300">Add Label</h3>
<form action="" method="post">
<input type="hidden" name="action" value="add_label">
<div class="flex flex-col space-y-4">
<div class="flex items-center mt-2 w-full text-gray-500 text-sm space-x-4">
<select name="key" id="select-project"
class="select-default flex-grow">
{{ range $i, $p := .Projects }}
<option value="{{ $p }}">{{ $p }}</option>
{{ end }}
</select>
<input class="input-default"
type="text" id="label-value"
name="value" placeholder="Label" minlength="1" required>
<button type="submit" class="btn-primary">
Add
</button>
</div>
</div>
</form>
{{ else }}
<div class="text-gray-300 text-sm mb-4 mt-6">You don't have any projects, yet. Start out by sending a few heartbeats before you can then assign labels.</div>
{{ end }}
</div>
{{end}}
{{ if .Projects }}
<h3 class="inline-block font-semibold text-gray-300">Add Label</h3>
<form action="" method="post">
<input type="hidden" name="action" value="add_label">
<div class="flex flex-col space-y-4">
<div class="flex items-center mt-2 w-full text-gray-500 text-sm space-x-4">
<select name="key" id="select-project"
class="select-default flex-grow">
{{ range $i, $p := .Projects }}
<option value="{{ $p }}">{{ $p }}</option>
{{ end }}
</select>
<input class="input-default"
type="text" id="label-value"
name="value" placeholder="Label" minlength="1" required>
<button type="submit" class="btn-primary">
Add
</button>
</div>
</div>
</form>
{{ else }}
<div class="text-gray-300 text-sm mb-4 mt-6">You don't have any projects, yet. Start out by sending a few heartbeats before you can then assign labels.</div>
{{ end }}
</div>
</div>
</div>
@ -476,7 +476,7 @@
</form>
</div>
<div v-cloak id="integrations" class="tab flex flex-col space-y-4" v-if="isActive('integrations')">
<div v-cloak id="integrations" class="tab flex flex-col space-y-4" v-show="isActive('integrations')">
<form action="" method="post" class="w-full lg:w-3/4">
<input type="hidden" name="action" value="toggle_wakatime">