+
+
+
+
link
+
+ ${
+ this.selectedItem
+ ? html`
+
+
+ ${this.selectedItem
+ .name}
+ ${this.selectedItem
+ .protocol +
+ '://' +
+ this.selectedItem.domain +
+ ':' +
+ this.selectedItem
+ .port}
+
+ `
+ : 'Please select an option'
+ }
+
+
expand_more
+
+
+ ${this.nodeConfig.knownNodes.map(
+ (n, index) => html`
+ -
+ this.handleSelection(e, n, index)}"
+ >
+
+
+ ${n.name}
+ ${n.protocol +
+ '://' +
+ n.domain +
+ ':' +
+ n.port}
+
+
+ {
+ e.stopPropagation();
+ const currentValues =
+ this.nodeConfig
+ .knownNodes[
+ index
+ ];
+ const dialog =
+ this.shadowRoot.querySelector(
+ '#addNodeDialog'
+ );
- .red {
- --mdc-theme-primary: red;
- }
+ // Set the value for mwc-textfield elements
+ dialog.querySelector(
+ '#nameInput'
+ ).value =
+ currentValues.name;
+ dialog.querySelector(
+ '#domainInput'
+ ).value =
+ currentValues.domain;
+ dialog.querySelector(
+ '#portInput'
+ ).value =
+ currentValues.port;
- .buttonred {
- color: #f44336;
- }
+ // Set the selected value for mwc-select
+ const protocolList =
+ dialog.querySelector(
+ '#protocolList'
+ );
+ const desiredProtocol =
+ currentValues.protocol;
- .buttongreen {
- color: #03c851;
- }
+ protocolList.value =
+ desiredProtocol;
- .floatleft {
- float: left;
- }
+ this.isBeingEdited = true;
+ this.isBeingEditedIndex =
+ index;
+ this.shadowRoot
+ .querySelector(
+ '#addNodeDialog'
+ )
+ .show();
+ }}"
+ >edit
+
+ this.removeNode(
+ e,
+ index
+ )}"
+ >remove
+
+
+
+ `
+ )}
+
+
- .floatright {
- float: right;
- }
- `
- }
+
- constructor() {
- super()
- this.nodeConfig = {}
- this.nodeIndex = localStorage.getItem('mySelectedNode')
- this.theme = localStorage.getItem('qortalTheme') ? localStorage.getItem('qortalTheme') : 'light'
- }
+
+ ${translate('settings.nodehint')}
+
+
+ this.shadowRoot.querySelector('#addNodeDialog').show()}"
+ >add${translate('settings.addcustomnode')}
+
+
+ this.removeList()}"
+ >remove${translate('settings.deletecustomnode')}
+
+
+
+ ${this.renderExportNodesListButton()}
+
+
+ ${this.renderImportNodesListButton()}
+
+
+
+