Add options for the cards #93

Merged
sb10q merged 42 commits from esavkin/web2019:85-variants into master 2023-11-28 15:32:34 +08:00
4 changed files with 56 additions and 59 deletions
Showing only changes of commit 894c1d2e14 - Show all commits

7
package-lock.json generated
View File

@ -7,9 +7,6 @@
"": {
"name": "m-labs-zola",
"version": "1.0.0",
"dependencies": {
"json-logic-js": "^2.0.2"
},
"devDependencies": {
"@babel/cli": "^7.22.6",
"@babel/core": "^7.22.8",
@ -20,6 +17,7 @@
"babel-preset-minify": "^0.5.2",
"bootstrap": "^5.3.0",
"jquery": "^3.7.0",
"json-logic-js": "^2.0.2",
"prop-types": "^15.8.1",
"react": "^18.2.0",
"react-beautiful-dnd": "^13.1.1",
@ -3661,7 +3659,8 @@
"node_modules/json-logic-js": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/json-logic-js/-/json-logic-js-2.0.2.tgz",
"integrity": "sha512-ZBtBdMJieqQcH7IX/LaBsr5pX+Y5JIW+EhejtM3Ffg2jdN9Iwf+Ht6TbHnvAZ/YtwyuhPaCBlnvzrwVeWdvGDQ=="
"integrity": "sha512-ZBtBdMJieqQcH7IX/LaBsr5pX+Y5JIW+EhejtM3Ffg2jdN9Iwf+Ht6TbHnvAZ/YtwyuhPaCBlnvzrwVeWdvGDQ==",
"dev": true
},
"node_modules/json-parse-even-better-errors": {
"version": "2.3.1",

View File

@ -1,47 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
id="Layer_1"
style="enable-background:new 0 0 48 48;"
version="1.1"
viewBox="0 0 48 48"
xml:space="preserve"
sodipodi:docname="icon-customize.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><defs
id="defs13" /><sodipodi:namedview
id="namedview11"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="16.6875"
inkscape:cx="19.715356"
inkscape:cy="28.853933"
inkscape:window-width="1920"
inkscape:window-height="1011"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer3" /><g
inkscape:groupmode="layer"
id="layer3"
inkscape:label="layer1"><g
id="g8"
inkscape:label="g8"
style="enable-background:new 0 0 48 48;fill:#715ec7;fill-opacity:1"><path
d="M 36.9,6 C 36.5,4.3 34.9,3 33,3 31.1,3 29.6,4.3 29.1,6 H 2 v 2 h 27.1 c 0.4,1.7 2,3 3.9,3 1.9,0 3.4,-1.3 3.9,-3 H 46 V 6 Z M 33,9 c -1.1,0 -2,-0.9 -2,-2 0,-1.1 0.9,-2 2,-2 1.1,0 2,0.9 2,2 0,1.1 -0.9,2 -2,2 z"
id="path2"
style="fill:#715ec7;fill-opacity:1" /><path
d="m 33,37 c -1.9,0 -3.4,1.3 -3.9,3 H 2 v 2 h 27.1 c 0.4,1.7 2,3 3.9,3 1.9,0 3.4,-1.3 3.9,-3 H 46 v -2 h -9.1 c -0.5,-1.7 -2,-3 -3.9,-3 z m 0,6 c -1.1,0 -2,-0.9 -2,-2 0,-1.1 0.9,-2 2,-2 1.1,0 2,0.9 2,2 0,1.1 -0.9,2 -2,2 z"
id="path4"
style="fill:#715ec7;fill-opacity:1" /><path
d="m 15,20 c -1.9,0 -3.4,1.3 -3.9,3 H 2 v 2 h 9.1 c 0.4,1.7 2,3 3.9,3 1.9,0 3.4,-1.3 3.9,-3 H 46 V 23 H 18.9 c -0.5,-1.7 -2,-3 -3.9,-3 z m 0,6 c -1.1,0 -2,-0.9 -2,-2 0,-1.1 0.9,-2 2,-2 1.1,0 2,0.9 2,2 0,1.1 -0.9,2 -2,2 z"
id="path6"
style="display:inline;fill:#715ec7;fill-opacity:1" /></g></g></svg>
<svg enable-background="new 0 0 48 48" version="1.1" viewBox="0 0 48 48" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g enable-background="new 0 0 48 48" fill="#715ec7"><path d="m36.9 6c-0.4-1.7-2-3-3.9-3s-3.4 1.3-3.9 3h-27.1v2h27.1c0.4 1.7 2 3 3.9 3s3.4-1.3 3.9-3h9.1v-2zm-3.9 3c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"/><path d="m33 37c-1.9 0-3.4 1.3-3.9 3h-27.1v2h27.1c0.4 1.7 2 3 3.9 3s3.4-1.3 3.9-3h9.1v-2h-9.1c-0.5-1.7-2-3-3.9-3zm0 6c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"/><path d="m15 20c-1.9 0-3.4 1.3-3.9 3h-9.1v2h9.1c0.4 1.7 2 3 3.9 3s3.4-1.3 3.9-3h27.1v-2h-27.1c-0.5-1.7-2-3-3.9-3zm0 6c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z"/></g></svg>

After

Width:  |  Height:  |  Size: 689 B

View File

@ -318,6 +318,7 @@ export function CustomizeData({id, data}) {
return (
<div>
<img className="alert-info" src={show ? "/images/shop/icon-close.svg" : "/images/shop/icon-customize.svg"}
style={{'marginLeft': '10px'}}
onClick={handleClick}/>
<div style={{'display': show ? 'flex' : 'none', 'top': position.y - 170, 'left': position.x - 66}}
className="overlayVariant card border rounded">

View File

@ -83,8 +83,7 @@ const shop_data = {
],
null
]
},
null
}
],
rules: {
maxSlot: {
@ -166,8 +165,7 @@ const shop_data = {
],
null
]
},
null
}
],
rules: {
maxSlot: {
@ -285,8 +283,8 @@ const shop_data = {
slotOccupied: 1,
clockOccupied: 0,
options: [
{type: "Switch", args: {title: "Output upper bank", outvar: "upper_bank"}},
{type: "Switch", args: {title: "Output lower bank", outvar: "lower_bank", fallback: true}}
{type: "Switch", args: {title: "Output first group", outvar: "out_first_group"}},
{type: "Switch", args: {title: "Output second group", outvar: "out_second_group", fallback: true}}
],
rules: {
resources: {
@ -310,8 +308,8 @@ const shop_data = {
datasheet_file: '/docs/sinara-datasheets/2118-2128.pdf',
datasheet_name: '2118/2128 BNC/SMA-TTL datasheet',
options: [
{type: "Switch", args: {title: "Output upper bank", outvar: "upper_bank"}},
{type: "Switch", args: {title: "Output lower bank", outvar: "lower_bank", fallback: true}}
{type: "Switch", args: {title: "Output first group", outvar: "out_first_group"}},
{type: "Switch", args: {title: "Output second group", outvar: "out_second_group", fallback: true}}
],
size: 'small',
type: null,
@ -346,6 +344,12 @@ const shop_data = {
],
datasheet_file: '/docs/sinara-datasheets/2238.pdf',
datasheet_name: '2238 MCX-TTL datasheet',
options: [
{type: "Switch", args: {title: "Output first group", outvar: "out_first_group"}},
{type: "Switch", args: {title: "Output second group", outvar: "out_second_group", fallback: true}},
{type: "Switch", args: {title: "Output third group", outvar: "out_third_group", fallback: true}},
{type: "Switch", args: {title: "Output fourth group", outvar: "out_fourth_group", fallback: true}}
],
size: 'small',
type: null,
hp: 4,
@ -416,6 +420,30 @@ const shop_data = {
],
datasheet_file: '/docs/sinara-datasheets/4410-4412.pdf',
datasheet_name: '4410/4412 Urukul datasheet',
options: [
{type: "Switch", args: {title: "AD9912 instead of AD9910", outvar: "ad9912"}},
{
"if": [
{"var": "ad9912"},
[
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}}},
],
[
{type: "Switch", args: {title: "Synchronization", outvar: "sync"}},
{
"if": [
{"var": "sync"},
null,
[
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}}},
{type: "Switch", args: {title: "SUServo mode", outvar: "suservo"}}
]
]
}
]
]
}
],
size: 'small',
type: 'urukul',
hp: 4,
@ -461,6 +489,9 @@ const shop_data = {
'Internal MMCX clock from Kasli/Clocker and external SMA.',
'The upconverter is optional, if you would like the baseband version please leave us a note.'
],
options: [
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}}}
],
size: 'small',
type: 'urukul',
hp: 4,
@ -714,6 +745,9 @@ const shop_data = {
'Full-scale input ranges between +-10mV and +-10V.',
'Supports SU-Servo laser intensity stabilization servo in conjunction with Urukul.'
],
options: [
{type: "Switch", args: {title: "SUServo mode", outvar: "suservo"}}
],
size: 'big',
type: 'novo',
hp: 8,
@ -788,6 +822,9 @@ const shop_data = {
'Frequency up to 1GHz.',
'Low jitter <100fs RMS.'
],
options: [
{type: "Switch", args: {title: "Ext CLK", outvar: "ext_clk"}}
],
size: 'small',
type: 'clocker',
hp: 4,
@ -850,6 +887,9 @@ const shop_data = {
'Lower jitter and phase noise.',
'Large frequency changes take several milliseconds.',
],
options: [
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}}}
],
size: 'small',
type: null,
hp: 4,
@ -879,6 +919,9 @@ const shop_data = {
'Additional 4 channels up to 12 GHz.',
'Each Almazny channel outputs twice the frequency of its corresponding Mirny channel.',
],
options: [
{type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}}}
],
size: 'big',
type: null,
hp: 8,