@futo-org/backups-orchestrator-ui 0.10.0 → 0.11.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.
@@ -1,4 +1,5 @@
1
1
  import { defaults } from '../fetch-client';
2
+ import { formatDuration } from '../utils/format';
2
3
  import debounce from 'lodash.debounce';
3
4
  const formatErrorEvent = (event) => {
4
5
  const text = (typeof event.error === 'string' ? event.error : event.error?.message) ??
@@ -33,9 +34,9 @@ export function createLogObserver(logId) {
33
34
  case 'status': {
34
35
  state.status = {
35
36
  progress: event.percent_done,
36
- text: event.seconds_remaining
37
- ? `${event.seconds_remaining} seconds remaining`
38
- : '',
37
+ text: event.seconds_remaining && event.percent_done < 100
38
+ ? `${formatDuration(event.seconds_remaining * 1000)} remaining`
39
+ : 'Nearly done.',
39
40
  currentFiles: event.current_files ?? [],
40
41
  };
41
42
  flush();
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@futo-org/backups-orchestrator-ui",
3
3
  "repository": "https://github.com/immich-app/yucca",
4
4
  "description": "Backups orchestrator (UI library)",
5
- "version": "0.10.0",
5
+ "version": "0.11.0",
6
6
  "license": "Source First License 1.1",
7
7
  "files": [
8
8
  "dist",
@@ -64,7 +64,7 @@
64
64
  "lodash.debounce": "^4.0.8",
65
65
  "luxon": "^3.7.2",
66
66
  "socket.io-client": "^4.8.3",
67
- "@futo-org/backups-api-client": "^0.10.0"
67
+ "@futo-org/backups-api-client": "^0.11.0"
68
68
  },
69
69
  "scripts": {
70
70
  "dev": "vite dev --port 5174",