@shhhum/xftp-web 0.7.0 → 0.9.0

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,8 +6,8 @@
6
6
  <meta http-equiv="Content-Security-Policy"
7
7
  content="default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; worker-src 'self' blob:; style-src 'self' 'unsafe-inline'; connect-src 'self' https://xftp1.simplex.im:443 https://xftp2.simplex.im:443 https://xftp3.simplex.im:443 https://xftp4.simplex.im:443 https://xftp5.simplex.im:443 https://xftp6.simplex.im:443 https://xftp1.simplexonflux.com:443 https://xftp2.simplexonflux.com:443 https://xftp3.simplexonflux.com:443 https://xftp4.simplexonflux.com:443 https://xftp5.simplexonflux.com:443 https://xftp6.simplexonflux.com:443;">
8
8
  <title>SimpleX File Transfer</title>
9
- <script type="module" crossorigin src="/assets/index.js"></script>
10
- <link rel="stylesheet" crossorigin href="/assets/index.css">
9
+ <script type="module" crossorigin src="./assets/index.js"></script>
10
+ <link rel="stylesheet" crossorigin href="./assets/index.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="app"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shhhum/xftp-web",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "XFTP file transfer protocol client for web/browser environments",
5
5
  "license": "AGPL-3.0-only",
6
6
  "repository": {
package/web/download.ts CHANGED
@@ -54,12 +54,12 @@ export function initDownload(app: HTMLElement, hash: string) {
54
54
  }
55
55
 
56
56
  function showError(msg: string) {
57
- errorMsg.textContent = msg
57
+ errorMsg.innerHTML = msg
58
58
  showStage(errorStage)
59
59
  }
60
60
 
61
61
  dlBtn.addEventListener('click', startDownload)
62
- retryBtn.addEventListener('click', startDownload)
62
+ retryBtn.addEventListener('click', () => showStage(readyStage))
63
63
 
64
64
  async function startDownload() {
65
65
  showStage(progressStage)
package/web/upload.ts CHANGED
@@ -83,7 +83,9 @@ export function initUpload(app: HTMLElement) {
83
83
  if (fileInput.files?.[0]) startUpload(fileInput.files[0])
84
84
  })
85
85
  retryBtn.addEventListener('click', () => {
86
- if (pendingFile) startUpload(pendingFile)
86
+ pendingFile = null
87
+ fileInput.value = ''
88
+ showStage(dropZone)
87
89
  })
88
90
 
89
91
  function showStage(stage: HTMLElement) {
@@ -92,7 +94,7 @@ export function initUpload(app: HTMLElement) {
92
94
  }
93
95
 
94
96
  function showError(msg: string) {
95
- errorMsg.textContent = msg
97
+ errorMsg.innerHTML = msg
96
98
  showStage(errorStage)
97
99
  }
98
100