From 5aa8b756cf82e6e6969490344de4252676088cf1 Mon Sep 17 00:00:00 2001 From: codeartisticninja Date: Wed, 11 Jul 2018 10:33:41 +0200 Subject: [PATCH 1/5] updating some stuff --- COMPILE.md | 2 +- README.md | 2 +- docs/README.md | 2 +- package-lock.json | 2 +- package.json | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/COMPILE.md b/COMPILE.md index 6bb5b24..3425eb8 100644 --- a/COMPILE.md +++ b/COMPILE.md @@ -6,7 +6,7 @@ Open terminal and type: $ cd path/to/this/folder/ $ npm install - $ npm start + $ npm run build-desktop Open your browser to http://localhost:8000/ diff --git a/README.md b/README.md index e33ed2d..1568e37 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ CyberTerminal A fantasy terminal for the [fantasy internet](https://fantasyinternet.github.io/). [![icon](./src/images/icon.gif) -💾Get the latest version](https://github.com/FantasyInternet/cyberterminal/releases) +💾Get the latest version](https://github.com/FantasyInternet/cyberterminal/releases/latest) Made by [codeartistic.ninja](http://the.codeartistic.ninja/) diff --git a/docs/README.md b/docs/README.md index 78270d2..1754f3c 100644 --- a/docs/README.md +++ b/docs/README.md @@ -5,7 +5,7 @@ CyberTerminal A fantasy terminal for the [fantasy internet](https://fantasyinternet.github.io/). [![icon](./src/images/icon.gif) -💾Get the latest version](https://github.com/FantasyInternet/cyberterminal/releases) +💾Get the latest version](https://github.com/FantasyInternet/cyberterminal/releases/latest) Made by [codeartistic.ninja](http://the.codeartistic.ninja/) diff --git a/package-lock.json b/package-lock.json index 2374930..618a34c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.2", + "version": "0.4.3", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6f3b829..1f1b0f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.2", + "version": "0.4.3", "description": "A fantasy internet client.", "author": { "name": "codeartisticninja", @@ -48,7 +48,7 @@ } }, "scripts": { - "prepublish": "jake", + "prepare": "jake", "build": "jake", "build-desktop": "electron-builder", "deploy": "jake deploy", From de2af02a54ef319fb80e986ec0013ccdf9e7c3d4 Mon Sep 17 00:00:00 2001 From: codeartisticninja Date: Wed, 11 Jul 2018 10:45:51 +0200 Subject: [PATCH 2/5] fixing sticky mouse --- .../_script__lib_mouseinput_.mouseinput.md | 12 +++---- package-lock.json | 2 +- package.json | 2 +- src/script/_lib/MouseInput.ts | 32 +++++++++++++------ 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/docs/classes/_script__lib_mouseinput_.mouseinput.md b/docs/classes/_script__lib_mouseinput_.mouseinput.md index 908ea94..2b96484 100644 --- a/docs/classes/_script__lib_mouseinput_.mouseinput.md +++ b/docs/classes/_script__lib_mouseinput_.mouseinput.md @@ -45,7 +45,7 @@ Class for taking care of mouse input ⊕ **new MouseInput**(sys: *[Sys](../interfaces/_script__lib_sys_.sys.md)*): [MouseInput](_script__lib_mouseinput_.mouseinput.md) -*Defined in [script/_lib/MouseInput.ts:22](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L22)* +*Defined in [script/_lib/MouseInput.ts:32](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L32)* **Parameters:** @@ -83,7 +83,7 @@ ___ **● sys**: *[Sys](../interfaces/_script__lib_sys_.sys.md)* -*Defined in [script/_lib/MouseInput.ts:24](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L24)* +*Defined in [script/_lib/MouseInput.ts:34](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L34)* ___ @@ -115,7 +115,7 @@ ___ ▸ **addEventListener**(fn: *`Function`*): `void` -*Defined in [script/_lib/MouseInput.ts:32](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L32)* +*Defined in [script/_lib/MouseInput.ts:43](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L43)* **Parameters:** @@ -132,7 +132,7 @@ ___ ▸ **blur**(): `void` -*Defined in [script/_lib/MouseInput.ts:27](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L27)* +*Defined in [script/_lib/MouseInput.ts:38](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L38)* **Returns:** `void` @@ -143,7 +143,7 @@ ___ ▸ **focus**(): `void` -*Defined in [script/_lib/MouseInput.ts:26](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L26)* +*Defined in [script/_lib/MouseInput.ts:37](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L37)* **Returns:** `void` @@ -154,7 +154,7 @@ ___ ▸ **removeEventListener**(fn: *`Function`*): `void` -*Defined in [script/_lib/MouseInput.ts:39](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L39)* +*Defined in [script/_lib/MouseInput.ts:50](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L50)* **Parameters:** diff --git a/package-lock.json b/package-lock.json index 618a34c..48e54a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.3", + "version": "0.4.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1f1b0f5..8d2b9c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.3", + "version": "0.4.4", "description": "A fantasy internet client.", "author": { "name": "codeartisticninja", diff --git a/src/script/_lib/MouseInput.ts b/src/script/_lib/MouseInput.ts index c2ea897..c79184e 100644 --- a/src/script/_lib/MouseInput.ts +++ b/src/script/_lib/MouseInput.ts @@ -12,16 +12,27 @@ export default class MouseInput { scaleY: number = 1 set element(val: HTMLElement) { - this._element.removeEventListener("pointermove", this._mouseMove.bind(this)) this._element.removeEventListener("pointerdown", this._mouseDown.bind(this)) - this._element.removeEventListener("pointerup", this._mouseUp.bind(this)) + this._element.removeEventListener("pointermove", this._mouseMove.bind(this)) + if (this._element.parentElement && this._element.parentElement.parentElement) { + this._element.parentElement.parentElement.removeEventListener("pointerup", this._mouseUp.bind(this)) + this._element.parentElement.parentElement.removeEventListener("pointerleave", this._mouseUp.bind(this)) + } else { + this._element.removeEventListener("pointerup", this._mouseUp.bind(this)) + } this._element = val - this._element.addEventListener("pointermove", this._mouseMove.bind(this)) this._element.addEventListener("pointerdown", this._mouseDown.bind(this)) - this._element.addEventListener("pointerup", this._mouseUp.bind(this)) + this._element.addEventListener("pointermove", this._mouseMove.bind(this)) + if (this._element.parentElement && this._element.parentElement.parentElement) { + this._element.parentElement.parentElement.addEventListener("pointerup", this._mouseUp.bind(this)) + this._element.parentElement.parentElement.addEventListener("pointerleave", this._mouseUp.bind(this)) + } else { + this._element.addEventListener("pointerup", this._mouseUp.bind(this)) + } } - constructor(public sys: Sys) { } + constructor(public sys: Sys) { + } focus() { } blur() { @@ -59,11 +70,6 @@ export default class MouseInput { } } - private _mouseMove(e: PointerEvent) { - this.state.x = (e.pageX - this._element.getBoundingClientRect().left) / this.scaleX * devicePixelRatio - this.state.y = (e.pageY - this._element.getBoundingClientRect().top) / this.scaleY * devicePixelRatio - this._sendState() - } private _mouseDown(e: PointerEvent) { clearTimeout(this._idleTO) this.state.x = (e.pageX - this._element.getBoundingClientRect().left) / this.scaleX * devicePixelRatio @@ -72,9 +78,15 @@ export default class MouseInput { this._sendState() e.preventDefault() } + private _mouseMove(e: PointerEvent) { + this.state.x = (e.pageX - this._element.getBoundingClientRect().left) / this.scaleX * devicePixelRatio + this.state.y = (e.pageY - this._element.getBoundingClientRect().top) / this.scaleY * devicePixelRatio + this._sendState() + } private _mouseUp(e: PointerEvent) { this.state.pressed = false this._sendState() + clearTimeout(this._idleTO) this._idleTO = setTimeout(() => { this.sys.focusInput(this.sys.inputPriority[0]) }, 1024) From fdca0e98f5dfcf3c39af4d017c8126548aa6565e Mon Sep 17 00:00:00 2001 From: poeticandroid Date: Wed, 11 Jul 2018 13:21:49 +0200 Subject: [PATCH 3/5] the codeartistic ninja is now a poetic android --- LICENSE | 2 +- README.md | 2 +- docs/README.md | 2 +- package-lock.json | 2 +- package.json | 8 ++++---- src/data.json | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/LICENSE b/LICENSE index 00adcac..0a0e125 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2018 codeartisticninja +Copyright (c) 2018 poeticandroid Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 1568e37..be35baf 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A fantasy terminal for the [fantasy internet](https://fantasyinternet.github.io/ [![icon](./src/images/icon.gif) 💾Get the latest version](https://github.com/FantasyInternet/cyberterminal/releases/latest) -Made by [codeartistic.ninja](http://the.codeartistic.ninja/) +Made by [poetic android](http://poeticandroid.online/) Keyboard shortcuts ------------------ diff --git a/docs/README.md b/docs/README.md index 1754f3c..3790df3 100644 --- a/docs/README.md +++ b/docs/README.md @@ -7,7 +7,7 @@ A fantasy terminal for the [fantasy internet](https://fantasyinternet.github.io/ [![icon](./src/images/icon.gif) 💾Get the latest version](https://github.com/FantasyInternet/cyberterminal/releases/latest) -Made by [codeartistic.ninja](http://the.codeartistic.ninja/) +Made by [poetic android](http://poeticandroid.online/) Keyboard shortcuts ------------------ diff --git a/package-lock.json b/package-lock.json index 48e54a5..83f8d3c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.4", + "version": "0.4.5", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 8d2b9c6..db04cd9 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { "name": "cyberterminal", - "version": "0.4.4", + "version": "0.4.5", "description": "A fantasy internet client.", "author": { - "name": "codeartisticninja", - "url": "http://codeartistic.ninja/", - "email": "the@codeartistic.ninja" + "name": "poeticandroid", + "url": "http://poeticandroid.online/", + "email": "i@poeticandroid.online" }, "private": true, "build": { diff --git a/src/data.json b/src/data.json index ff794bb..c8dd2b0 100644 --- a/src/data.json +++ b/src/data.json @@ -1,4 +1,4 @@ { "baseUrl": "./", - "twitter": "@codeartistic" + "twitter": "@poeticandroid" } \ No newline at end of file From 07d07bdcd0ee88284fa8a695e6144cb0c937a031 Mon Sep 17 00:00:00 2001 From: poeticAndroid Date: Wed, 11 Jul 2018 17:07:42 +0200 Subject: [PATCH 4/5] better solution to sticky mice --- .../_script__lib_mouseinput_.mouseinput.md | 12 ++++----- package-lock.json | 2 +- package.json | 2 +- src/script/_lib/MouseInput.ts | 25 +++++++------------ 4 files changed, 17 insertions(+), 24 deletions(-) diff --git a/docs/classes/_script__lib_mouseinput_.mouseinput.md b/docs/classes/_script__lib_mouseinput_.mouseinput.md index 2b96484..fc2c072 100644 --- a/docs/classes/_script__lib_mouseinput_.mouseinput.md +++ b/docs/classes/_script__lib_mouseinput_.mouseinput.md @@ -45,7 +45,7 @@ Class for taking care of mouse input ⊕ **new MouseInput**(sys: *[Sys](../interfaces/_script__lib_sys_.sys.md)*): [MouseInput](_script__lib_mouseinput_.mouseinput.md) -*Defined in [script/_lib/MouseInput.ts:32](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L32)* +*Defined in [script/_lib/MouseInput.ts:20](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L20)* **Parameters:** @@ -83,7 +83,7 @@ ___ **● sys**: *[Sys](../interfaces/_script__lib_sys_.sys.md)* -*Defined in [script/_lib/MouseInput.ts:34](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L34)* +*Defined in [script/_lib/MouseInput.ts:22](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L22)* ___ @@ -115,7 +115,7 @@ ___ ▸ **addEventListener**(fn: *`Function`*): `void` -*Defined in [script/_lib/MouseInput.ts:43](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L43)* +*Defined in [script/_lib/MouseInput.ts:36](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L36)* **Parameters:** @@ -132,7 +132,7 @@ ___ ▸ **blur**(): `void` -*Defined in [script/_lib/MouseInput.ts:38](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L38)* +*Defined in [script/_lib/MouseInput.ts:31](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L31)* **Returns:** `void` @@ -143,7 +143,7 @@ ___ ▸ **focus**(): `void` -*Defined in [script/_lib/MouseInput.ts:37](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L37)* +*Defined in [script/_lib/MouseInput.ts:30](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L30)* **Returns:** `void` @@ -154,7 +154,7 @@ ___ ▸ **removeEventListener**(fn: *`Function`*): `void` -*Defined in [script/_lib/MouseInput.ts:50](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L50)* +*Defined in [script/_lib/MouseInput.ts:43](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/MouseInput.ts#L43)* **Parameters:** diff --git a/package-lock.json b/package-lock.json index 83f8d3c..86452c0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.5", + "version": "0.4.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index db04cd9..1255500 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.5", + "version": "0.4.6", "description": "A fantasy internet client.", "author": { "name": "poeticandroid", diff --git a/src/script/_lib/MouseInput.ts b/src/script/_lib/MouseInput.ts index c79184e..24b96ca 100644 --- a/src/script/_lib/MouseInput.ts +++ b/src/script/_lib/MouseInput.ts @@ -12,26 +12,19 @@ export default class MouseInput { scaleY: number = 1 set element(val: HTMLElement) { - this._element.removeEventListener("pointerdown", this._mouseDown.bind(this)) - this._element.removeEventListener("pointermove", this._mouseMove.bind(this)) - if (this._element.parentElement && this._element.parentElement.parentElement) { - this._element.parentElement.parentElement.removeEventListener("pointerup", this._mouseUp.bind(this)) - this._element.parentElement.parentElement.removeEventListener("pointerleave", this._mouseUp.bind(this)) - } else { - this._element.removeEventListener("pointerup", this._mouseUp.bind(this)) - } + this._element.removeEventListener("pointerdown", this._mouseDown) + this._element.removeEventListener("pointermove", this._mouseMove) this._element = val - this._element.addEventListener("pointerdown", this._mouseDown.bind(this)) - this._element.addEventListener("pointermove", this._mouseMove.bind(this)) - if (this._element.parentElement && this._element.parentElement.parentElement) { - this._element.parentElement.parentElement.addEventListener("pointerup", this._mouseUp.bind(this)) - this._element.parentElement.parentElement.addEventListener("pointerleave", this._mouseUp.bind(this)) - } else { - this._element.addEventListener("pointerup", this._mouseUp.bind(this)) - } + this._element.addEventListener("pointerdown", this._mouseDown) + this._element.addEventListener("pointermove", this._mouseMove) } constructor(public sys: Sys) { + this._mouseDown = this._mouseDown.bind(this) + this._mouseMove = this._mouseMove.bind(this) + this._mouseUp = this._mouseUp.bind(this) + document.addEventListener("pointerup", this._mouseUp) + document.addEventListener("pointerleave", this._mouseUp) } focus() { } From 013807763997793f59ecf0839ed940f9ffb309f5 Mon Sep 17 00:00:00 2001 From: poeticAndroid Date: Tue, 17 Jul 2018 01:05:02 +0200 Subject: [PATCH 5/5] changing the way we connect to non-cyber sites.. --- ...cript__lib_cyberterminal_.cyberterminal.md | 11 ++-- .../_script__lib_electronsys_.electronsys.md | 55 +++++++++++------ .../_script__lib_websys_.webmachineworker.md | 12 ++-- docs/classes/_script__lib_websys_.websys.md | 59 ++++++++++++------- docs/interfaces/_script__lib_sys_.sys.md | 37 ++++++------ package-lock.json | 2 +- package.json | 2 +- src/script/_lib/CyberTerminal.ts | 41 +++++-------- src/script/_lib/ElectronSys.ts | 22 +++++-- src/script/_lib/Sys.ts | 3 +- src/script/_lib/WebSys.ts | 30 ++++++---- src/script/_lib/css.ts | 2 +- src/style/defaults.less | 30 ++++++++++ 13 files changed, 189 insertions(+), 117 deletions(-) diff --git a/docs/classes/_script__lib_cyberterminal_.cyberterminal.md b/docs/classes/_script__lib_cyberterminal_.cyberterminal.md index 54926ba..a460630 100644 --- a/docs/classes/_script__lib_cyberterminal_.cyberterminal.md +++ b/docs/classes/_script__lib_cyberterminal_.cyberterminal.md @@ -77,7 +77,7 @@ ___ ▸ **addMachine**(): [MachineWorker](../interfaces/_script__lib_machineworker_.machineworker.md) -*Defined in [script/_lib/CyberTerminal.ts:90](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L90)* +*Defined in [script/_lib/CyberTerminal.ts:79](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L79)* **Returns:** [MachineWorker](../interfaces/_script__lib_machineworker_.machineworker.md) @@ -88,7 +88,7 @@ ___ ▸ **connectTo**(url: *`string`*): `Promise`<`void`> -*Defined in [script/_lib/CyberTerminal.ts:43](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L43)* +*Defined in [script/_lib/CyberTerminal.ts:36](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L36)* **Parameters:** @@ -105,7 +105,7 @@ ___ ▸ **removeMachine**(): `void` -*Defined in [script/_lib/CyberTerminal.ts:101](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L101)* +*Defined in [script/_lib/CyberTerminal.ts:91](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L91)* **Returns:** `void` @@ -114,16 +114,15 @@ ___ ### setAddress -▸ **setAddress**(url: *`string`*, push: *`boolean`*): `void` +▸ **setAddress**(url: *`string`*): `void` -*Defined in [script/_lib/CyberTerminal.ts:125](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L125)* +*Defined in [script/_lib/CyberTerminal.ts:116](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/CyberTerminal.ts#L116)* **Parameters:** | Param | Type | | ------ | ------ | | url | `string` | -| push | `boolean` | **Returns:** `void` diff --git a/docs/classes/_script__lib_electronsys_.electronsys.md b/docs/classes/_script__lib_electronsys_.electronsys.md index 66a32b7..c62f61c 100644 --- a/docs/classes/_script__lib_electronsys_.electronsys.md +++ b/docs/classes/_script__lib_electronsys_.electronsys.md @@ -48,6 +48,7 @@ Sys implementation for electron app. See [Sys](../interfaces/__lib_sys_.sys.md) * [setDisplayMode](_script__lib_electronsys_.electronsys.md#setdisplaymode) * [setNativeMouse](_script__lib_electronsys_.electronsys.md#setnativemouse) * [setTextInput](_script__lib_electronsys_.electronsys.md#settextinput) +* [showLink](_script__lib_electronsys_.electronsys.md#showlink) * [startTone](_script__lib_electronsys_.electronsys.md#starttone) * [stopTone](_script__lib_electronsys_.electronsys.md#stoptone) * [waitForVsync](_script__lib_electronsys_.electronsys.md#waitforvsync) @@ -177,7 +178,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[addEventListener](_script__lib_websys_.websys.md#addeventlistener)* -*Defined in [script/_lib/WebSys.ts:449](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L449)* +*Defined in [script/_lib/WebSys.ts:456](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L456)* **Parameters:** @@ -199,7 +200,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[createMachine](_script__lib_websys_.websys.md#createmachine)* -*Defined in [script/_lib/WebSys.ts:252](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L252)* +*Defined in [script/_lib/WebSys.ts:246](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L246)* **Returns:** [WebMachineWorker](_script__lib_websys_.webmachineworker.md) @@ -235,7 +236,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[drawBitmap](_script__lib_websys_.websys.md#drawbitmap)* -*Defined in [script/_lib/WebSys.ts:90](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L90)* +*Defined in [script/_lib/WebSys.ts:84](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L84)* **Parameters:** @@ -256,7 +257,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[focusInput](_script__lib_websys_.websys.md#focusinput)* -*Defined in [script/_lib/WebSys.ts:395](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L395)* +*Defined in [script/_lib/WebSys.ts:389](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L389)* **Parameters:** @@ -275,7 +276,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[head](_script__lib_websys_.websys.md#head)* -*Defined in [script/_lib/WebSys.ts:354](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L354)* +*Defined in [script/_lib/WebSys.ts:348](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L348)* **Parameters:** @@ -311,7 +312,7 @@ ___ ### openWeb -▸ **openWeb**(path: *`string`*): `any` +▸ **openWeb**(path: *`string`*): `boolean` *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[openWeb](../interfaces/_script__lib_sys_.sys.md#openweb)* @@ -325,7 +326,7 @@ ___ | ------ | ------ | | path | `string` | -**Returns:** `any` +**Returns:** `boolean` ___ @@ -336,7 +337,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[post](_script__lib_websys_.websys.md#post)* -*Defined in [script/_lib/WebSys.ts:317](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L317)* +*Defined in [script/_lib/WebSys.ts:311](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L311)* **Parameters:** @@ -358,7 +359,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[print](_script__lib_websys_.websys.md#print)* -*Defined in [script/_lib/WebSys.ts:98](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L98)* +*Defined in [script/_lib/WebSys.ts:92](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L92)* **Parameters:** @@ -401,7 +402,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[replaceTextInput](_script__lib_websys_.websys.md#replacetextinput)* -*Defined in [script/_lib/WebSys.ts:422](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L422)* +*Defined in [script/_lib/WebSys.ts:416](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L416)* **Parameters:** @@ -418,7 +419,7 @@ ___ ### setAddress -▸ **setAddress**(url: *`string`*, push: *`boolean`*): `void` +▸ **setAddress**(url: *`string`*): `void` *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[setAddress](../interfaces/_script__lib_sys_.sys.md#setaddress)* @@ -431,7 +432,6 @@ ___ | Param | Type | | ------ | ------ | | url | `string` | -| push | `boolean` | **Returns:** `void` @@ -444,7 +444,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[setDisplayMode](_script__lib_websys_.websys.md#setdisplaymode)* -*Defined in [script/_lib/WebSys.ts:51](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L51)* +*Defined in [script/_lib/WebSys.ts:45](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L45)* **Parameters:** @@ -469,7 +469,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[setNativeMouse](_script__lib_websys_.websys.md#setnativemouse)* -*Defined in [script/_lib/WebSys.ts:440](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L440)* +*Defined in [script/_lib/WebSys.ts:434](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L434)* **Parameters:** @@ -488,7 +488,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[setTextInput](_script__lib_websys_.websys.md#settextinput)* -*Defined in [script/_lib/WebSys.ts:413](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L413)* +*Defined in [script/_lib/WebSys.ts:407](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L407)* **Parameters:** @@ -501,6 +501,25 @@ ___ **Returns:** `void` +___ + + +### showLink + +▸ **showLink**(url: *`string`*): `HTMLElement` + +*Inherited from [WebSys](_script__lib_websys_.websys.md).[showLink](_script__lib_websys_.websys.md#showlink)* + +*Defined in [script/_lib/WebSys.ts:443](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L443)* + +**Parameters:** + +| Param | Type | +| ------ | ------ | +| url | `string` | + +**Returns:** `HTMLElement` + ___ @@ -510,7 +529,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[startTone](_script__lib_websys_.websys.md#starttone)* -*Defined in [script/_lib/WebSys.ts:388](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L388)* +*Defined in [script/_lib/WebSys.ts:382](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L382)* **Returns:** `void` @@ -523,7 +542,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[stopTone](_script__lib_websys_.websys.md#stoptone)* -*Defined in [script/_lib/WebSys.ts:391](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L391)* +*Defined in [script/_lib/WebSys.ts:385](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L385)* **Returns:** `void` @@ -536,7 +555,7 @@ ___ *Inherited from [WebSys](_script__lib_websys_.websys.md).[waitForVsync](_script__lib_websys_.websys.md#waitforvsync)* -*Defined in [script/_lib/WebSys.ts:246](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L246)* +*Defined in [script/_lib/WebSys.ts:240](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L240)* **Returns:** `Promise`<`Object`> diff --git a/docs/classes/_script__lib_websys_.webmachineworker.md b/docs/classes/_script__lib_websys_.webmachineworker.md index 38e04ba..10edde6 100644 --- a/docs/classes/_script__lib_websys_.webmachineworker.md +++ b/docs/classes/_script__lib_websys_.webmachineworker.md @@ -37,7 +37,7 @@ ⊕ **new WebMachineWorker**(): [WebMachineWorker](_script__lib_websys_.webmachineworker.md) -*Defined in [script/_lib/WebSys.ts:675](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L675)* +*Defined in [script/_lib/WebSys.ts:683](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L683)* **Returns:** [WebMachineWorker](_script__lib_websys_.webmachineworker.md) @@ -53,7 +53,7 @@ ___ *Implementation of [MachineWorker](../interfaces/_script__lib_machineworker_.machineworker.md).[baseUrl](../interfaces/_script__lib_machineworker_.machineworker.md#baseurl)* -*Defined in [script/_lib/WebSys.ts:675](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L675)* +*Defined in [script/_lib/WebSys.ts:683](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L683)* ___ @@ -62,7 +62,7 @@ ___ **● worker**: *`Worker`* -*Defined in [script/_lib/WebSys.ts:674](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L674)* +*Defined in [script/_lib/WebSys.ts:682](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L682)* ___ @@ -76,7 +76,7 @@ ___ *Implementation of [MachineWorker](../interfaces/_script__lib_machineworker_.machineworker.md).[onMessage](../interfaces/_script__lib_machineworker_.machineworker.md#onmessage)* -*Defined in [script/_lib/WebSys.ts:685](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L685)* +*Defined in [script/_lib/WebSys.ts:693](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L693)* **Parameters:** @@ -93,7 +93,7 @@ ___ ▸ **send**(msg: *`any`*, transferables?: * `any`[] | `undefined`*): `void` -*Defined in [script/_lib/WebSys.ts:681](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L681)* +*Defined in [script/_lib/WebSys.ts:689](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L689)* **Parameters:** @@ -113,7 +113,7 @@ ___ *Implementation of [MachineWorker](../interfaces/_script__lib_machineworker_.machineworker.md).[terminate](../interfaces/_script__lib_machineworker_.machineworker.md#terminate)* -*Defined in [script/_lib/WebSys.ts:691](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L691)* +*Defined in [script/_lib/WebSys.ts:699](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L699)* **Returns:** `void` diff --git a/docs/classes/_script__lib_websys_.websys.md b/docs/classes/_script__lib_websys_.websys.md index 31423cf..5b888ea 100644 --- a/docs/classes/_script__lib_websys_.websys.md +++ b/docs/classes/_script__lib_websys_.websys.md @@ -48,6 +48,7 @@ Sys implementation for web browsers. See [Sys](../interfaces/__lib_sys_.sys.md) * [setDisplayMode](_script__lib_websys_.websys.md#setdisplaymode) * [setNativeMouse](_script__lib_websys_.websys.md#setnativemouse) * [setTextInput](_script__lib_websys_.websys.md#settextinput) +* [showLink](_script__lib_websys_.websys.md#showlink) * [startTone](_script__lib_websys_.websys.md#starttone) * [stopTone](_script__lib_websys_.websys.md#stoptone) * [waitForVsync](_script__lib_websys_.websys.md#waitforvsync) @@ -159,7 +160,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[addEventListener](../interfaces/_script__lib_sys_.sys.md#addeventlistener)* -*Defined in [script/_lib/WebSys.ts:449](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L449)* +*Defined in [script/_lib/WebSys.ts:456](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L456)* **Parameters:** @@ -179,7 +180,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[createMachine](../interfaces/_script__lib_sys_.sys.md#createmachine)* -*Defined in [script/_lib/WebSys.ts:252](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L252)* +*Defined in [script/_lib/WebSys.ts:246](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L246)* **Returns:** [WebMachineWorker](_script__lib_websys_.webmachineworker.md) @@ -192,7 +193,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[delete](../interfaces/_script__lib_sys_.sys.md#delete)* -*Defined in [script/_lib/WebSys.ts:345](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L345)* +*Defined in [script/_lib/WebSys.ts:339](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L339)* **Parameters:** @@ -211,7 +212,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[drawBitmap](../interfaces/_script__lib_sys_.sys.md#drawbitmap)* -*Defined in [script/_lib/WebSys.ts:90](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L90)* +*Defined in [script/_lib/WebSys.ts:84](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L84)* **Parameters:** @@ -230,7 +231,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[focusInput](../interfaces/_script__lib_sys_.sys.md#focusinput)* -*Defined in [script/_lib/WebSys.ts:395](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L395)* +*Defined in [script/_lib/WebSys.ts:389](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L389)* **Parameters:** @@ -247,7 +248,7 @@ ___ ▸ **head**(filename: *`string`*): `Promise`<`string`> -*Defined in [script/_lib/WebSys.ts:354](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L354)* +*Defined in [script/_lib/WebSys.ts:348](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L348)* **Parameters:** @@ -266,7 +267,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[list](../interfaces/_script__lib_sys_.sys.md#list)* -*Defined in [script/_lib/WebSys.ts:365](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L365)* +*Defined in [script/_lib/WebSys.ts:359](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L359)* **Parameters:** @@ -285,7 +286,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[openWeb](../interfaces/_script__lib_sys_.sys.md#openweb)* -*Defined in [script/_lib/WebSys.ts:445](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L445)* +*Defined in [script/_lib/WebSys.ts:439](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L439)* **Parameters:** @@ -302,7 +303,7 @@ ___ ▸ **post**(filename: *`string`*, data: * `string` | `ArrayBuffer`*): `Promise`<`ArrayBuffer`> -*Defined in [script/_lib/WebSys.ts:317](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L317)* +*Defined in [script/_lib/WebSys.ts:311](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L311)* **Parameters:** @@ -322,7 +323,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[print](../interfaces/_script__lib_sys_.sys.md#print)* -*Defined in [script/_lib/WebSys.ts:98](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L98)* +*Defined in [script/_lib/WebSys.ts:92](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L92)* **Parameters:** @@ -341,7 +342,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[read](../interfaces/_script__lib_sys_.sys.md#read)* -*Defined in [script/_lib/WebSys.ts:256](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L256)* +*Defined in [script/_lib/WebSys.ts:250](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L250)* **Parameters:** @@ -361,7 +362,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[replaceTextInput](../interfaces/_script__lib_sys_.sys.md#replacetextinput)* -*Defined in [script/_lib/WebSys.ts:422](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L422)* +*Defined in [script/_lib/WebSys.ts:416](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L416)* **Parameters:** @@ -378,7 +379,7 @@ ___ ### setAddress -▸ **setAddress**(url: *`string`*, push: *`boolean`*): `void` +▸ **setAddress**(url: *`string`*): `void` *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[setAddress](../interfaces/_script__lib_sys_.sys.md#setaddress)* @@ -389,7 +390,6 @@ ___ | Param | Type | | ------ | ------ | | url | `string` | -| push | `boolean` | **Returns:** `void` @@ -400,7 +400,7 @@ ___ ▸ **setDisplayMode**(mode: * "none" | "text" | "pixel"*, width: *`number`*, height: *`number`*, visibleWidth?: *`number`*, visibleHeight?: *`number`*): `void` -*Defined in [script/_lib/WebSys.ts:51](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L51)* +*Defined in [script/_lib/WebSys.ts:45](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L45)* **Parameters:** @@ -423,7 +423,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[setNativeMouse](../interfaces/_script__lib_sys_.sys.md#setnativemouse)* -*Defined in [script/_lib/WebSys.ts:440](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L440)* +*Defined in [script/_lib/WebSys.ts:434](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L434)* **Parameters:** @@ -440,7 +440,7 @@ ___ ▸ **setTextInput**(text: *`string`*, pos: *`number`*, len: *`number`*, type?: * `undefined` | `string`*): `void` -*Defined in [script/_lib/WebSys.ts:413](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L413)* +*Defined in [script/_lib/WebSys.ts:407](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L407)* **Parameters:** @@ -453,6 +453,23 @@ ___ **Returns:** `void` +___ + + +### showLink + +▸ **showLink**(url: *`string`*): `HTMLElement` + +*Defined in [script/_lib/WebSys.ts:443](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L443)* + +**Parameters:** + +| Param | Type | +| ------ | ------ | +| url | `string` | + +**Returns:** `HTMLElement` + ___ @@ -460,7 +477,7 @@ ___ ▸ **startTone**(): `void` -*Defined in [script/_lib/WebSys.ts:388](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L388)* +*Defined in [script/_lib/WebSys.ts:382](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L382)* **Returns:** `void` @@ -471,7 +488,7 @@ ___ ▸ **stopTone**(): `void` -*Defined in [script/_lib/WebSys.ts:391](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L391)* +*Defined in [script/_lib/WebSys.ts:385](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L385)* **Returns:** `void` @@ -482,7 +499,7 @@ ___ ▸ **waitForVsync**(): `Promise`<`Object`> -*Defined in [script/_lib/WebSys.ts:246](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L246)* +*Defined in [script/_lib/WebSys.ts:240](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L240)* **Returns:** `Promise`<`Object`> @@ -495,7 +512,7 @@ ___ *Implementation of [Sys](../interfaces/_script__lib_sys_.sys.md).[write](../interfaces/_script__lib_sys_.sys.md#write)* -*Defined in [script/_lib/WebSys.ts:307](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L307)* +*Defined in [script/_lib/WebSys.ts:301](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/WebSys.ts#L301)* **Parameters:** diff --git a/docs/interfaces/_script__lib_sys_.sys.md b/docs/interfaces/_script__lib_sys_.sys.md index 99ceb96..0d5a011 100644 --- a/docs/interfaces/_script__lib_sys_.sys.md +++ b/docs/interfaces/_script__lib_sys_.sys.md @@ -135,7 +135,7 @@ ___ ▸ **addEventListener**(event: *`string`*, listener: *`Function`*): `void` -*Defined in [script/_lib/Sys.ts:133](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L133)* +*Defined in [script/_lib/Sys.ts:132](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L132)* **Parameters:** @@ -153,7 +153,7 @@ ___ ▸ **createMachine**(): [MachineWorker](_script__lib_machineworker_.machineworker.md) -*Defined in [script/_lib/Sys.ts:70](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L70)* +*Defined in [script/_lib/Sys.ts:69](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L69)* Create a machine. @@ -167,7 +167,7 @@ ___ ▸ **delete**(filename: *`string`*): `Promise`<`boolean`> -*Defined in [script/_lib/Sys.ts:90](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L90)* +*Defined in [script/_lib/Sys.ts:89](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L89)* Delete a file. @@ -186,7 +186,7 @@ ___ ▸ **drawBitmap**(buffer: *`ArrayBuffer`*): `void` -*Defined in [script/_lib/Sys.ts:44](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L44)* +*Defined in [script/_lib/Sys.ts:43](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L43)* Draw given bitmap to pixel display. @@ -205,7 +205,7 @@ ___ ▸ **focusInput**(input: * "text" | "mouse" | "game"*): `string`[] -*Defined in [script/_lib/Sys.ts:102](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L102)* +*Defined in [script/_lib/Sys.ts:101](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L101)* Focus on given type of input. @@ -224,7 +224,7 @@ ___ ▸ **list**(path: *`string`*): `Promise`<`any`> -*Defined in [script/_lib/Sys.ts:96](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L96)* +*Defined in [script/_lib/Sys.ts:95](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L95)* List contents of a directory. @@ -243,7 +243,7 @@ ___ ▸ **openWeb**(url: *`string`*): `void` -*Defined in [script/_lib/Sys.ts:131](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L131)* +*Defined in [script/_lib/Sys.ts:130](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L130)* Open a link in default web browser. @@ -262,7 +262,7 @@ ___ ▸ **print**(str: *`string`*): `void` -*Defined in [script/_lib/Sys.ts:49](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L49)* +*Defined in [script/_lib/Sys.ts:48](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L48)* Print string to text display. @@ -281,7 +281,7 @@ ___ ▸ **read**(filename: *`string`*, options: *`any`*): `Promise`<`any`> -*Defined in [script/_lib/Sys.ts:77](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L77)* +*Defined in [script/_lib/Sys.ts:76](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L76)* Read a file. @@ -301,7 +301,7 @@ ___ ▸ **replaceTextInput**(search: *`string`*, replace: *`string`*, fromIndex: *`number`*): `void` -*Defined in [script/_lib/Sys.ts:119](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L119)* +*Defined in [script/_lib/Sys.ts:118](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L118)* Replace first occurrence of a substring with another. @@ -320,9 +320,9 @@ ___ ### setAddress -▸ **setAddress**(url: *`string`*, push: *`boolean`*): `void` +▸ **setAddress**(url: *`string`*): `void` -*Defined in [script/_lib/Sys.ts:31](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L31)* +*Defined in [script/_lib/Sys.ts:30](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L30)* Set the current URL. @@ -331,7 +331,6 @@ Set the current URL. | Param | Type | Description | | ------ | ------ | ------ | | url | `string` | URL | -| push | `boolean` | if it should be pushed to the navigation stack. | **Returns:** `void` @@ -342,7 +341,7 @@ ___ ▸ **setDisplayMode**(mode: * "none" | "text" | "pixel"*, width: *`number`*, height: *`number`*): `void` -*Defined in [script/_lib/Sys.ts:39](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L39)* +*Defined in [script/_lib/Sys.ts:38](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L38)* Switch display mode. @@ -363,7 +362,7 @@ ___ ▸ **setNativeMouse**(type: *`string`*): `void` -*Defined in [script/_lib/Sys.ts:125](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L125)* +*Defined in [script/_lib/Sys.ts:124](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L124)* Set the appearance of the native mouse cursor. @@ -382,7 +381,7 @@ ___ ▸ **setTextInput**(text: *`string`*, pos: *`number`*, len: *`number`*, type?: * "multiline" | "text" | "password" | "number" | "url" | "email" | "tel"*): `void` -*Defined in [script/_lib/Sys.ts:111](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L111)* +*Defined in [script/_lib/Sys.ts:110](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L110)* Set the state of the text input. @@ -404,7 +403,7 @@ ___ ▸ **startTone**(channel: *`number`*, frequency: *`number`*, volume?: * `undefined` | `number`*, type?: * "sine" | "square" | "sawtooth" | "triangle"*): `void` -*Defined in [script/_lib/Sys.ts:58](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L58)* +*Defined in [script/_lib/Sys.ts:57](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L57)* Start tone oscillator @@ -426,7 +425,7 @@ ___ ▸ **stopTone**(channel: *`number`*): `void` -*Defined in [script/_lib/Sys.ts:64](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L64)* +*Defined in [script/_lib/Sys.ts:63](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L63)* Stop tone oscillator @@ -445,7 +444,7 @@ ___ ▸ **write**(filename: *`string`*, data: * `string` | `ArrayBuffer`*): `Promise`<`boolean`> -*Defined in [script/_lib/Sys.ts:84](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L84)* +*Defined in [script/_lib/Sys.ts:83](https://github.com/FantasyInternet/cyberterminal/blob/HEAD/src/script/_lib/Sys.ts#L83)* Write to a file. diff --git a/package-lock.json b/package-lock.json index 86452c0..506f460 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.6", + "version": "0.4.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 1255500..07715e5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cyberterminal", - "version": "0.4.6", + "version": "0.4.7", "description": "A fantasy internet client.", "author": { "name": "poeticandroid", diff --git a/src/script/_lib/CyberTerminal.ts b/src/script/_lib/CyberTerminal.ts index 6053db9..a408f95 100644 --- a/src/script/_lib/CyberTerminal.ts +++ b/src/script/_lib/CyberTerminal.ts @@ -31,13 +31,6 @@ export default class CyberTerminal { } } }) - addEventListener("popstate", (e: PopStateEvent) => { - if (this.machineWorkers.length) { - if (e.state !== this.machineWorkers[this.machineWorkers.length - 1].baseUrl) { - this.removeMachine() - } - } - }) } async connectTo(url: string) { @@ -59,7 +52,7 @@ export default class CyberTerminal { let msg = await this._findBoot(url) if (msg.wasm) { this.sys.print(".") - this.sys.setAddress("" + msg.url, true) + this.setAddress("" + msg.url) this.sys.setDisplayMode("none", 0, 0) machine.send({ cmd: "resize", @@ -69,21 +62,17 @@ export default class CyberTerminal { this._connecting = setTimeout(() => { this._connecting = null }, 2048) - } else if (typeof process !== "undefined") { - this.sys.print(".") + } else { + this.sys.print("!\n") + this.sys.print("could not load boot.wasm!") + this.setAddress("" + msg.url) + this.sys.openWeb(url) this._connecting = setTimeout(() => { if (this.machineWorkers.length > 1) { this.removeMachine() - this._connecting = null } + this._connecting = null }, 2048) - this.sys.openWeb(url) - } else if (location.toString() !== url) { - this.sys.print(".") - this.sys.openWeb(url) - } else { - this.sys.print("!\n") - this.sys.print("could not load boot.wasm!") } } @@ -95,6 +84,7 @@ export default class CyberTerminal { machine.onMessage(this._onMessage.bind(this)) this.sys.textInput.setState({ type: "multiline", text: "", pos: 0, len: 0, key: 0 }) this.sys.chipSound.stopAll() + console.log("Machines in stack", this.machineWorkers.length) return machine } @@ -104,27 +94,28 @@ export default class CyberTerminal { console.log("Disconnecting from", machine ? machine.baseUrl : machine) this.sys.setDisplayMode("text", 80, 20) this.sys.print("\n\nDisconnecting...") - history.back() - if (this.machineWorkers.length) - this.sys.setAddress(this.machineWorkers[this.machineWorkers.length - 1].baseUrl, false) + this.sys.textInput.setState({ type: "multiline", text: "", pos: 0, len: 0 }) + this.sys.chipSound.stopAll() setTimeout(() => { if (this.machineWorkers.length) { + this.setAddress(this.machineWorkers[this.machineWorkers.length - 1].baseUrl) this.sys.setDisplayMode("none", 0, 0) this.machineWorkers[this.machineWorkers.length - 1].send({ cmd: "resume" }) } else { + console.log("Going back, coz no machines left..") history.back() setTimeout(() => { + console.log("Reloading, coz no machines left") location.reload() }, 1024) } }, 128) - this.sys.textInput.setState({ type: "multiline", text: "", pos: 0, len: 0 }) - this.sys.chipSound.stopAll() + console.log("Machines in stack", this.machineWorkers.length) } - setAddress(url: string, push: boolean) { + setAddress(url: string) { this.machineWorkers[this.machineWorkers.length - 1].baseUrl = url - this.sys.setAddress(url, push) + this.sys.setAddress(url) } diff --git a/src/script/_lib/ElectronSys.ts b/src/script/_lib/ElectronSys.ts index f4f891a..9984709 100644 --- a/src/script/_lib/ElectronSys.ts +++ b/src/script/_lib/ElectronSys.ts @@ -43,7 +43,7 @@ export default class ElectronSys extends WebSys { this._createUserFolder() } - setAddress(url: string, push: boolean) { + setAddress(url: string) { document.title = url + " - " + this._title } @@ -160,13 +160,23 @@ export default class ElectronSys extends WebSys { } openWeb(path: string) { + let a = this.showLink(path).querySelector("a") let url = new URL(path) - if (url.protocol !== "file:") { - return shell.openExternal(path) + if (url.protocol === "file:") { + path = decodeURI(url.pathname) + if (process.platform === "win32") path = path.substr(1) + a.textContent = path + a.addEventListener("click", (e) => { + shell.showItemInFolder(path) + e.preventDefault() + }) + } else { + a.addEventListener("click", (e) => { + shell.openExternal(path) + e.preventDefault() + }) } - path = decodeURI(url.pathname) - if (process.platform === "win32") path = path.substr(1) - shell.showItemInFolder(path) + return true } /** _privates */ diff --git a/src/script/_lib/Sys.ts b/src/script/_lib/Sys.ts index 512d922..f17abbb 100644 --- a/src/script/_lib/Sys.ts +++ b/src/script/_lib/Sys.ts @@ -26,9 +26,8 @@ export default interface Sys { /** * Set the current URL. * @param url URL - * @param push if it should be pushed to the navigation stack. */ - setAddress(url: string, push: boolean): void + setAddress(url: string): void /** * Switch display mode. diff --git a/src/script/_lib/WebSys.ts b/src/script/_lib/WebSys.ts index c516e52..14a739c 100644 --- a/src/script/_lib/WebSys.ts +++ b/src/script/_lib/WebSys.ts @@ -38,14 +38,8 @@ export default class WebSys implements Sys { this.startupUrl = location.toString() } - setAddress(url: string, push: boolean) { - if (url !== location.toString()) { - if (push) { - history.pushState(url, url, url) - } else { - history.replaceState(url, url, url) - } - } + setAddress(url: string) { + history.replaceState(url, url, url) } setDisplayMode(mode: "none" | "text" | "pixel", width: number, height: number, visibleWidth = width, visibleHeight = height) { @@ -443,7 +437,20 @@ export default class WebSys implements Sys { } openWeb(url: string) { - location.assign(url) + this.showLink(url) + } + + showLink(url: string) { + let dialog = this._container.querySelector(".dialog") + dialog.innerHTML = '


