Skip to content

Commit

Permalink
Add SRO partial Relic adder/editor UI + misc (#1401)
Browse files Browse the repository at this point in the history
* Fix relic substat rounding

* Add CustomNumberInput to common lib

* Add SRO data managers exports

* Add SRO relic adder UI

* Resolve comments

* Resolve comments for real

* More sorting

* Update relic editor to show main stat val

* Update `DebugCalculator` computation (#1409)

* Tidy tsconfig and add object-overrides global type (#1407)

* Remove gi-frontend and update pipelines (#1411)

* Nuke gi-frontend

* Fix up pipelines

* Update template

* Update SRO context usage/UI issues, add useLightCone hook (#1406)

* Fix minor bugs and refactor context usage

* Add UseLightCone hook

* Unexport databasecontext

* Add remove trigger

* Add LocationAutocomplete for SRO (#1410)

* Add translation

* Fix translation

* Add LocationAutocomplete

* Fix option generation

* Update context usage

* Add debug calc for sr-formula (#1408)

* Add debug calc

* Fix lint

* Fix lint

* Fix lint

* Update debug to match gi-formula

* Add toDebug function

* update silly wisher assets to 0.33 (#1396)

* update translation table

* fix locale ordering

* update silly wisher splash art

* update silly wisher portraits

* update executor script

* update .envrc

* update the documentation

* add yaml to dev dependencies

* process i2languages in javascript executor

* add more detail to readme

* add VERSION file

* update readme

* resize splash arts

* resize portraits

* Resolve comments

---------

Co-authored-by: Van Nguyen <[email protected]>

* Add location autocomplete to relic editor

---------

Co-authored-by: lantua <[email protected]>
Co-authored-by: Van Nguyen <[email protected]>
Co-authored-by: Sean Haugh <[email protected]>
  • Loading branch information
4 people authored Jan 4, 2024
1 parent 1de3d4e commit 5ae9927
Show file tree
Hide file tree
Showing 14 changed files with 863 additions and 7 deletions.
9 changes: 9 additions & 0 deletions apps/frontend/src/app/Components/CustomNumberInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export type CustomNumberInputProps = Omit<InputProps, 'onChange'> & {
disableNegative?: boolean
}

/**
* @deprecated use `StyledInputBase` in `@genshin-optimizer/ui-common`
*/
export const StyledInputBase = styled(InputBase)(
({ theme, color = 'primary' }) => ({
backgroundColor: theme.palette[color].main,
Expand Down Expand Up @@ -37,6 +40,9 @@ const Wrapper = styled(Button)(({ theme }) => ({
}))

// wrap the Input with this when using the input in a buttongroup
/**
* @deprecated use `CustomNumberInputButtonGroupWrapper` in `@genshin-optimizer/ui-common`
*/
export function CustomNumberInputButtonGroupWrapper({
children,
disableRipple,
Expand All @@ -51,6 +57,9 @@ export function CustomNumberInputButtonGroupWrapper({
)
}

/**
* @deprecated use `CustomNumberInput` in `@genshin-optimizer/ui-common`
*/
export default function CustomNumberInput({
value = 0,
onChange,
Expand Down
7 changes: 6 additions & 1 deletion apps/sr-frontend/src/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { CharacterProvider, DatabaseProvider } from '@genshin-optimizer/sr-ui'
import {
CharacterProvider,
DatabaseProvider,
RelicEditor,
} from '@genshin-optimizer/sr-ui'
import {
CssBaseline,
Stack,
Expand All @@ -21,6 +25,7 @@ export default function App() {
<Stack gap={1} pt={1}>
<CharacterSelector />
<Character />
<RelicEditor />
<Database />
</Stack>
</CharacterProvider>
Expand Down
2 changes: 1 addition & 1 deletion libs/sr-db/src/Database/DataManagers/RelicData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ function parseSubstats(
return defSub()
if (key) {
value = key.endsWith('_')
? Math.round(value * 10) / 10
? Math.round(value * 1000) / 1000
: Math.round(value)
const { low, high } = getSubstatRange(rarity, key)
value = clamp(value, allowZeroSub ? 0 : low, high)
Expand Down
6 changes: 6 additions & 0 deletions libs/sr-db/src/Database/DataManagers/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export * from './BuildResultData'
export * from './BuildSettingData'
export * from './CharMetaData'
export * from './CharacterData'
export * from './LightConeData'
export * from './RelicData'
1 change: 1 addition & 0 deletions libs/sr-db/src/Database/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
export * from './DataManagers'
export * from './Database'
Loading

0 comments on commit 5ae9927

Please sign in to comment.