sliftutils 1.4.6 → 1.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sliftutils",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -128,7 +128,7 @@ class DirectoryPrompter extends preact.Component {
128
128
  // reloads so getFileStorageNested2 picks up the remote storage.
129
129
  @observer
130
130
  class ServerConnectForm extends preact.Component {
131
- private obs = observable({ expanded: false, url: "", password: "", error: "", connecting: false, needsCert: false });
131
+ private obs = observable({ expanded: false, url: "", password: "", error: "", connecting: false, needsCert: false, showPassword: false });
132
132
  private cleanUrl() { return this.obs.url.trim().replace(/\/+$/, ""); }
133
133
  private connect = async () => {
134
134
  const s = this.obs;
@@ -168,8 +168,13 @@ class ServerConnectForm extends preact.Component {
168
168
  <div className={css.vbox(16).center}>
169
169
  <input className={inputCss} placeholder="https://host:8787" value={s.url}
170
170
  onInput={e => s.url = (e.target as HTMLInputElement).value} />
171
- <input className={inputCss} type="password" placeholder="password (six words)" value={s.password}
172
- onInput={e => s.password = (e.target as HTMLInputElement).value} />
171
+ <div className={css.hbox(10).center}>
172
+ <input className={inputCss} type={s.showPassword ? "text" : "password"} placeholder="password (six words)" value={s.password}
173
+ onInput={e => s.password = (e.target as HTMLInputElement).value} />
174
+ <button className={css.fontSize(22).pad2(24, 12)} onClick={() => s.showPassword = !s.showPassword}>
175
+ {s.showPassword ? "Hide" : "Show"}
176
+ </button>
177
+ </div>
173
178
  {s.error ? <div className={css.fontSize(22).color("red").maxWidth("80vw")}>{s.error}</div> : null}
174
179
  {s.needsCert ? (
175
180
  <div className={css.vbox(10).center.fontSize(20).maxWidth(620).maxWidth("80vw").textAlign("center").color("hsl(0, 0%, 25%)")}>