Bug fixes

- Fix chart in Ai want U
- Mute music on song select with Q
- Do not scroll song select background when the tab is not active
- Fix very short inputs not being recognized
- Fix sound being muted when playing the same song again
- Fix multiplayer when audio latency is set
- Fix getting stuck when imported song cannot be restarted
- Fix 2P cursor when ura is selected by both players
- Add KeyboardEvent.key to browser tests
- Separate buttons like Shift+Left into two on the How to Play page
- Change focused button on the custom songs screen to the first one available
- Add favicon to the admin page
- Display the id on the admin new song page
This commit is contained in:
LoveEevee
2020-12-04 13:52:35 +03:00
parent bd8e2191dd
commit 13d6aaab78
20 changed files with 211 additions and 73 deletions

10
app.py
View File

@@ -191,10 +191,10 @@ def route_admin():
@app.route('/admin/songs')
@admin_required(level=50)
def route_admin_songs():
songs = db.songs.find({})
songs = sorted(list(db.songs.find({})), key=lambda x: x['id'])
categories = db.categories.find({})
user = db.users.find_one({'username': session['username']})
return render_template('admin_songs.html', songs=list(songs), admin=user, categories=list(categories))
return render_template('admin_songs.html', songs=songs, admin=user, categories=list(categories), config=get_config())
@app.route('/admin/songs/<int:id>')
@@ -210,7 +210,7 @@ def route_admin_songs_id(id):
user = db.users.find_one({'username': session['username']})
return render_template('admin_song_detail.html',
song=song, categories=categories, song_skins=song_skins, makers=makers, admin=user)
song=song, categories=categories, song_skins=song_skins, makers=makers, admin=user, config=get_config())
@app.route('/admin/songs/new')
@@ -219,8 +219,10 @@ def route_admin_songs_new():
categories = list(db.categories.find({}))
song_skins = list(db.song_skins.find({}))
makers = list(db.makers.find({}))
seq = db.seq.find_one({'name': 'songs'})
seq_new = seq['value'] + 1 if seq else 1
return render_template('admin_song_new.html', categories=categories, song_skins=song_skins, makers=makers)
return render_template('admin_song_new.html', categories=categories, song_skins=song_skins, makers=makers, config=get_config(), id=seq_new)
@app.route('/admin/songs/new', methods=['POST'])