15 Commits

Author SHA1 Message Date
96cbac2702 Revert "0.1.2"
This reverts commit 1d788671c6.
2021-04-07 17:00:54 +02:00
1d788671c6 0.1.2 2021-04-07 16:59:42 +02:00
e7458c49f0 Now also triggering electron build
ref #14
2021-04-07 16:59:35 +02:00
2ec6e1c107 Merge branch 'feature/14-release_config' of git.odit.services:lfk/scanclient into feature/14-release_config 2021-04-07 16:51:47 +02:00
3c2300c09e Updated package version to the current version
ref #14
2021-04-07 16:51:46 +02:00
69ab9893d3 Updated version to the current electron version
ref #14
2021-04-07 16:51:25 +02:00
dbff163b6b Added release-it w/ config
ref #14
2021-04-07 16:50:38 +02:00
703168081c Merge pull request 'Symbols for valid/invalid scans feature/11-valid_icons' (#12) from feature/11-valid_icons into dev
Reviewed-on: #12
2021-04-06 19:01:07 +00:00
64398cdd74 Now also showing for errors
ref #11
2021-04-06 20:53:21 +02:00
a4d749cc3f Added svg titels
ref #11
2021-04-06 18:07:13 +02:00
838127cf72 Added missing translations
ref #11
2021-04-06 18:05:04 +02:00
379999e491 Changed test sizes to fit the page on smaller screens
ref #11
2021-04-06 18:03:13 +02:00
be6974af20 Added valid/invalid svg icons
ref #11
2021-04-06 18:00:31 +02:00
c0555c0662 Added valid/invalid logic
ref #11
2021-04-06 18:00:05 +02:00
db4d63da8b Merge pull request 'feature/9-move-url-config-from-env-to-local-config' (#10) from feature/9-move-url-config-from-env-to-local-config into dev
Reviewed-on: #10
close #9
2021-03-23 17:35:48 +00:00
6 changed files with 133 additions and 31 deletions

View File

@@ -4,13 +4,20 @@ name: gitea_token
get:
path: odit-git-bot
name: apikey
---
kind: secret
name: git_ssh
get:
path: odit-git-bot
name: sshkey
---
kind: pipeline
type: kubernetes
name: build
name: build:tag
steps:
- name: run build
depends_on: ["clone"]
image: node:15.11.0-alpine3.13
commands:
- apk add git zip -f
@@ -18,8 +25,7 @@ steps:
- yarn build
- mkdir out
- zip -r out/dist.zip dist
- name: gitea_release
depends_on: ["run build"]
- name: gitea add packages to build
image: plugins/gitea-release
settings:
api_key:
@@ -33,8 +39,17 @@ steps:
- sha512
- adler32
- crc32
when:
event: tag
- name: checkout electron
image: alpine/git
commands:
- git clone https://git.odit.services/lfk/scanclient-electron electron
- cd electron
- name: tag new version
image: node:alpine
commands:
- yarn
- yarn build
- npm --no-git-tag-version version ${DRONE_TAG}
trigger:
event:
- tag

View File

@@ -222,6 +222,35 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# release-it
**Author**: Lars Kappert
**Repo**: https://github.com/release-it/release-it
**License**: MIT
**Description**: Generic CLI tool to automate versioning and package publishing related tasks.
## License Text
MIT License
Copyright (c) 2018 Lars Kappert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# svelte
**Author**: Rich Harris
**Repo**: https://github.com/sveltejs/svelte
@@ -237,6 +266,21 @@ The above copyright notice and this permission notice shall be included in all c
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# svelte-i18n
**Author**: Christian Kaisermann <christian@kaisermann.me>
**Repo**: https://github.com/kaisermann/svelte-i18n
**License**: MIT
**Description**: Internationalization library for Svelte
## License Text
Copyright 2017 Christian Kaisermann <christian@kaisermann.me>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# svelte-preprocess
**Author**: Christian Kaisermann <christian@kaisermann.me>
**Repo**: https://github.com/sveltejs/svelte-preprocess
@@ -4987,18 +5031,3 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# svelte-i18n
**Author**: Christian Kaisermann <christian@kaisermann.me>
**Repo**: https://github.com/kaisermann/svelte-i18n
**License**: MIT
**Description**: Internationalization library for Svelte
## License Text
Copyright 2017 Christian Kaisermann <christian@kaisermann.me>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View File

@@ -1,12 +1,13 @@
{
"name": "@lfk/scanclient",
"version": "0.0.0",
"version": "0.1.1",
"scripts": {
"dev": "vite",
"build": "vite build",
"format": "prettier --write --plugin-search-dir=. ./**/*.html ./**/*.svelte",
"prepare": "husky install",
"license:export": "license-exporter --markdown && git stage licenses.md"
"license:export": "license-exporter --markdown && git stage licenses.md",
"release": "release-it --only-version"
},
"devDependencies": {
"@odit/license-exporter": "^0.0.11",
@@ -18,10 +19,29 @@
"husky": "^5.1.3",
"prettier": "^2.2.1",
"prettier-plugin-svelte": "^2.2.0",
"release-it": "^14.5.1",
"svelte": "^3.35.0",
"svelte-i18n": "^3.3.7",
"svelte-preprocess": "^4.6.9",
"vite": "^2.1.2",
"vite-plugin-windicss": "^0.9.2",
"svelte-i18n": "^3.3.7"
"vite-plugin-windicss": "^0.9.2"
},
"release-it": {
"git": {
"commit": true,
"requireCleanWorkingDir": false,
"commitMessage": "🚀Bumped version to v${version}",
"requireBranch": "dev",
"push": false,
"tag": true,
"tagName": null,
"tagAnnotation": "v${version}"
},
"npm": {
"publish": false
},
"hooks": {
"after:bump": "npx auto-changelog --commit-limit false -p -u --hide-credit && git add CHANGELOG.md && node order.js && git add src/locales"
}
}
}

View File

@@ -9,6 +9,7 @@
let lastscan_time = "";
let lastscan_laptime = "";
let lastscan_totaldistance = "";
let lastscan_valid = true;
let card = "";
// live clock at the top
let time = new Date();
@@ -83,6 +84,7 @@
) +
"s";
lastscan_laptime = response.data.lapTime;
lastscan_valid = response.data.valid;
lastscan_totaldistance =
Math.floor(response.data.runner.distance / 1000) +
"km " +
@@ -112,14 +114,44 @@
/>
</label>
{#if lastscan_totaldistance}
<h1 class="text-3xl font-bold text-center">last scan</h1>
<h1 class="text-5xl font-bold text-center">{lastscan_time}</h1>
<h1 class="text-3xl font-bold text-center">total distance</h1>
<h1 class="text-8xl font-bold text-center">
{#if !lastscan_valid || lastscan_error}
<svg
xmlns="http://www.w3.org/2000/svg"
width="20rem"
height="20rem"
class="ml-auto mr-auto"
version="1.0"
title="Invalid"
viewBox="0 0 100 100"
><g fill="none" stroke="red"
><path d="M6 6l88 88" stroke-width="18.1" /><path
d="M6 94L94 6"
stroke-width="17.8"
/></g
></svg
>
{:else}
<svg
xmlns="http://www.w3.org/2000/svg"
width="20rem"
height="20rem"
class="ml-auto mr-auto"
title="Valid"
viewBox="0 0 600 600"
><path
d="M8 405s115 129 138 182h99c41-126 203-429 341-535 28-37-43-52-102-27-87 36-252 317-283 384-44 12-90-74-90-74z"
fill="#181"
/></svg
>
{/if}
<h1 class="text-2xl font-bold text-center">{$_("total-distance")}</h1>
<h1 class="text-6xl font-bold text-center">
{lastscan_totaldistance}
</h1>
<h1 class="text-3xl font-bold text-center">lap time</h1>
<h1 class="text-8xl font-bold text-center">{lastscan_laptime}</h1>
<h1 class="text-2xl font-bold text-center">{$_("lap-time")}</h1>
<h1 class="text-6xl font-bold text-center">{lastscan_laptime}</h1>
<h1 class="text-2xl font-bold text-center">{$_("last-scan")}</h1>
<h1 class="text-5xl font-bold text-center">{lastscan_time}</h1>
{:else}
<h1 class="text-3xl font-bold text-center">
{$_("please_scan_a_card")}

View File

@@ -7,6 +7,8 @@
"configure": "Konfigurieren",
"error": "Error!",
"language": "Sprache",
"lap-time": "Rundenzeit",
"last-scan": "Letzter Scan um",
"log_out_from_this_client": "Von diesem Scanner abmelden",
"minimum_lap_time": "minimale Rundenzeit",
"please_check_your_token_and_try_again": "Bitte überprüfe den Token und versuche es erneut...",
@@ -22,6 +24,7 @@
"station_id": "Scanstations-ID",
"the_provided_scan_station_is_disabled": "Die angegebene Scanstation ist deaktiviert.",
"the_provided_scan_station_token_is_invalid": "Der angegebene Scanstation-Token ist ungültig.",
"total-distance": "Gesamtdistanz",
"track_distance": "Länge des Tracks",
"track_id": "Track ID",
"track_name": "Track Name"

View File

@@ -7,6 +7,8 @@
"configure": "Configure",
"error": "Error!",
"language": "Language",
"lap-time": "lap time",
"last-scan": "last scan",
"log_out_from_this_client": "Log Out from this Client",
"minimum_lap_time": "minimum lap time",
"please_check_your_token_and_try_again": "Please check your token and try again...",
@@ -22,6 +24,7 @@
"station_id": "Scanstation ID",
"the_provided_scan_station_is_disabled": "The provided scan station is disabled.",
"the_provided_scan_station_token_is_invalid": "The provided scan station token is invalid.",
"total-distance": "total distance",
"track_distance": "Track Distance",
"track_id": "Track ID",
"track_name": "Track Name"