Browse Source

Fix eslint regressions

pull/342/head
Christian7573 4 years ago
parent
commit
8b3c7d4113
  1. 2
      package.json
  2. 2
      src/assets/xterm_config/xterm_color_theme.js
  3. 4
      src/assets/xterm_config/xterm_defaults.js
  4. 2
      src/assets/xterm_config/xterm_general_options.js
  5. 6
      src/client/wetty/term/confiruragtion.ts
  6. 2
      src/client/wetty/term/confiruragtion/editor.ts

2
package.json

@ -142,7 +142,7 @@
"@types/socket.io-client": "^1.4.33",
"@types/winston": "^2.4.4",
"@types/yargs": "^15.0.5",
"@typescript-eslint/eslint-plugin": "^4.26",
"@typescript-eslint/eslint-plugin": "^2.5.0",
"@typescript-eslint/parser": "^4.3.0",
"all-contributors-cli": "^6.17.2",
"chai": "^4.2.0",

2
src/assets/xterm_config/xterm_color_theme.js

@ -8,7 +8,7 @@ const selectionColorOpacityOption = {
type: "number",
name: "Selection Color Opacity",
description: "Opacity of the selection highlight. A value between 1 (fully opaque) and 0 (fully transparent).",
path: ["wetty_void"],
path: ["wettyVoid"],
float: true,
min: 0,
max: 1,

4
src/assets/xterm_config/xterm_defaults.js

@ -1,7 +1,7 @@
const DEFAULT_BELL_SOUND = 'data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq';
window.loadOptions({
wetty_fit_terminal: true,
wetty_void: 0,
wettyFitTerminal: true,
wettyVoid: 0,
xterm: {
cols: 80,

2
src/assets/xterm_config/xterm_general_options.js

@ -30,7 +30,7 @@ window.inflateOptions([
type: "boolean",
name: "Fit Terminal",
description: "Automatically fits the terminal to the page, overriding terminal columns and rows.",
path: ["wetty_fit_terminal"],
path: ["wettyFitTerminal"],
},
{
type: "number",

6
src/client/wetty/term/confiruragtion.ts

@ -8,9 +8,9 @@ import { loadOptions } from './confiruragtion/load';
export function configureTerm(term: Term): void {
let options = loadOptions();
//Convert old options to new options
// Convert old options to new options
if (!("xterm" in options)) options = { xterm: options };
try { setOptions(term, options); } catch {}
try { setOptions(term, options); } catch { /* Do nothing */ };
const toggle = document.querySelector('#options .toggler');
const optionsElem = document.getElementById('options');
@ -42,5 +42,5 @@ export function configureTerm(term: Term): void {
}
export function shouldFitTerm(): boolean {
return (loadOptions() as any).wetty_fit_terminal ?? true;
return (loadOptions() as any).wettyFitTerminal ?? true;
}

2
src/client/wetty/term/confiruragtion/editor.ts

@ -6,7 +6,7 @@ export const onInput = (term: Term, updated: any) => {
const updatedConf = JSON.stringify(updated, null, 2);
if (localStorage.options === updatedConf) return;
setOptions(term, updated);
if (!updated.wetty_fit_terminal && updated.xterm.cols != null && updated.xterm.rows != null) term.resize(updated.xterm.cols, updated.xterm.rows);
if (!updated.wettyFitTerminal && updated.xterm.cols != null && updated.xterm.rows != null) term.resize(updated.xterm.cols, updated.xterm.rows);
term.resizeTerm();
editor.classList.remove('error');
localStorage.options = updatedConf;

Loading…
Cancel
Save