Compare commits

..

15 Commits

Author SHA1 Message Date
b38f5edd9e Merge pull request #87 from PhoenixTwoFive/dependabot/pip/backend/tomlkit-0.13.2
Bump tomlkit from 0.12.3 to 0.13.2 in /backend
2024-09-27 15:05:20 +02:00
374a080b0e Bump tomlkit from 0.12.3 to 0.13.2 in /backend
Bumps [tomlkit](https://github.com/sdispater/tomlkit) from 0.12.3 to 0.13.2.
- [Release notes](https://github.com/sdispater/tomlkit/releases)
- [Changelog](https://github.com/python-poetry/tomlkit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sdispater/tomlkit/compare/0.12.3...0.13.2)

---
updated-dependencies:
- dependency-name: tomlkit
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 13:00:13 +00:00
8a9fa436d8 Merge pull request #88 from PhoenixTwoFive/dependabot/pip/backend/tzdata-2024.2
Bump tzdata from 2024.1 to 2024.2 in /backend
2024-09-27 14:59:24 +02:00
4ec347988a Merge pull request #89 from PhoenixTwoFive/dependabot/pip/backend/blinker-1.8.2
Bump blinker from 1.7.0 to 1.8.2 in /backend
2024-09-27 14:59:13 +02:00
ec89ac482d Bump blinker from 1.7.0 to 1.8.2 in /backend
Bumps [blinker](https://github.com/pallets-eco/blinker) from 1.7.0 to 1.8.2.
- [Release notes](https://github.com/pallets-eco/blinker/releases)
- [Changelog](https://github.com/pallets-eco/blinker/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets-eco/blinker/compare/1.7.0...1.8.2)

---
updated-dependencies:
- dependency-name: blinker
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 11:19:11 +00:00
836b509a7d Bump tzdata from 2024.1 to 2024.2 in /backend
Bumps [tzdata](https://github.com/python/tzdata) from 2024.1 to 2024.2.
- [Release notes](https://github.com/python/tzdata/releases)
- [Changelog](https://github.com/python/tzdata/blob/master/NEWS.md)
- [Commits](https://github.com/python/tzdata/compare/2024.1...2024.2)

---
updated-dependencies:
- dependency-name: tzdata
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-27 11:17:52 +00:00
6da62c4132 Actually move dependabot config to correct location 2024-09-27 13:12:50 +02:00
34a7ea1a55 Move dependabot config to correct location 2024-09-27 13:11:26 +02:00
555cdda631 Add Dependabot configuration for weekly dependency updates and update VSCode settings for YAML schemas 2024-09-27 11:01:19 +02:00
cc4c538e91 Merge pull request #84 from PhoenixTwoFive/83-dark-mode-is-broken
Fix dark mode styling
2024-03-15 15:51:05 +01:00
a03c1c41bb Fix linter complaint.
Remove unused variable assignment on SQL Query execution.
2024-03-15 15:47:39 +01:00
ed09a93b3d Fix dark mode styling
Fixes "Dark mode is broken" #83
2024-03-15 15:43:30 +01:00
0234d64bf2 Remove debug prints 2024-02-16 14:10:35 +01:00
eb86575332 Update footer year 2024-02-16 13:20:57 +01:00
1cf6a6a733 Merge pull request #82 from PhoenixTwoFive/81-stuck-tooltips
Fix 81 stuck tooltips
2024-02-16 12:34:10 +01:00
7 changed files with 24 additions and 15 deletions

8
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "/backend"
schedule:
interval: "weekly"
day: "sunday"
time: "16:00"

View File

@ -10,5 +10,8 @@
"python.testing.unittestEnabled": true, "python.testing.unittestEnabled": true,
"emmet.includeLanguages": { "emmet.includeLanguages": {
"django-html": "html" "django-html": "html"
},
"yaml.schemas": {
"https://json.schemastore.org/dependabot-2.0.json": "file:///home/phillip/Projekte/Software/StuK/karaoqueue/dependabot.yml"
} }
} }

View File

@ -32,11 +32,9 @@ def favicon():
@nocache @nocache
def enqueue(): def enqueue():
if not request.json: if not request.json:
print(request.data)
abort(400) abort(400)
client_id = request.json['client_id'] client_id = request.json['client_id']
if not helpers.is_valid_uuid(client_id): if not helpers.is_valid_uuid(client_id):
print(request.data)
abort(400) abort(400)
name = request.json['name'].strip() name = request.json['name'].strip()
song_id = request.json['id'] song_id = request.json['id']
@ -46,11 +44,9 @@ def enqueue():
else: else:
if helpers.get_accept_entries(app): if helpers.get_accept_entries(app):
if not request.json: if not request.json:
print(request.data)
abort(400) abort(400)
client_id = request.json['client_id'] client_id = request.json['client_id']
if not helpers.is_valid_uuid(client_id): if not helpers.is_valid_uuid(client_id):
print(request.data)
abort(400) abort(400)
name = request.json['name'] name = request.json['name']
song_id = request.json['id'] song_id = request.json['id']
@ -203,7 +199,6 @@ def get_stats():
# Return data from long_term_stats as csv # Return data from long_term_stats as csv
def get_stats_csv(): def get_stats_csv():
db_result = database.get_long_term_stats() db_result = database.get_long_term_stats()
print(db_result)
csv = "Id,Playbacks\n" csv = "Id,Playbacks\n"
for row in db_result: for row in db_result:
csv += str(row[0]) + "," + str(row[1]) + "\n" csv += str(row[0]) + "," + str(row[1]) + "\n"
@ -258,14 +253,11 @@ def delete_entry_admin(entry_id):
@nocache @nocache
def delete_entry_user(entry_id): def delete_entry_user(entry_id):
if not request.json: if not request.json:
print(request.data)
abort(400) abort(400)
client_id = request.json['client_id'] client_id = request.json['client_id']
if not helpers.is_valid_uuid(client_id): if not helpers.is_valid_uuid(client_id):
print(request.data)
abort(400) abort(400)
if database.get_raw_entry(entry_id)[3] != client_id: # type: ignore if database.get_raw_entry(entry_id)[3] != client_id: # type: ignore
print(request.data)
abort(403) abort(403)
if database.delete_entry(entry_id): if database.delete_entry(entry_id):
return Response('{"status": "OK"}', mimetype='text/json') return Response('{"status": "OK"}', mimetype='text/json')
@ -278,7 +270,6 @@ def delete_entry_user(entry_id):
@basic_auth.required @basic_auth.required
def delete_entries(): def delete_entries():
if not request.json: if not request.json:
print(request.data)
abort(400) abort(400)
return return
updates = database.delete_entries(request.json) updates = database.delete_entries(request.json)

View File

@ -298,8 +298,7 @@ def transfer_playbacks():
ON DUPLICATE KEY ON DUPLICATE KEY
UPDATE Playbacks = lts.Playbacks + VALUES(Playbacks); UPDATE Playbacks = lts.Playbacks + VALUES(Playbacks);
""") """)
result = conn.execute(stmt) conn.execute(stmt)
print(result)
conn.commit() conn.commit()
return True return True

View File

@ -1,6 +1,6 @@
autopep8==2.0.4 autopep8==2.0.4
beautifulsoup4==4.12.3 beautifulsoup4==4.12.3
blinker==1.7.0 blinker==1.8.2
bs4==0.0.2 bs4==0.0.2
certifi==2024.2.2 certifi==2024.2.2
charset-normalizer==3.3.2 charset-normalizer==3.3.2
@ -33,8 +33,8 @@ soupsieve==2.5
SQLAlchemy==2.0.27 SQLAlchemy==2.0.27
toml==0.10.2 toml==0.10.2
tomli==2.0.1 tomli==2.0.1
tomlkit==0.12.3 tomlkit==0.13.2
typing_extensions==4.9.0 typing_extensions==4.9.0
tzdata==2024.1 tzdata==2024.2
urllib3==2.2.0 urllib3==2.2.0
Werkzeug==3.0.1 Werkzeug==3.0.1

View File

@ -63,9 +63,14 @@ body {
width: 100%; width: 100%;
} }
.table {
color: var(--text-color);
}
table td { table td {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
color: var(--text-color);
} }
table.entries tbody tr[data-index="0"] { table.entries tbody tr[data-index="0"] {
@ -234,5 +239,8 @@ pre {
/* Toasts */ /* Toasts */
--toast-background-color: #232323; --toast-background-color: #232323;
--toast-text-color: #f5f5f5; --toast-text-color: #f5f5f5;
/* Tables */
--table-border-color: #232323;
} }
} }

View File

@ -86,7 +86,7 @@
{% endif %} {% endif %}
<a href="https://github.com/PhoenixTwoFive/karaoqueue" class="ml-1 mr-1"><i <a href="https://github.com/PhoenixTwoFive/karaoqueue" class="ml-1 mr-1"><i
class="fab fa-github mr-1"></i><span>Github</span></a> class="fab fa-github mr-1"></i><span>Github</span></a>
<span class="text-muted"> {{karaoqueue_version}} -&nbsp;2019-23 - <span id="myName">Phillip <span class="text-muted"> {{karaoqueue_version}} -&nbsp;2019-24 - <span id="myName">Phillip
Kühne</span></span> Kühne</span></span>
</div> </div>
</footer> </footer>