Beispiel #1
0
def viewrecords(userid: UserID) -> Response:
    frontend = ReflecBeatFrontend(g.data, g.config, g.cache)
    info = frontend.get_latest_player_info([userid]).get(userid)
    if info is None:
        abort(404)
    versions = {version: name for (game, version, name) in frontend.all_games()}

    return render_react(
        '{}\'s Reflec Beat Records'.format(info['name']),
        'reflec/records.react.js',
        {
            'records': frontend.get_records(userid),
            'songs': frontend.get_all_songs(),
            'players': {},
            'versions': versions,
            'shownames': False,
            'showpersonalsort': True,
            'filterempty': True,
        },
        {
            'refresh': url_for('reflec_pages.listrecords', userid=userid),
            'player': url_for('reflec_pages.viewplayer', userid=-1),
            'individual_score': url_for('reflec_pages.viewtopscores', musicid=-1),
        },
    )
Beispiel #2
0
def listrecords(userid: UserID) -> Dict[str, Any]:
    frontend = ReflecBeatFrontend(g.data, g.config, g.cache)
    return {
        'records': frontend.get_records(userid),
        'players': {},
    }