diff options
| author | Shulhan <ms@kilabit.info> | 2021-10-19 08:24:37 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2021-10-19 08:24:37 +0700 |
| commit | d0431d303c67cb98ef9f484b9df27852d3b762c3 (patch) | |
| tree | 572ffd110ef0d671f8e4a6bfd619792066d95e05 /_www/http_target.ts | |
| parent | 95fcd7309283daecc75abd9de57428353ee940bc (diff) | |
| download | gorankusu-d0431d303c67cb98ef9f484b9df27852d3b762c3.tar.xz | |
www: load the stored variables into Target, HttpTarget, WebSocketTarget
In the commit edff37e3 and 264cb988, we store the user modified input
into local storage. This including Target options and variables,
HttpTarget headers and parameters, and WebSocket headers and parameters.
When the user interface refreshed, the stored variables is loaded into
input form but not saved into current Target/HttpTarget/WebSocketTarget
variables.
This changes fix this issue by loading the stored variables into
into current instance of Target/HttpTarget/WebSocketTarget variables.
Diffstat (limited to '_www/http_target.ts')
| -rw-r--r-- | _www/http_target.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/_www/http_target.ts b/_www/http_target.ts index 282a795..b134f03 100644 --- a/_www/http_target.ts +++ b/_www/http_target.ts @@ -225,12 +225,12 @@ export class HttpTarget { for (let key in this.opts.Headers) { let fi = this.opts.Headers[key] - let val = LoadHttpTargetHeader( + fi.value = LoadHttpTargetHeader( this.target, this.opts, key, ) - GenerateFormInput(wrapper, fi, val) + GenerateFormInput(wrapper, fi) } parent.appendChild(wrapper) @@ -253,12 +253,12 @@ export class HttpTarget { for (let key in this.opts.Params) { let fi = this.opts.Params[key] - let val = LoadHttpTargetParam( + fi.value = LoadHttpTargetParam( this.target, this.opts, key, ) - GenerateFormInput(wrapper, fi, val) + GenerateFormInput(wrapper, fi) } parent.appendChild(wrapper) |
