[react] fix: Various fixes for the measurement view and editor (#233)
Various fixes for the measurement view and editor: - Translate measurements in the measurement set view and align the measurements table properly - Display a question mark next to the measurements that links to the corresponding docs page This fixes a part of #226 Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/233 Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org> Co-authored-by: Jonathan Haas <haasjona@gmail.com> Co-committed-by: Jonathan Haas <haasjona@gmail.com>
This commit is contained in:
parent
c5b0daf390
commit
36da79afb6
10 changed files with 49 additions and 19 deletions
|
@ -76,8 +76,9 @@ const t = (input) => {
|
|||
* @param {number} id - The ID of the measurements set to load
|
||||
* @param {bool} publicOnly - FIXME
|
||||
* @param {function} Link - An optional framework-specific Link component to use for client-side routing
|
||||
* @param {object} measurementHelpProvider - A function that returns a url or action to show help for a specific measurement
|
||||
*/
|
||||
export const Set = ({ id, publicOnly = false, Link = false }) => {
|
||||
export const Set = ({ id, publicOnly = false, Link = false, measurementHelpProvider = false }) => {
|
||||
if (!Link) Link = WebLink
|
||||
|
||||
// Hooks
|
||||
|
@ -459,7 +460,7 @@ export const Set = ({ id, publicOnly = false, Link = false }) => {
|
|||
title={<MeasurementValue {...{ m, val, imperial: !displayAsMetric }} />}
|
||||
key={m}
|
||||
>
|
||||
<span className="tw-font-medium">{m}</span>
|
||||
<span className="tw-font-medium">{measurementTranslations[m]}</span>
|
||||
</DisplayRow>
|
||||
) : null
|
||||
)}
|
||||
|
@ -491,6 +492,7 @@ export const Set = ({ id, publicOnly = false, Link = false }) => {
|
|||
current={mset.measies[m]}
|
||||
original={mset.measies[m]}
|
||||
update={updateMeasies}
|
||||
helpProvider={measurementHelpProvider}
|
||||
/>
|
||||
))}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue