Skip to content

Commit

Permalink
#5 update frontend edit dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanwerfling committed Feb 4, 2025
1 parent 0c67066 commit e2f9775
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
16 changes: 14 additions & 2 deletions frontend/src/inc/Pages/DynDnsClient/DynDnsClientEditModal.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import {DomainData, DynDnsClientDomain, GatewayIdentifierEntry, ProviderEntry} from 'flyingfish_schemas';
import {
FormGroup, FormRow, InputBottemBorderOnly2, InputType, Multiple, SelectBottemBorderOnly2, Switch, Element,
ModalDialog, ModalDialogType, LangText
ModalDialog, ModalDialogType, LangText, TooltipInfo, Tooltip
} from 'bambooo';
import {Lang} from '../../Lang.js';

/**
* DynDnsClientEditModal
Expand Down Expand Up @@ -87,11 +88,19 @@ export class DynDnsClientEditModal extends ModalDialog {
this._multipleMainDomain.setLimit(1);

const groupGatewayIdentifier = new FormGroup(bodyCard, 'Gateway network assignment');

// eslint-disable-next-line no-new
new TooltipInfo(groupGatewayIdentifier.getLabelElement(), Lang.i().l('dyndns_client_edit_gateway'));

this._selectGatewayIdentifier = new SelectBottemBorderOnly2(groupGatewayIdentifier);

const rowOptions = new FormRow(bodyCard);

const groupUpdateDomains = new FormGroup(rowOptions.createCol(6), 'Enable update Domains');

// eslint-disable-next-line no-new
new TooltipInfo(groupUpdateDomains.getLabelElement(), Lang.i().l('dyndns_client_edit_updatedomains'));

this._switchUpdateDomains = new Switch(groupUpdateDomains, 'updateDomains');

const groupDomains = new FormGroup(bodyCard, 'Update Domains');
Expand All @@ -110,6 +119,9 @@ export class DynDnsClientEditModal extends ModalDialog {

this.addButtonClose(new LangText('Close'));
this.addButtonSave(new LangText('Save changes'), true);

// init tooltips
Tooltip.init();
}

/**
Expand All @@ -121,7 +133,7 @@ export class DynDnsClientEditModal extends ModalDialog {

this._selectProvider.addValue({
key: 'none',
value: 'Please select your provider'
value: 'without'
});

for (const provider of providers) {
Expand Down
5 changes: 4 additions & 1 deletion frontend/src/langs/Lang_EN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ export class Lang_EN implements LangDefine {
route_stream_loadbalancealg: 'The load balancing algorithm is only used when there is more than one upstream.<br><br><b>Least connection</b>: This algorithm distributes the client\'s request to servers with the least active connections at a particular time. This will ensure that no one server is overworked while other servers have fewer active connections.<br><br><b>IP hash</b>: This algorithm hashes the IP address of the client sending the request with a hashing function and then sends the request to one of the servers for processing. Subsequent requests from the clients IP address are always sent to the same server.',

route_http_http2: 'The http2 protocol can only be used on an SSL connection. Enable SSL to unlock this setting.',
route_http_location_headerhostport: 'Only use by different port on router, your port != 80,443'
route_http_location_headerhostport: 'Only use by different port on router, your port != 80,443',

dyndns_client_edit_gateway: 'The client is bound to the gateway and only runs when it is in the gateway. If nothing is specified, the client will always be executed.',
dyndns_client_edit_updatedomains: 'The specified domains are updated internally with the new IP in the record.'
};

/**
Expand Down

0 comments on commit e2f9775

Please sign in to comment.