mirror of
https://github.com/zkldi/Tachi.git
synced 2026-10-04 12:58:11 +03:00
Add the option to change your score bucket
This commit is contained in:
@@ -10,6 +10,7 @@ import useQueryString from "components/util/useQueryString";
|
||||
import { UGPTSettingsContext } from "context/UGPTSettingsContext";
|
||||
import deepmerge from "deepmerge";
|
||||
import { useFormik } from "formik";
|
||||
import { TachiConfig } from "lib/config";
|
||||
import React, { useContext, useEffect, useState } from "react";
|
||||
import { Button, Form } from "react-bootstrap";
|
||||
import {
|
||||
@@ -83,6 +84,7 @@ function PreferencesForm({ reqUser, game, playtype }: Props) {
|
||||
preferredSessionAlg:
|
||||
settings!.preferences.preferredSessionAlg || gptConfig.defaultSessionRatingAlg,
|
||||
gameSpecific: settings!.preferences.gameSpecific,
|
||||
scoreBucket: settings!.preferences.scoreBucket ?? gptConfig.scoreBucket,
|
||||
},
|
||||
onSubmit: async values => {
|
||||
const rj = await APIFetchV1<PublicUserDocument>(
|
||||
@@ -157,6 +159,24 @@ function PreferencesForm({ reqUser, game, playtype }: Props) {
|
||||
used for things like leaderboards.
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
<Form.Group>
|
||||
<Form.Label>Preferred Score Info</Form.Label>
|
||||
<Form.Control
|
||||
as="select"
|
||||
id="scoreBucket"
|
||||
value={formik.values.scoreBucket}
|
||||
onChange={formik.handleChange}
|
||||
>
|
||||
<option value="grade">Score</option>
|
||||
<option value="lamp">Lamp</option>
|
||||
</Form.Control>
|
||||
<Form.Text className="text-muted">
|
||||
What should {TachiConfig.name} prefer to show you about scores?
|
||||
<br />
|
||||
Note: This will only affect defaults, such as what graph is shown in the folder
|
||||
breakdown. You can still view all the same stats!
|
||||
</Form.Text>
|
||||
</Form.Group>
|
||||
{game === "iidx" && (
|
||||
<Form.Group>
|
||||
<Form.Check
|
||||
|
||||
Reference in New Issue
Block a user