👆

' + let a = dialog.querySelector("a") + a.href = url + a.textContent = url + dialog.classList.add("active") + setTimeout(() => { + dialog.classList.remove("active") + }, 4096) + return dialog } addEventListener(event: string, fn: Function) { @@ -482,9 +489,10 @@ export default class WebSys implements Sys { private _initContainer() { let style = document.createElement("style") - style.textContent = css.replace(/;/g, " !important;") + style.textContent = css.replace(/}/g, ";}").replace(/;/g, " !important;") ; (document.querySelector("head")).insertBefore(style, document.querySelector("head *")) - this._container.innerHTML = '
' + this._container.innerHTML = + '
' this._displayContainer = this._container.querySelector(".display") addEventListener("resize", () => { this._resize() }) } diff --git a/src/script/_lib/css.ts b/src/script/_lib/css.ts index aa9603c..f26dfef 100644 --- a/src/script/_lib/css.ts +++ b/src/script/_lib/css.ts @@ -1 +1 @@ -export default "fantasy-terminal{align-items:center;background-color:black;color:#ccc;display:flex;justify-content:center;overflow:hidden;position:relative;touch-action:none;min-width:1em;min-height:1em;max-height:100vh}fantasy-terminal pre{font-family:monospace;white-space:pre}fantasy-terminal pre span.current{text-decoration:underline}fantasy-terminal canvas{min-width:none;max-width:none;min-height:none;max-height:none}fantasy-terminal .input{position:absolute;top:0;left:0}fantasy-terminal .input .text{position:absolute;right:100vw;bottom:100vh}fantasy-terminal .input .text textarea,fantasy-terminal .input .text input{position:static}fantasy-terminal .input .game{font-size:24px;opacity:.75;position:fixed;left:0;bottom:-100%;width:100%;height:100%;transition:bottom 1s,opacity 1s}fantasy-terminal .input .game.active{bottom:0}fantasy-terminal .input .game.idle{opacity:.1;transition:bottom 1s,opacity 10s}fantasy-terminal .input .game .left{left:0}fantasy-terminal .input .game .left .slider{left:calc(40% - 1.5em)}fantasy-terminal .input .game .left .slider .knob{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAsUlEQVRo3u2ZXQqAMAyDiyfv0XqDHUlfHIiIVvfXzHzgiwhNUJd2EyGEkFlJIrLuV0ITbwfh2YihibeHezDiYUx4BIY24RWWTYRDX74tQgj5ts5rwxraKid6BlD1WiPSs1rNkdFfXDtCG2wl80SUQSTd9U7LH0ZC2E8I/ieeYhmdIsh6mlAB28EghARCGz3bDfiNLU9OjGxNik2EF38nFEb8VRsMd8Bxnicgj5gIIcTHBmt2bad/9QQUAAAAAElFTkSuQmCC\")}fantasy-terminal .input .game .right{right:0}fantasy-terminal .input .game .right .slider{left:calc(60% - 1.5em)}fantasy-terminal .input .game .right .slider .knob{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACQUlEQVRo3u2YQUiUQRTHfy2aosQGuSB6CoqKvYTQoYN60kNoRIe6REHdPESX1KtQEl2ULoEgboJ0ExGUiLqXGEVUUGJYlKZ4UDMFa9sO/hcWmW/xk53BifnD8DHv8d68983Mf94MBPx/yO1oG8A7oAeo8DGBwpbxKQGAcqAW6JZs3bcE8qiR7LtPCRwAksBZYFyyTl/3wDegw8ZgCUdJ1QANQLVPM5BQ4G3AtGSDvm7iOsmWSz1YmeVkEsBh4Lz6f3xKIGeQPfaNhf4Cm8BnoBc4GCqtgAC7GNHmextRu1+RfsBBLGMa60wcoyQwJ8O+HbpTKodfOGCTFLAlFhuKa9wIZGXcKlmVblU/gHoHf/8WsACMioaPxHVwR7MwL+MM8BtocrSU36hualcct/dyQr+U8Ud9bzoK/rTGu6g4FoHZvVTOx4CfcvbUIZH0a/0fUr9PMZyL66gamJHxL+CEg+DLgSXguWFGJuI6e6QnkWdyMK0BbOJCkReNLHB0t46uy+iGqPWL+r2OuD+q3d+Nk7SWzLCBWrMWmSjP/Z8MulrdJZaBymJOqoD3wAfD/fWu/sKcZsUG95sO0Dwmpb9WzElGfz8dQa1TcjJiiftzQEuE/rL0U6HiCwiwgyfaZFcj9MeBNUsEUBKkxdVfDVxdCbzWgZjcz7PwULPQbZBngeb9voxSwCqwwva7aCF/3/NlL3Qp4AcqydeAVw4KwZKhgu2XuC2VJBvASd8Y6VJBBdmBpzA9s5ccCTxHSCAkEOA5/gEUCbDsMuovvwAAAABJRU5ErkJggg==\")}fantasy-terminal .input .game .left,fantasy-terminal .input .game .right{touch-action:none;position:absolute;bottom:0;width:40%;height:80%}fantasy-terminal .input .game .left .slider,fantasy-terminal .input .game .right .slider{background-color:gray;border-radius:1.5em;position:absolute;width:3em;height:3em;top:60%}fantasy-terminal .input .game .left .slider .knob,fantasy-terminal .input .game .right .slider .knob{background-color:white;border-radius:1em;position:absolute;left:0;top:0;margin:.5em .5em;width:2em;height:2em}" +export default "fantasy-terminal{align-items:center;background-color:black;color:#ccc;display:flex;justify-content:center;overflow:hidden;position:relative;touch-action:none;min-width:1em;min-height:1em;max-height:100vh}fantasy-terminal pre{font-family:monospace;white-space:pre}fantasy-terminal pre span.current{text-decoration:underline}fantasy-terminal canvas{min-width:none;max-width:none;min-height:none;max-height:none}fantasy-terminal .input{position:absolute;top:0;left:0}fantasy-terminal .input .text{position:absolute;right:100vw;bottom:100vh}fantasy-terminal .input .text textarea,fantasy-terminal .input .text input{position:static}fantasy-terminal .input .game{font-size:24px;opacity:.75;position:fixed;left:0;bottom:-100%;width:100%;height:100%;transition:bottom 1s,opacity 1s}fantasy-terminal .input .game.active{bottom:0}fantasy-terminal .input .game.idle{opacity:.1;transition:bottom 1s,opacity 10s}fantasy-terminal .input .game .left{left:0}fantasy-terminal .input .game .left .slider{left:calc(40% - 1.5em)}fantasy-terminal .input .game .left .slider .knob{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAsUlEQVRo3u2ZXQqAMAyDiyfv0XqDHUlfHIiIVvfXzHzgiwhNUJd2EyGEkFlJIrLuV0ITbwfh2YihibeHezDiYUx4BIY24RWWTYRDX74tQgj5ts5rwxraKid6BlD1WiPSs1rNkdFfXDtCG2wl80SUQSTd9U7LH0ZC2E8I/ieeYhmdIsh6mlAB28EghARCGz3bDfiNLU9OjGxNik2EF38nFEb8VRsMd8Bxnicgj5gIIcTHBmt2bad/9QQUAAAAAElFTkSuQmCC\")}fantasy-terminal .input .game .right{right:0}fantasy-terminal .input .game .right .slider{left:calc(60% - 1.5em)}fantasy-terminal .input .game .right .slider .knob{background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAACQUlEQVRo3u2YQUiUQRTHfy2aosQGuSB6CoqKvYTQoYN60kNoRIe6REHdPESX1KtQEl2ULoEgboJ0ExGUiLqXGEVUUGJYlKZ4UDMFa9sO/hcWmW/xk53BifnD8DHv8d68983Mf94MBPx/yO1oG8A7oAeo8DGBwpbxKQGAcqAW6JZs3bcE8qiR7LtPCRwAksBZYFyyTl/3wDegw8ZgCUdJ1QANQLVPM5BQ4G3AtGSDvm7iOsmWSz1YmeVkEsBh4Lz6f3xKIGeQPfaNhf4Cm8BnoBc4GCqtgAC7GNHmextRu1+RfsBBLGMa60wcoyQwJ8O+HbpTKodfOGCTFLAlFhuKa9wIZGXcKlmVblU/gHoHf/8WsACMioaPxHVwR7MwL+MM8BtocrSU36hualcct/dyQr+U8Ud9bzoK/rTGu6g4FoHZvVTOx4CfcvbUIZH0a/0fUr9PMZyL66gamJHxL+CEg+DLgSXguWFGJuI6e6QnkWdyMK0BbOJCkReNLHB0t46uy+iGqPWL+r2OuD+q3d+Nk7SWzLCBWrMWmSjP/Z8MulrdJZaBymJOqoD3wAfD/fWu/sKcZsUG95sO0Dwmpb9WzElGfz8dQa1TcjJiiftzQEuE/rL0U6HiCwiwgyfaZFcj9MeBNUsEUBKkxdVfDVxdCbzWgZjcz7PwULPQbZBngeb9voxSwCqwwva7aCF/3/NlL3Qp4AcqydeAVw4KwZKhgu2XuC2VJBvASd8Y6VJBBdmBpzA9s5ccCTxHSCAkEOA5/gEUCbDsMuovvwAAAABJRU5ErkJggg==\")}fantasy-terminal .input .game .left,fantasy-terminal .input .game .right{touch-action:none;position:absolute;bottom:0;width:40%;height:80%}fantasy-terminal .input .game .left .slider,fantasy-terminal .input .game .right .slider{background-color:gray;border-radius:1.5em;position:absolute;width:3em;height:3em;top:60%}fantasy-terminal .input .game .left .slider .knob,fantasy-terminal .input .game .right .slider .knob{background-color:white;border-radius:1em;position:absolute;left:0;top:0;margin:.5em .5em;width:2em;height:2em}fantasy-terminal .input .dialog{background-color:#def;box-shadow:0 0 1em black;color:#369;font-size:20px;transition:top 1s,max-height 2s;position:fixed;left:0;top:-4em;width:100%;max-height:0;overflow:hidden}fantasy-terminal .input .dialog.active,fantasy-terminal .input .dialog:hover{top:0;max-height:10em}fantasy-terminal .input .dialog p{text-align:center}fantasy-terminal .input .dialog a{color:inherit}fantasy-terminal .input .dialog button{background-color:rgba(127,127,127,0.25);border:2px solid inherit;margin:0 1em;padding:.1em 1em}" diff --git a/src/style/defaults.less b/src/style/defaults.less index db2d229..c34e06d 100644 --- a/src/style/defaults.less +++ b/src/style/defaults.less @@ -97,5 +97,35 @@ fantasy-terminal { } } } + .dialog { + background-color: #def; + box-shadow: 0 0 1em black; + color: #369; + font-size: 20px; + transition: top 1s, max-height 2s; + position: fixed; + left: 0; + top: -4em; + width: 100%; + max-height: 0em; + overflow: hidden; + &.active, + &:hover { + top: 0em; + max-height: 10em; + } + p { + text-align: center; + } + a { + color: inherit; + } + button { + background-color: rgba(127, 127, 127, .25); + border: 2px solid inherit; + margin: 0 1em; + padding: .1em 1em; + } + } } } \ No newline at end of file