2025-01-25 17:56:15 +01:00
import React from 'react'
2025-01-19 11:01:34 +01:00
import { defaultConfig } from '../config/index.mjs'
import {
MenuIcon ,
KioskIcon ,
RotateIcon ,
RocketIcon ,
UxIcon ,
} from '@freesewing/react/components/Icon'
export function menuUiPreferencesStructure ( ) {
const uiUx = defaultConfig . uxLevels . ui
2024-09-15 15:29:30 +02:00
const uiPreferences = {
ux : {
2025-01-25 17:56:15 +01:00
dense : true ,
title : 'User Experience' ,
about : 'Controls the user experience, from keep it simple, to give me all the powers' ,
2024-09-15 15:29:30 +02:00
ux : uiUx . ux ,
emoji : '🖥️' ,
list : [ 1 , 2 , 3 , 4 , 5 ] ,
2025-01-25 17:56:15 +01:00
choiceTitles : {
1 : 'Keep it as simple as possible' ,
2 : 'Keep it simple, but not too simple' ,
3 : 'Balance simplicity with power' ,
4 : 'Give me all powers, but keep me safe' ,
5 : 'Get out of my way' ,
} ,
_choiceDescriptions : {
1 : 'Hides all but the most crucial features.' ,
2 : 'Hides most of the advanced features.' ,
3 : 'Reveals the majority of advanced features, but not all of them.' ,
4 : 'Reveals all advanced features, keeps handrails and safety checks.' ,
5 : 'Reveals all advanced features, removes handrails and safety checks.' ,
} ,
2025-01-19 11:01:34 +01:00
icon : UxIcon ,
dflt : defaultConfig . defaultUx ,
2024-09-15 15:29:30 +02:00
} ,
2025-01-25 17:56:15 +01:00
/ *
2024-09-15 15:29:30 +02:00
aside : {
2025-01-25 17:56:15 +01:00
title : 'Aside Menu' ,
about : 'Whether or not to display the aside menu' ,
2024-09-15 15:29:30 +02:00
ux : uiUx . aside ,
list : [ 0 , 1 ] ,
choiceTitles : {
2025-01-25 17:56:15 +01:00
0 : 'Display the aside menu' ,
1 : 'Hide the aside menu' ,
2024-09-15 15:29:30 +02:00
} ,
2025-01-19 18:45:41 +01:00
choiceDescriptions : {
2025-01-25 17:56:15 +01:00
0 : 'Displays the Design Options, Core Settings, and UI Preferences menu on the side of the screen (not on mobile).' ,
1 : 'Uses the entire screen size for your pattern, providing access to the Design Options, Core Settings, and UI Preferences through the header navigation only.' ,
2025-01-19 18:45:41 +01:00
} ,
2024-09-15 15:29:30 +02:00
dflt : 1 ,
2025-01-19 11:01:34 +01:00
icon : MenuIcon ,
2024-09-15 15:29:30 +02:00
} ,
kiosk : {
2025-01-25 17:56:15 +01:00
title : 'Kiosk View' ,
about : 'Whether or not to hide the header and footer' ,
2024-09-15 15:29:30 +02:00
ux : uiUx . kiosk ,
list : [ 0 , 1 ] ,
choiceTitles : {
0 : 'pe:websiteMode' ,
1 : 'pe:kioskMode' ,
} ,
2025-01-19 18:45:41 +01:00
choiceDescriptions : {
0 : 'pe:noAside' ,
1 : 'pe:withAside' ,
} ,
2024-09-15 15:29:30 +02:00
dflt : 0 ,
2025-01-19 11:01:34 +01:00
icon : KioskIcon ,
2024-09-15 15:29:30 +02:00
} ,
2025-01-25 17:56:15 +01:00
* /
2024-09-15 15:29:30 +02:00
rotate : {
2025-01-25 17:56:15 +01:00
dense : true ,
title : 'Rotate Pattern' ,
about : 'Allows you to rotate your pattern 90 degrees, handy for tall patterns' ,
2024-09-15 15:29:30 +02:00
ux : uiUx . rotate ,
list : [ 0 , 1 ] ,
choiceTitles : {
2025-01-25 17:56:15 +01:00
0 : 'Do not rotate the pattern' ,
1 : 'Rotate the pattern 90 degrees' ,
2025-01-19 18:45:41 +01:00
} ,
2024-09-15 15:29:30 +02:00
dflt : 0 ,
2025-01-19 11:01:34 +01:00
icon : RotateIcon ,
2024-09-15 15:29:30 +02:00
} ,
renderer : {
2025-01-25 17:56:15 +01:00
dense : true ,
title : 'Pattern render engine' ,
about : 'Change the way the pattern is rendered on screen' ,
2024-09-15 15:29:30 +02:00
ux : uiUx . renderer ,
list : [ 'react' , 'svg' ] ,
choiceTitles : {
2025-01-25 17:56:15 +01:00
react : (
< span >
Render using < em > @ freesewing / react < / e m >
< / s p a n >
) ,
svg : (
< span >
Render using < em > @ freesewing / core < / e m >
< / s p a n >
) ,
2024-09-15 15:29:30 +02:00
} ,
2025-01-19 18:45:41 +01:00
choiceDescriptions : {
0 : 'pe:noAside' ,
1 : 'pe:withAside' ,
} ,
2024-09-15 15:29:30 +02:00
valueTitles : {
react : 'React' ,
2025-01-25 17:56:15 +01:00
svg : 'Core' ,
2024-09-15 15:29:30 +02:00
} ,
dflt : 'react' ,
2025-01-19 11:01:34 +01:00
icon : RocketIcon ,
2024-09-15 15:29:30 +02:00
} ,
}
return uiPreferences
}