Compare commits

...

5 commits

Author SHA1 Message Date
b734dee575 bugfix: cache entry invalidation
- davkey has no "cls" argument
- needs explicit slice
2023-11-22 00:10:37 +01:00
77dd575e72 upgrade dependencies
- poetry up --latest
- yarn upgrade --latest
2023-11-22 00:08:05 +01:00
adbe740edf remove declare $refs 2023-11-21 22:37:00 +00:00
6d4ec2cbe7 CalendarDoor cursor style 2023-11-21 22:33:11 +00:00
08fc47a2e3 ui: add launch/tasks config 2023-11-21 22:25:12 +00:00
12 changed files with 1753 additions and 1530 deletions

View file

@ -95,7 +95,8 @@ class WebDAV:
cls._webdav_client.upload_to(buffer, path)
# invalidate cache entry
cls._cache.pop(davkey("read_bytes")(path))
# explicit slice as there is no "cls" argument
del cls._cache[davkey("read_bytes", slice(0, None))(path)]
@classmethod
async def write_str(cls, path: str, content: str, encoding="utf-8") -> None:

1071
api/poetry.lock generated

File diff suppressed because it is too large Load diff

View file

@ -9,24 +9,24 @@ name = "advent22_api"
version = "0.1.0"
[tool.poetry.dependencies]
Pillow = "^10.0.1"
Pillow = "^10.1.0"
asyncify = "^0.9.2"
cachetools = "^5.3.2"
cachetoolsutils = "^8.2"
cachetoolsutils = "^8.3"
fastapi = "^0.103.1"
numpy = "^1.26.0"
pydantic-settings = "^2.0.3"
markdown = "^3.5.1"
numpy = "^1.26.2"
pydantic-settings = "^2.1.0"
python = ">=3.11,<3.13"
redis = {extras = ["hiredis"], version = "^5.0.1"}
tomli-w = "^1.0.0"
uvicorn = {extras = ["standard"], version = "^0.23.2"}
webdavclient3 = "^3.14.6"
markdown = "^3.5.1"
[tool.poetry.group.dev.dependencies]
black = "^23.10.1"
black = "^23.11.0"
flake8 = "^6.1.0"
pytest = "^7.4.2"
pytest = "^7.4.3"
[build-system]
build-backend = "poetry.core.masonry.api"

15
ui/.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,15 @@
{
// Verwendet IntelliSense zum Ermitteln möglicher Attribute.
// Zeigen Sie auf vorhandene Attribute, um die zugehörigen Beschreibungen anzuzeigen.
// Weitere Informationen finden Sie unter https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "chrome",
"request": "launch",
"name": "Chrome mit Advent22 UI starten",
"url": "http://localhost:8080",
"webRoot": "${workspaceFolder}"
}
]
}

12
ui/.vscode/tasks.json vendored Normal file
View file

@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "serve",
"problemMatcher": [],
"label": "UI starten",
"detail": "vue-cli-service serve"
}
]
}

View file

@ -13,35 +13,35 @@
"@fortawesome/fontawesome-svg-core": "^6.2.1",
"@fortawesome/free-brands-svg-icons": "^6.2.1",
"@fortawesome/free-solid-svg-icons": "^6.2.1",
"@fortawesome/vue-fontawesome": "^3.0.2",
"@types/chai": "^4.3.6",
"@types/luxon": "^3.3.2",
"@types/mocha": "^10.0.1",
"@typescript-eslint/eslint-plugin": "^6.7.2",
"@typescript-eslint/parser": "^6.7.2",
"@fortawesome/vue-fontawesome": "^3.0.5",
"@types/chai": "^4.3.11",
"@types/luxon": "^3.3.5",
"@types/mocha": "^10.0.5",
"@typescript-eslint/eslint-plugin": "^6.12.0",
"@typescript-eslint/parser": "^6.12.0",
"@vue/cli-plugin-babel": "~5.0.0",
"@vue/cli-plugin-eslint": "~5.0.0",
"@vue/cli-plugin-typescript": "~5.0.0",
"@vue/cli-plugin-unit-mocha": "~5.0.0",
"@vue/cli-service": "~5.0.0",
"@vue/eslint-config-typescript": "^12.0.0",
"@vue/test-utils": "^2.4.1",
"@vueuse/core": "^10.5.0",
"@vue/test-utils": "^2.4.2",
"@vueuse/core": "^10.6.1",
"animate.css": "^4.1.1",
"axios": "^1.5.0",
"axios": "^1.6.2",
"bulma": "^0.9.4",
"bulma-prefers-dark": "^0.1.0-beta.1",
"bulma-toast": "^2.4.3",
"chai": "^4.2.0",
"core-js": "^3.32.2",
"eslint": "^8.49.0",
"eslint-plugin-vue": "^9.17.0",
"luxon": "^3.4.3",
"chai": "^4.3.10",
"core-js": "^3.33.3",
"eslint": "^8.54.0",
"eslint-plugin-vue": "^9.18.1",
"luxon": "^3.4.4",
"pinia": "^2.1.7",
"sass": "^1.67.0",
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"typescript": "~5.2.2",
"vue": "^3.3.4",
"typescript": "~5.3.2",
"vue": "^3.3.8",
"vue-class-component": "^8.0.0-0"
}
}

View file

@ -38,6 +38,7 @@
:visible="store.is_touch_device"
:title="$advent22.name_door(door.day)"
@click="door_click(door.day)"
style="cursor: pointer"
/>
</ThouCanvas>
</div>

View file

@ -65,10 +65,6 @@ export default class extends Vue {
public username = "";
public password = "";
declare $refs: {
username_input: HTMLInputElement | unknown;
};
private on_keydown(e: KeyboardEvent) {
if (e.key == "Enter") this.submit();
else if (e.key == "Escape") this.cancel();
@ -78,9 +74,8 @@ export default class extends Vue {
window.addEventListener("keydown", this.on_keydown);
this.$nextTick(() => {
if (this.$refs.username_input instanceof HTMLInputElement) {
this.$refs.username_input.focus();
}
if (!(this.$refs.username_input instanceof HTMLElement)) return;
this.$refs.username_input.focus();
});
}

View file

@ -1,6 +1,5 @@
<template>
<SVGRect
style="cursor: pointer"
variant="primary"
:visible="store.is_touch_device || force_visible"
:rectangle="door.position"

View file

@ -12,7 +12,6 @@
v-for="(door, index) in doors"
:key="`door-${index}`"
:door="door"
style="cursor: inherit"
force_visible
/>
<SVGRect

View file

@ -43,10 +43,6 @@ export default class extends Vue {
public day_str = "";
public editing = false;
declare $refs: {
day_input: HTMLInputElement | unknown;
};
private toggle_editing() {
this.day_str = String(this.door.day);
this.editing = !this.editing;

File diff suppressed because it is too large Load diff