1
0
Fork 0

[react] fix: Respect user account units & header fixes

This fixes #310 by ensuring the user units are respected.
It also includes some tweaks for the header menu in the editor

- Better default/non-default styling for icons
- Fix alignment of various menus within the ribbon
This commit is contained in:
joostdecock 2025-05-01 17:36:40 +02:00 committed by Joost De Cock
parent 02e5ed25da
commit b6cb59e94c
4 changed files with 40 additions and 22 deletions

View file

@ -67,7 +67,12 @@ const CoreDocsLink = ({ item }) => (
</a>
)
export function menuCoreSettingsStructure({ units = 'metric', sabool = false, parts = [] }) {
export function menuCoreSettingsStructure({
units = 'metric',
sabool = false,
parts = [],
accountUnits = 'metric',
}) {
return {
sabool: {
dense: true,
@ -118,7 +123,7 @@ export function menuCoreSettingsStructure({ units = 'metric', sabool = false, pa
),
ux: config.uxLevels.core.units,
list: ['metric', 'imperial'],
dflt: 'metric',
dflt: accountUnits,
choiceTitles: {
metric: 'Metric Units (cm)',
imperial: 'Imperial Units (inch)',