-
-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #405 from Yooooomi/release/1.11.0
Release/1.11.0
- Loading branch information
Showing
44 changed files
with
2,325 additions
and
1,963 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 1 addition & 7 deletions
8
apps/client/src/components/ImplementedCharts/BestArtistsBar/BestArtistsBar.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
apps/client/src/scenes/Error/ApiEndpointSetToFronted/ApiEndpointSetToFrontend.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import Text from "../../../components/Text"; | ||
import s from "../index.module.css"; | ||
import { getApiEndpoint } from "../../../services/tools"; | ||
|
||
export default function ApiEndpointSetToFrontend() { | ||
return ( | ||
<div className={s.root}> | ||
<Text element="h1">API Endpoint is not set up correctly</Text> | ||
<Text className={s.explain}> | ||
This request should have reached the backend, but was handled by the | ||
frontend instead. | ||
<p /> | ||
This is usually because your <code>API_ENDPOINT</code> | ||
variable points to the frontend instead of the backend. Please | ||
double-check your configuration. | ||
<p /> | ||
The current configuration is: <br /> | ||
<code>API_ENDPOINT={getApiEndpoint()}</code> | ||
</Text> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { default } from "./ApiEndpointSetToFrontend"; |
4 changes: 2 additions & 2 deletions
4
...rationsDisabled/RegistrationsDisabled.tsx → ...rationsDisabled/RegistrationsDisabled.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
apps/client/src/scenes/Settings/StatMeasurement/StatMeasurement.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { Select, MenuItem } from "@mui/material"; | ||
import { useCallback } from "react"; | ||
import { useSelector } from "react-redux"; | ||
import Text from "../../../components/Text"; | ||
import TitleCard from "../../../components/TitleCard"; | ||
import { changeStatUnit } from "../../../services/redux/modules/settings/thunk"; | ||
import { selectStatMeasurement } from "../../../services/redux/modules/user/selector"; | ||
import { useAppDispatch } from "../../../services/redux/tools"; | ||
import SettingLine from "../SettingLine"; | ||
import s from "./index.module.css"; | ||
|
||
const units = [ | ||
{ name: "Count", value: "number" }, | ||
{ name: "Duration", value: "duration" }, | ||
]; | ||
|
||
export function StatMeasurement() { | ||
const dispatch = useAppDispatch(); | ||
const statMeasurement = useSelector(selectStatMeasurement); | ||
|
||
const handleChangeStatMeasurement = useCallback( | ||
(newStatUnit: string | null | undefined) => { | ||
if (newStatUnit !== "number" && newStatUnit !== "duration") { | ||
return; | ||
} | ||
dispatch(changeStatUnit(newStatUnit ?? "number")).catch(console.error); | ||
}, | ||
[dispatch], | ||
); | ||
|
||
return ( | ||
<TitleCard title="Stat measurement used"> | ||
<Text element="span" className={s.marginbottom}> | ||
Measurement used to compute most listened elements. | ||
</Text> | ||
<SettingLine | ||
left="Stat measurement" | ||
right={ | ||
<Select | ||
variant="standard" | ||
value={statMeasurement} | ||
onChange={ev => handleChangeStatMeasurement(ev.target.value)}> | ||
{units.map(unit => ( | ||
<MenuItem key={unit.value} value={unit.value}> | ||
{unit.name} | ||
</MenuItem> | ||
))} | ||
</Select> | ||
} | ||
/> | ||
</TitleCard> | ||
); | ||
} |
4 changes: 4 additions & 0 deletions
4
apps/client/src/scenes/Settings/StatMeasurement/index.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.marginbottom { | ||
display: block; | ||
margin-bottom: 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./StatMeasurement"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.