@putkoff/abstract-securefiles 0.0.52 → 0.0.53

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.
@@ -6,6 +6,9 @@ import { CopyButton } from "./CopyButton";
6
6
 
7
7
  const errText = (err: unknown) => (err instanceof Error ? err.message : String(err));
8
8
 
9
+ const UNIX_CMD = "pipx install abstract-securefiles && pipx ensurepath && ~/.local/bin/securefiles setup";
10
+ const WIN_CMD = "py -m pip install --user pipx; py -m pipx install abstract-securefiles; py -m pipx ensurepath";
11
+
9
12
  function ago(iso: string | null) {
10
13
  if (!iso) return "never";
11
14
  const secs = Math.max(0, (Date.now() - new Date(iso).getTime()) / 1000);
@@ -58,22 +61,40 @@ function AddComputer({ api, onPaired }: { api: SecureFilesApi; onPaired: () => v
58
61
  <h4>Connect a computer</h4>
59
62
  <ol className="sf-steps">
60
63
  <li>
61
- On that computer, install the agent (Linux, macOS or Windows with Python 3.9+):
62
- <div className="sf-row">
63
- <code className="sf-codeline">pipx install abstract-securefiles &amp;&amp; securefiles setup</code>
64
- <CopyButton text="pipx install abstract-securefiles && securefiles setup" label="Copy" />
64
+ On that computer, install the agent (needs Python 3.9+):
65
+ <div className="sf-os">
66
+ <b>Linux / macOS</b> (Terminal)
67
+ <div className="sf-row">
68
+ <code className="sf-codeline">{UNIX_CMD}</code>
69
+ <CopyButton text={UNIX_CMD} label="Copy" />
70
+ </div>
71
+ <span className="sf-muted">
72
+ No pipx? <code>python3 -m pip install --user pipx</code> then use <code>python3 -m pipx</code>. On a Mac
73
+ without Python, run <code>python3</code> once and accept Apple's developer-tools install.
74
+ </span>
75
+ </div>
76
+ <div className="sf-os">
77
+ <b>Windows</b> (PowerShell; install Python from python.org first)
78
+ <div className="sf-row">
79
+ <code className="sf-codeline">{WIN_CMD}</code>
80
+ <CopyButton text={WIN_CMD} label="Copy" />
81
+ </div>
82
+ <span className="sf-muted">Then open a new PowerShell window and run <code>securefiles setup</code>.</span>
65
83
  </div>
66
- <span className="sf-muted">No pipx? Use <code>python3 -m pip install --user abstract-securefiles</code> then <code>securefiles setup</code>.</span>
67
84
  </li>
68
85
  <li>
69
- In the panel that opens (<code>http://127.0.0.1:47821</code>), enter this code:
86
+ In the panel that opens (<code>http://127.0.0.1:47821</code>), enter this code, or run{" "}
87
+ <code>securefiles pair {code}</code>:
70
88
  <div className="sf-row">
71
89
  <span className="sf-paircode">{code}</span>
72
90
  <CopyButton text={code} label="Copy" />
73
91
  </div>
74
92
  <span className="sf-muted">Valid for about {minutesLeft} more minutes, once.</span>
75
93
  </li>
76
- <li>Pick the files and folders to share there. They appear here under <code>devices/&lt;computer&gt;/</code>.</li>
94
+ <li>
95
+ Pick files and folders to share in that panel (or <code>securefiles share PATH</code>). They appear here
96
+ under <code>devices/&lt;computer&gt;/</code>, where you set links, passwords and limits.
97
+ </li>
77
98
  </ol>
78
99
  <div className="sf-row">
79
100
  <button type="button" className="sf-btn" onClick={() => setCode(null)}>
package/src/styles.css CHANGED
@@ -478,3 +478,9 @@
478
478
  .sf-small {
479
479
  font-size: 12px;
480
480
  }
481
+ .sf-os {
482
+ display: flex;
483
+ flex-direction: column;
484
+ gap: 4px;
485
+ margin-top: 6px;
486
+ }