Compare commits
5 commits
b4ab4809c6
...
b734dee575
Author | SHA1 | Date | |
---|---|---|---|
b734dee575 | |||
77dd575e72 | |||
adbe740edf | |||
6d4ec2cbe7 | |||
08fc47a2e3 |
12 changed files with 1753 additions and 1530 deletions
|
@ -95,7 +95,8 @@ class WebDAV:
|
||||||
cls._webdav_client.upload_to(buffer, path)
|
cls._webdav_client.upload_to(buffer, path)
|
||||||
|
|
||||||
# invalidate cache entry
|
# 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
|
@classmethod
|
||||||
async def write_str(cls, path: str, content: str, encoding="utf-8") -> None:
|
async def write_str(cls, path: str, content: str, encoding="utf-8") -> None:
|
||||||
|
|
1071
api/poetry.lock
generated
1071
api/poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -9,24 +9,24 @@ name = "advent22_api"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
Pillow = "^10.0.1"
|
Pillow = "^10.1.0"
|
||||||
asyncify = "^0.9.2"
|
asyncify = "^0.9.2"
|
||||||
cachetools = "^5.3.2"
|
cachetools = "^5.3.2"
|
||||||
cachetoolsutils = "^8.2"
|
cachetoolsutils = "^8.3"
|
||||||
fastapi = "^0.103.1"
|
fastapi = "^0.103.1"
|
||||||
numpy = "^1.26.0"
|
markdown = "^3.5.1"
|
||||||
pydantic-settings = "^2.0.3"
|
numpy = "^1.26.2"
|
||||||
|
pydantic-settings = "^2.1.0"
|
||||||
python = ">=3.11,<3.13"
|
python = ">=3.11,<3.13"
|
||||||
redis = {extras = ["hiredis"], version = "^5.0.1"}
|
redis = {extras = ["hiredis"], version = "^5.0.1"}
|
||||||
tomli-w = "^1.0.0"
|
tomli-w = "^1.0.0"
|
||||||
uvicorn = {extras = ["standard"], version = "^0.23.2"}
|
uvicorn = {extras = ["standard"], version = "^0.23.2"}
|
||||||
webdavclient3 = "^3.14.6"
|
webdavclient3 = "^3.14.6"
|
||||||
markdown = "^3.5.1"
|
|
||||||
|
|
||||||
[tool.poetry.group.dev.dependencies]
|
[tool.poetry.group.dev.dependencies]
|
||||||
black = "^23.10.1"
|
black = "^23.11.0"
|
||||||
flake8 = "^6.1.0"
|
flake8 = "^6.1.0"
|
||||||
pytest = "^7.4.2"
|
pytest = "^7.4.3"
|
||||||
|
|
||||||
[build-system]
|
[build-system]
|
||||||
build-backend = "poetry.core.masonry.api"
|
build-backend = "poetry.core.masonry.api"
|
||||||
|
|
15
ui/.vscode/launch.json
vendored
Normal file
15
ui/.vscode/launch.json
vendored
Normal 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
12
ui/.vscode/tasks.json
vendored
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "serve",
|
||||||
|
"problemMatcher": [],
|
||||||
|
"label": "UI starten",
|
||||||
|
"detail": "vue-cli-service serve"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
|
@ -13,35 +13,35 @@
|
||||||
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
"@fortawesome/fontawesome-svg-core": "^6.2.1",
|
||||||
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
"@fortawesome/free-brands-svg-icons": "^6.2.1",
|
||||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||||
"@fortawesome/vue-fontawesome": "^3.0.2",
|
"@fortawesome/vue-fontawesome": "^3.0.5",
|
||||||
"@types/chai": "^4.3.6",
|
"@types/chai": "^4.3.11",
|
||||||
"@types/luxon": "^3.3.2",
|
"@types/luxon": "^3.3.5",
|
||||||
"@types/mocha": "^10.0.1",
|
"@types/mocha": "^10.0.5",
|
||||||
"@typescript-eslint/eslint-plugin": "^6.7.2",
|
"@typescript-eslint/eslint-plugin": "^6.12.0",
|
||||||
"@typescript-eslint/parser": "^6.7.2",
|
"@typescript-eslint/parser": "^6.12.0",
|
||||||
"@vue/cli-plugin-babel": "~5.0.0",
|
"@vue/cli-plugin-babel": "~5.0.0",
|
||||||
"@vue/cli-plugin-eslint": "~5.0.0",
|
"@vue/cli-plugin-eslint": "~5.0.0",
|
||||||
"@vue/cli-plugin-typescript": "~5.0.0",
|
"@vue/cli-plugin-typescript": "~5.0.0",
|
||||||
"@vue/cli-plugin-unit-mocha": "~5.0.0",
|
"@vue/cli-plugin-unit-mocha": "~5.0.0",
|
||||||
"@vue/cli-service": "~5.0.0",
|
"@vue/cli-service": "~5.0.0",
|
||||||
"@vue/eslint-config-typescript": "^12.0.0",
|
"@vue/eslint-config-typescript": "^12.0.0",
|
||||||
"@vue/test-utils": "^2.4.1",
|
"@vue/test-utils": "^2.4.2",
|
||||||
"@vueuse/core": "^10.5.0",
|
"@vueuse/core": "^10.6.1",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"axios": "^1.5.0",
|
"axios": "^1.6.2",
|
||||||
"bulma": "^0.9.4",
|
"bulma": "^0.9.4",
|
||||||
"bulma-prefers-dark": "^0.1.0-beta.1",
|
"bulma-prefers-dark": "^0.1.0-beta.1",
|
||||||
"bulma-toast": "^2.4.3",
|
"bulma-toast": "^2.4.3",
|
||||||
"chai": "^4.2.0",
|
"chai": "^4.3.10",
|
||||||
"core-js": "^3.32.2",
|
"core-js": "^3.33.3",
|
||||||
"eslint": "^8.49.0",
|
"eslint": "^8.54.0",
|
||||||
"eslint-plugin-vue": "^9.17.0",
|
"eslint-plugin-vue": "^9.18.1",
|
||||||
"luxon": "^3.4.3",
|
"luxon": "^3.4.4",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.7",
|
||||||
"sass": "^1.67.0",
|
"sass": "^1.69.5",
|
||||||
"sass-loader": "^13.3.2",
|
"sass-loader": "^13.3.2",
|
||||||
"typescript": "~5.2.2",
|
"typescript": "~5.3.2",
|
||||||
"vue": "^3.3.4",
|
"vue": "^3.3.8",
|
||||||
"vue-class-component": "^8.0.0-0"
|
"vue-class-component": "^8.0.0-0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
:visible="store.is_touch_device"
|
:visible="store.is_touch_device"
|
||||||
:title="$advent22.name_door(door.day)"
|
:title="$advent22.name_door(door.day)"
|
||||||
@click="door_click(door.day)"
|
@click="door_click(door.day)"
|
||||||
|
style="cursor: pointer"
|
||||||
/>
|
/>
|
||||||
</ThouCanvas>
|
</ThouCanvas>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -65,10 +65,6 @@ export default class extends Vue {
|
||||||
public username = "";
|
public username = "";
|
||||||
public password = "";
|
public password = "";
|
||||||
|
|
||||||
declare $refs: {
|
|
||||||
username_input: HTMLInputElement | unknown;
|
|
||||||
};
|
|
||||||
|
|
||||||
private on_keydown(e: KeyboardEvent) {
|
private on_keydown(e: KeyboardEvent) {
|
||||||
if (e.key == "Enter") this.submit();
|
if (e.key == "Enter") this.submit();
|
||||||
else if (e.key == "Escape") this.cancel();
|
else if (e.key == "Escape") this.cancel();
|
||||||
|
@ -78,9 +74,8 @@ export default class extends Vue {
|
||||||
window.addEventListener("keydown", this.on_keydown);
|
window.addEventListener("keydown", this.on_keydown);
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (this.$refs.username_input instanceof HTMLInputElement) {
|
if (!(this.$refs.username_input instanceof HTMLElement)) return;
|
||||||
this.$refs.username_input.focus();
|
this.$refs.username_input.focus();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<SVGRect
|
<SVGRect
|
||||||
style="cursor: pointer"
|
|
||||||
variant="primary"
|
variant="primary"
|
||||||
:visible="store.is_touch_device || force_visible"
|
:visible="store.is_touch_device || force_visible"
|
||||||
:rectangle="door.position"
|
:rectangle="door.position"
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
v-for="(door, index) in doors"
|
v-for="(door, index) in doors"
|
||||||
:key="`door-${index}`"
|
:key="`door-${index}`"
|
||||||
:door="door"
|
:door="door"
|
||||||
style="cursor: inherit"
|
|
||||||
force_visible
|
force_visible
|
||||||
/>
|
/>
|
||||||
<SVGRect
|
<SVGRect
|
||||||
|
|
|
@ -43,10 +43,6 @@ export default class extends Vue {
|
||||||
public day_str = "";
|
public day_str = "";
|
||||||
public editing = false;
|
public editing = false;
|
||||||
|
|
||||||
declare $refs: {
|
|
||||||
day_input: HTMLInputElement | unknown;
|
|
||||||
};
|
|
||||||
|
|
||||||
private toggle_editing() {
|
private toggle_editing() {
|
||||||
this.day_str = String(this.door.day);
|
this.day_str = String(this.door.day);
|
||||||
this.editing = !this.editing;
|
this.editing = !this.editing;
|
||||||
|
|
2118
ui/yarn.lock
2118
ui/yarn.lock
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue