From 5559a04403987aaefb4c19d08a975913dd4b1606 Mon Sep 17 00:00:00 2001 From: Egor Savkin Date: Tue, 19 Sep 2023 11:35:22 +0800 Subject: [PATCH] Remove redundant notifications about connectors and AD9910 Signed-off-by: Egor Savkin --- static/js/shop.jsx | 9 --------- static/js/shop_data.js | 31 ++++--------------------------- 2 files changed, 4 insertions(+), 36 deletions(-) diff --git a/static/js/shop.jsx b/static/js/shop.jsx index bf60b5b..5a143d8 100644 --- a/static/js/shop.jsx +++ b/static/js/shop.jsx @@ -2243,15 +2243,6 @@ class Shop extends React.PureComponent { } - // check for number of recommended EEM connectors - ['novo', 'urukul', 'koster'].map(_type => { - if (itemsCloned.find(elem => elem.type === _type)) { - rules[this.state.items[_type].rules.connectors.type] = {...this.state.items[_type].rules.connectors}; - } - return _type; - }); - - if (itemsCloned.find(elem => elem.type === 'urukul')) { if (this.state.items['urukul'].rules.info) { rules[this.state.items['urukul'].rules.info.type] = {...this.state.items['urukul'].rules.info}; diff --git a/static/js/shop_data.js b/static/js/shop_data.js index 900a143..c14a4f9 100644 --- a/static/js/shop_data.js +++ b/static/js/shop_data.js @@ -555,7 +555,7 @@ const shop_data = { {type: "Switch", args: {title: "Use 1 EEM", outvar: "mono_eem", tip: "Use one EEM port setup. RF switch and synchronization will be unavailable."}}, { "if": [ - {"var": "ad9912"}, + {"or": [{"var": "ad9912"}, {"var": "mono_eem"}]}, [ {type: "SwitchLine", args: {title: "Ext CLK", outvar: "ext_clk", fallback: {text: "125 MHz", checked: false}}}, ], @@ -590,18 +590,6 @@ const shop_data = { slotOccupied: 2, clockOccupied: 1, rules: { - connectors: { - type: 'urukul', - icon: '/shop/icon-reminder.svg', - name: 'Urukul', - message: 'This configuration uses 2 EEM connectors as it is recommended. If you prefer to use 1 EEM connector, please inform us by leaving an additional note.', - }, - info: { - type: 'urukul-info', - icon: '/shop/icon-reminder.svg', - name: 'Urukul', - message: 'The default chip is AD9910, which supports more features. If you need the higher frequency resolution of the AD9912, leave us a note.', - }, resources: { type: 'urukul', icon: '/shop/icon-warning.svg', @@ -635,7 +623,7 @@ const shop_data = { nbrSlotMin: 0, nbrSlotMax: 0, nbrClockMax: 0, - slotOccupied: 2, + slotOccupied: 1, clockOccupied: 1, rules: { resources: { @@ -883,9 +871,10 @@ const shop_data = { 'Supports SU-Servo laser intensity stabilization servo in conjunction with Urukul.' ], options: [ + {type: "Switch", args: {title: "1 EEM mode", outvar: "mono_eem"}}, { "if": [ - {"var": "ext_data.has_dds"}, + {"and": [{"var": "ext_data.has_dds"}, {"!": {"var": "mono_eem"}}]}, {type: "Switch", args: {title: "SUServo mode", outvar: "suservo"}}, null ] @@ -900,12 +889,6 @@ const shop_data = { slotOccupied: 2, clockOccupied: 0, rules: { - connectors: { - type: 'novo', - icon: '/shop/icon-reminder.svg', - name: 'Sampler', - message: 'This configuration uses 2 EEM connectors as it is recommended. If you prefer to use 1 EEM connector, please inform us by leaving an additional note.', - }, resources: { type: 'novo', icon: '/shop/icon-warning.svg', @@ -940,12 +923,6 @@ const shop_data = { slotOccupied: 2, clockOccupied: 0, rules: { - connectors: { - type: 'koster', - icon: '/shop/icon-reminder.svg', - name: 'Grabber', - message: 'This configuration uses 2 EEM connectors. If you prefer to use 1 or 3 EEM connectors, please inform us by leaving an additional note.', - }, resources: { type: 'koster', icon: '/shop/icon-warning.svg',