+ },
+ {
+ xtype: 'box',
+ autoEl: { tag: 'hr' },
+ },
+ {
+ xtype: 'container',
+ layout: 'hbox',
+ items: [
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Saved User Name') + ':',
+ labelWidth: 150,
+ stateId: 'login-username',
+ reference: 'savedUserName',
+ flex: 1,
+ value: '',
+ },
+ {
+ xtype: 'button',
+ cls: 'x-btn-default-toolbar-small proxmox-inline-button',
+ text: gettext('Reset'),
+ name: 'clear-username',
+ },
+ ],
+ },
+ {
+ xtype: 'box',
+ autoEl: { tag: 'hr' },
+ },
+ {
+ xtype: 'container',
+ layout: 'hbox',
+ items: [
+ {
+ xtype: 'displayfield',
+ fieldLabel: gettext('Layout') + ':',
+ flex: 1,
+ },
+ {
+ xtype: 'button',
+ cls: 'x-btn-default-toolbar-small proxmox-inline-button',
+ text: gettext('Reset'),
+ tooltip: gettext('Reset all layout changes (for example, column widths)'),
+ name: 'reset',
+ },
+ ],
+ },
+ {
+ xtype: 'box',
+ autoEl: { tag: 'hr' },
+ },
+ {
+ xtype: 'proxmoxKVComboBox',
+ fieldLabel: gettext('Summary columns') + ':',
+ labelWidth: 150,
+ stateId: 'summarycolumns',
+ reference: 'summarycolumns',
+ comboItems: [
+ ['auto', 'auto'],
+ ['1', '1'],
+ ['2', '2'],
+ ['3', '3'],
+ ],
+ },
+ {
+ xtype: 'proxmoxKVComboBox',
+ fieldLabel: gettext('Guest Notes') + ':',
+ labelWidth: 150,
+ stateId: 'guest-notes-collapse',
+ reference: 'guestNotesCollapse',
+ comboItems: [
+ ['never', 'Show by default'],
+ ['always', 'Collapse by default'],
+ ['auto', 'auto (Collapse if empty)'],
+ ],
+ },
+ ],
+ },
+ {
+ xtype: 'container',
+ layout: 'vbox',
+ flex: 1,
+ margin: '5',
+ defaults: {
+ width: '100%',
+ // right margin ensures that the right border of the fieldsets
+ // is shown
+ margin: '0 2 10 0',
+ },
+ items: [
+ {
+ xtype: 'fieldset',
+ itemId: 'xtermjs',
+ title: gettext('xterm.js Settings'),
+ items: [{
+ xtype: 'form',
+ reference: 'xtermform',
+ border: false,
+ layout: {
+ type: 'vbox',
+ algin: 'left',
+ },
+ defaults: {
+ width: '100%',
+ margin: '0 0 10 0',
+ },
+ items: [
+ {
+ xtype: 'textfield',
+ name: 'fontFamily',
+ reference: 'fontFamily',
+ emptyText: Proxmox.Utils.defaultText,
+ fieldLabel: gettext('Font-Family'),
+ },
+ {
+ xtype: 'proxmoxintegerfield',
+ emptyText: Proxmox.Utils.defaultText,
+ name: 'fontSize',
+ reference: 'fontSize',
+ minValue: 1,
+ fieldLabel: gettext('Font-Size'),
+ },
+ {
+ xtype: 'numberfield',
+ name: 'letterSpacing',
+ reference: 'letterSpacing',
+ emptyText: Proxmox.Utils.defaultText,
+ fieldLabel: gettext('Letter Spacing'),
+ },
+ {
+ xtype: 'numberfield',
+ name: 'lineHeight',
+ minValue: 0.1,
+ reference: 'lineHeight',
+ emptyText: Proxmox.Utils.defaultText,
+ fieldLabel: gettext('Line Height'),
+ },
+ {
+ xtype: 'container',
+ layout: {
+ type: 'hbox',
+ pack: 'end',
+ },
+ defaults: {
+ margin: '0 0 0 5',
+ },
+ items: [
+ {
+ xtype: 'button',
+ reference: 'xtermreset',
+ disabled: true,
+ text: gettext('Reset'),
+ },
+ {
+ xtype: 'button',
+ reference: 'xtermsave',
+ disabled: true,
+ text: gettext('Save'),
+ },
+ ],
+ },
+ ],
+ }],
+ }, {
+ xtype: 'fieldset',
+ title: gettext('noVNC Settings'),
+ items: [
+ {
+ xtype: 'radiogroup',
+ fieldLabel: gettext('Scaling mode'),
+ reference: 'noVNCScalingGroup',
+ height: '15px', // renders faster with value assigned
+ layout: {
+ type: 'hbox',
+ },
+ items: [
+ {
+ xtype: 'radiofield',
+ name: 'noVNCScalingField',
+ inputValue: 'auto',
+ boxLabel: 'Auto',
+ },
+ {
+ xtype: 'radiofield',
+ name: 'noVNCScalingField',
+ inputValue: 'scale',
+ boxLabel: 'Local Scaling',
+ margin: '0 0 0 10',
+ }, {
+ xtype: 'radiofield',
+ name: 'noVNCScalingField',
+ inputValue: 'off',
+ boxLabel: 'Off',
+ margin: '0 0 0 10',
+ },
+ ],
+ listeners: {
+ change: function(el, { noVNCScalingField }) {
+ let provider = Ext.state.Manager.getProvider();
+ if (noVNCScalingField === 'auto') {
+ provider.clear('novnc-scaling');
+ } else {
+ provider.set('novnc-scaling', noVNCScalingField);
+ }
+ },
+ },
+ },
+ ],
+ },
+ ],