Commit Graph

42 Commits

Author SHA1 Message Date
Jarek Kowalski
a2afcb971d feat(kopiaui): support for desktop notifications (#4352) 2025-01-21 20:58:53 -08:00
dependabot[bot]
6235ba5c6b build(deps): bump the kopia-ui-npm-dependencies group across 1 directory with 9 updates + upgraded 'app' to ESM modules (#3978)
* build(deps): bump the kopia-ui-npm-dependencies group across 1 directory with 9 updates

Bumps the kopia-ui-npm-dependencies group with 7 updates in the /app directory:

| Package | From | To |
| --- | --- | --- |
| [electron-log](https://github.com/megahertz/electron-log) | `5.1.2` | `5.1.5` |
| [electron-store](https://github.com/sindresorhus/electron-store) | `8.2.0` | `10.0.0` |
| [electron-updater](https://github.com/electron-userland/electron-builder/tree/HEAD/packages/electron-updater) | `6.3.0-alpha.6` | `6.3.0-alpha.7` |
| [uuid](https://github.com/uuidjs/uuid) | `9.0.1` | `10.0.0` |
| [@electron/notarize](https://github.com/electron/notarize) | `2.3.0` | `2.3.2` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.42.1` | `1.45.1` |
| [electron](https://github.com/electron/electron) | `29.1.6` | `31.2.0` |



Updates `electron-log` from 5.1.2 to 5.1.5
- [Changelog](https://github.com/megahertz/electron-log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/megahertz/electron-log/compare/v5.1.2...v5.1.5)

Updates `electron-store` from 8.2.0 to 10.0.0
- [Release notes](https://github.com/sindresorhus/electron-store/releases)
- [Commits](https://github.com/sindresorhus/electron-store/compare/v8.2.0...v10.0.0)

Updates `electron-updater` from 6.3.0-alpha.6 to 6.3.0-alpha.7
- [Release notes](https://github.com/electron-userland/electron-builder/releases)
- [Changelog](https://github.com/electron-userland/electron-builder/blob/master/packages/electron-updater/CHANGELOG.md)
- [Commits](https://github.com/electron-userland/electron-builder/commits/electron-updater@6.3.0-alpha.7/packages/electron-updater)

Updates `uuid` from 9.0.1 to 10.0.0
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.1...v10.0.0)

Updates `@electron/notarize` from 2.3.0 to 2.3.2
- [Release notes](https://github.com/electron/notarize/releases)
- [Changelog](https://github.com/electron/notarize/blob/main/.releaserc.json)
- [Commits](https://github.com/electron/notarize/compare/v2.3.0...v2.3.2)

Updates `@playwright/test` from 1.42.1 to 1.45.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.42.1...v1.45.1)

Updates `electron` from 29.1.6 to 31.2.0
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v29.1.6...v31.2.0)

Updates `playwright` from 1.42.1 to 1.45.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.42.1...v1.45.1)

Updates `playwright-core` from 1.42.1 to 1.45.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.42.1...v1.45.1)

---
updated-dependencies:
- dependency-name: electron-log
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron-store
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron-updater
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: "@electron/notarize"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: playwright-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* upgraded app to ES modules

* renamed notarize.js and sign.js to CommonJS

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Kowalski <jaak@jkowalski.net>
2024-07-13 02:31:41 +00:00
dependabot[bot]
44f5767fb1 build(deps): bump the kopia-ui-npm-dependencies group in /app with 10 updates (#3704)
* build(deps): bump the kopia-ui-npm-dependencies group

Bumps the kopia-ui-npm-dependencies group in /app with 10 updates:

| Package | From | To |
| --- | --- | --- |
| [electron-is-dev](https://github.com/sindresorhus/electron-is-dev) | `2.0.0` | `3.0.1` |
| [electron-log](https://github.com/megahertz/electron-log) | `5.0.3` | `5.1.1` |
| [electron-updater](https://github.com/electron-userland/electron-builder/tree/HEAD/packages/electron-updater) | `6.1.7` | `6.1.8` |
| [semver](https://github.com/npm/node-semver) | `7.5.4` | `7.6.0` |
| [@electron/notarize](https://github.com/electron/notarize) | `2.2.1` | `2.3.0` |
| [@playwright/test](https://github.com/microsoft/playwright) | `1.40.1` | `1.42.1` |
| [dotenv](https://github.com/motdotla/dotenv) | `16.3.1` | `16.4.5` |
| [electron](https://github.com/electron/electron) | `28.1.0` | `29.1.0` |
| [playwright](https://github.com/microsoft/playwright) | `1.40.1` | `1.42.1` |
| [playwright-core](https://github.com/microsoft/playwright) | `1.40.1` | `1.42.1` |


Updates `electron-is-dev` from 2.0.0 to 3.0.1
- [Release notes](https://github.com/sindresorhus/electron-is-dev/releases)
- [Commits](https://github.com/sindresorhus/electron-is-dev/compare/v2.0.0...v3.0.1)

Updates `electron-log` from 5.0.3 to 5.1.1
- [Changelog](https://github.com/megahertz/electron-log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/megahertz/electron-log/compare/v5.0.3...v5.1.1)

Updates `electron-updater` from 6.1.7 to 6.1.8
- [Release notes](https://github.com/electron-userland/electron-builder/releases)
- [Changelog](https://github.com/electron-userland/electron-builder/blob/master/packages/electron-updater/CHANGELOG.md)
- [Commits](https://github.com/electron-userland/electron-builder/commits/electron-updater@6.1.8/packages/electron-updater)

Updates `semver` from 7.5.4 to 7.6.0
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.5.4...v7.6.0)

Updates `@electron/notarize` from 2.2.1 to 2.3.0
- [Release notes](https://github.com/electron/notarize/releases)
- [Changelog](https://github.com/electron/notarize/blob/main/.releaserc.json)
- [Commits](https://github.com/electron/notarize/compare/v2.2.1...v2.3.0)

Updates `@playwright/test` from 1.40.1 to 1.42.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.40.1...v1.42.1)

Updates `dotenv` from 16.3.1 to 16.4.5
- [Changelog](https://github.com/motdotla/dotenv/blob/master/CHANGELOG.md)
- [Commits](https://github.com/motdotla/dotenv/compare/v16.3.1...v16.4.5)

Updates `electron` from 28.1.0 to 29.1.0
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v28.1.0...v29.1.0)

Updates `playwright` from 1.40.1 to 1.42.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.40.1...v1.42.1)

Updates `playwright-core` from 1.40.1 to 1.42.1
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.40.1...v1.42.1)

---
updated-dependencies:
- dependency-name: electron-is-dev
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron-log
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron-updater
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: semver
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: "@electron/notarize"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: dotenv
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: playwright-core
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>

* removed dependency on electron-is-dev

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Kowalski <jaak@jkowalski.net>
2024-03-04 22:00:17 -08:00
Till Riedel
c6536dfdaf fix(kopiaui): Add timeout in pollOnce https.request equal to poll interval (#3055)
Co-authored-by: Jarek Kowalski <jaak@jkowalski.net>
2024-02-20 21:23:28 -08:00
Christoph Anderson
1d0f31f32e fix(kopiaui): Fix missing window when external displays are detached (#3336)
* - Fixed missing window in cases where external
displays were detached
- Maximize the window now works as expected

* Dummy commit

* Another dummy commit

* Comment out another section

* Another try

* Another one

* Should now finish

* Add hash of display configuration

* Restoring window state based on a configuration

---------

Co-authored-by: lupusA <lupuapps@gmail.com>
2023-09-24 18:29:06 -07:00
Christoph Anderson
1f70992d2e fix(kopiaui): Workaround for wrong window bounds in multi display environments (#3315)
when different scales are used.

Co-authored-by: lupusA <lupuapps@gmail.com>
2023-09-17 12:13:10 -07:00
Jarek Kowalski
6d513ea00a fix(kopiaui): fixed opening file browser for mounted directories (#3307) 2023-09-16 09:53:04 -07:00
Christoph Anderson
a4eeed93cb feat(kopiaui): Retain window size and location after close (#3302)
* Minor refactoring. Added electron-store as a
new dependency. Electron windows now store their size.

* Removed package.json and package-lock.json

* Update electron.js

fixed typos

---------

Co-authored-by: lupusA <lupuapps@gmail.com>
Co-authored-by: Jarek Kowalski <jaak@jkowalski.net>
2023-09-16 16:19:56 +00:00
Robert Sammelson
46d5e0a24c fix: mac tray icon (#3170) 2023-07-22 12:53:23 -07:00
Julio Lopez
9a9048c121 breaking(cli): remove default behavior for CLI command (#2861)
* breaking(cli): remove default behavior for `snapshot` command

command: snapshot
default-subcommand: create

* breaking(cli): remove default behavior for `cache` command

command: cache
default-subcommand: info

* breaking(cli): remove default behavior for `index` command

command: index
default-subcommand: list

* breaking(cli): remove default behavior for `maintenance` command

command: maintenance
default-subcommand: run

* breaking(cli): remove default behavior for `manifest` command

command: manifest
default-subcommand: list

* breaking(cli): remove default behavior for `repository upgrade` command

command: repository upgrade
default-subcommand: begin

* breaking(cli): remove default behavior for `server` command

command: server
default-subcommand: start
2023-04-09 01:34:36 +00:00
Jarek Kowalski
91a3e9b4b0 fix(kopiaui): fixed '<starting up>' in the tray menu. (#2813)
The fix is to use `127.0.0.1` instead of `localhost` when starting the
server and polling for the server status.

This resolves an issue where KopiaUI can't connect to the server
which only listens on IPv4 localhost (127.0.0.1) but the Javascript
client prefers IPv6 (::1) and fails to connect.
2023-03-12 21:43:04 +00:00
Jarek Kowalski
09575943f8 test(ui): added minimal automated KopiaUI test (#2434)
* test(ui): added minimal automated KopiaUI test

```
$ make kopia-ui-test
```

This currently executes super minimal E2E test on pre-built KopiaUI
using Playwright https://playwright.dev

* better os/arch detection

* remove unwanted log

* fixed executable path on linux

* fix for linux, misc
2022-09-23 17:37:36 -07:00
Jarek Kowalski
0f680cd24e fix(ui): fixed missing directory browser button in KopiaUI (#2155)
Fixes #2145
2022-07-07 01:40:51 +00:00
basldfalksjdf
bc0e0641bf fix(ui): "Kopia UI" to "KopiaUI" (#2140)
Just removing the extra space
2022-07-06 18:18:22 -07:00
Jarek Kowalski
436933caa1 feat(kopiaui): support both left and right click to open tray menu (#1805)
* feat(kopiaui): support both left and right click to open tray menu

Fixes #1798

* feat(kopiaui): show all repository windows on double click
2022-03-06 21:09:01 -08:00
Jarek Kowalski
353e8b1ff4 feat(kopiaui): provide feedback for 'Check For Updates Now' (#1804)
Fixes #1797
2022-03-06 20:25:27 -08:00
Jarek Kowalski
fd163cfc20 feat(kopiaui): connect to repository asynchronously on startup (#1691)
This allows KopiaUI server to start when the repository directory
is not mounted or otherwise unavailable. Connection attempts will
be retried indefinitely and user will see new `Initializing` page.

This also exposes `Open` and `Connect` as tasks allowing the user to see
logs directly in the UI and cancel the operation.
2022-01-29 18:28:52 -08:00
Jarek Kowalski
32d95145b1 feat(kopiaui): added menu option prompting users to manually upgrade when auto-update fails (#1655)
Temporary workaround for #1630
2022-01-13 19:35:23 -08:00
Jarek Kowalski
2e9a57f0b4 server: support for server control APIs and tooling (#1644)
This adds new set of APIs `/api/v1/control/*` which can be used to administratively control a running server.

Once the server is started, the administrative user can control it
using CLI commands:

export KOPIA_SERVER_ADDRESS=...
export KOPIA_SERVER_CERT_FINGERPRINT=...
export KOPIA_SERVER_PASSWORD=...

* `kopia server status` - displays status of sources managed by the server
* `kopia server snapshot` - triggers server-side upload of snapshots for managed sources
* `kopia server cancel` - cancels upload of snapshots for managed sources
* `kopia server pause` - pauses scheduled snapshots for managed sources
* `kopia server resume` - resumes scheduled snapshots for managed sources
* `kopia server refresh` - causes server to resynchronize with externally-made changes, such as policies or new sources
* `kopia server flush` - causes server to flush all pending writes
* `kopia server shutdown` - graceful shutdown of the server

Authentication uses new user `server-control` and is disabled
by default. To enable it when starting the server, provide the password
using one of the following methods:

* `--server-control-password`
* `--random-server-control-password`
* `.htpasswd` file
* `KOPIA_SERVER_CONTROL_PASSWORD` environment variable

This change allows us to tighten the API security and remove some
methods that UI user was able to call, but which were not needed.
2022-01-03 18:48:38 -08:00
Jarek Kowalski
56cd086f92 kopia-ui: improved auto-update experience (#1390) 2021-10-14 23:21:07 -07:00
Jarek Kowalski
0773af775d kopia-ui: always show default repository at the top of the list (#1349)
Also disable annoying behavior where we open all repository windows
on double click.
2021-10-03 12:04:17 -07:00
Jarek Kowalski
36027d7131 ui: fixed directory selector and browse buttons (#1310) 2021-09-21 18:51:24 -07:00
Jarek Kowalski
6c83cc6a21 ui: upgraded all NPM dependencies for htmlui/ and app/ (#1278) 2021-09-06 17:04:30 -07:00
Jarek Kowalski
132e2eef50 New snapshot UX - streamlined snapshot creation and policy setting (#878)
* uitask: added support for reporting string progress info

* server: report current directory as task progress

* snapshot: created reusable Estimate() method to be used during upload, cli estimate and via API

* cli: switched to snapshotfs.Estimate()

* server: added API to estimate snapshot size

* kopia-ui: fixed directory selector

* htmlui: streamlined new snapshot flow and cleaned up policy setting

See https://youtu.be/8p6csuoB3kg
2021-03-10 23:04:55 -08:00
Jarek Kowalski
5240f62e47 Auto shutdown fix (#834)
* server: removed auto-shutdown option

* server: added --shutdown-on-stdin which will shutdown server when stdin is closed. used by kopia-ui
2021-02-13 19:49:32 -08:00
Jarek Kowalski
7d8a4237ba Upgrade electron 11.2.1 (#817)
* app: update electron to 11.2.1

* app: compat fixes after upgrade
2021-02-03 20:00:40 -08:00
Jarek Kowalski
6a63c207a4 Upgraded Node and all NPM dependencies to latest versions (#793)
* htmlui: upgraded all NPM dependencies to latest versions

* app: upgraded all NPM dependencies to latest versions

* tools: upgraded node to 14.15.4 LTS

* app: fixed deprecated methods
2021-01-23 18:40:50 -08:00
Jarek Kowalski
3b87902433 Kopia UI improvements for repository management (#592)
* cli: added --tls-print-server-cert flag

This prints complete server certificate that is base64 and PEM-encoded.

It is needed for Electron to securely connect to the server outside of
the browser, since there's no way to trust certificate by fingerprint.

* server: added repo/exists API

* server: added ClientOptions to create and connect API

* server: exposed current-user API

* server: API to change description of a repository

* htmlui: refactored connect/create flow

This cleaned up the code a lot and made UX more obvious.

* kopia-ui: simplified repository management UX

Removed repository configuration window which was confusing due to
the notion of 'server'.

Now KopiaUI will automatically launch 'kopia server --ui' for each
config found in the kopia config directory and shut it down every
time repository is disconnected.

See https://youtu.be/P4Ll_LR4UVM for a quick demo.

Fixes #583
2020-09-07 08:00:19 -07:00
Jarek Kowalski
bc0df1e58e app: removed extra 'v' from KopiaUI window captions 2020-07-31 22:35:20 -07:00
Jarek Kowalski
52e763158b kopia-ui: fixed missing 'log' when clicking 'Launch At Startup' 2020-07-21 22:12:52 -07:00
Jarek Kowalski
73ed5adb01 kopia-ui: cleaned up console logging 2020-07-18 14:11:33 -07:00
Jarek Kowalski
200ef57cf7 app: portability fixes (#431)
- create default config in portable mode
- override userData to make sure cached data is written outside of
%APPDATA%
2020-05-03 12:20:29 -07:00
Jarek Kowalski
057c2789d8 Kopia UI: support for multiple repositories + portability (#398)
* server: when serving HTML UI, prefix the title with string from KOPIA_UI_TITLE_PREFIX envar

* kopia-ui: support for multiple repositories + portability

This is a major rewrite of the app/ codebase which changes
how configuration for repositories is maintained and how it flows
through the component hierarchy.

Portable mode is enabled by creating 'repositories' subdirectory before
launching the app.

on macOS:
  <parent>/KopiaUI.app
  <parent>/repositories/

On Windows, option #1 - nested directory
  <parent>\KopiaUI.exe
  <parent>\repositories\

On Windows, option #2 - parallel directory
  <parent>\some-dir\KopiaUI.exe
  <parent>\repositories\

In portable mode, repositories will have 'cache' and 'logs' nested
in it.
2020-04-04 17:18:37 -07:00
badrelmers
73e21e0129 correct a typo in kopia UI
solve https://github.com/kopia/kopia/issues/366
2020-03-19 07:44:32 -07:00
Jarek Kowalski
e6fe1aa7f3 kopia-ui: misc
- launch server on a randomized port
- added support for connecting to remote server
- embedded version info in the app and htmlui
2020-03-05 18:40:03 -08:00
Jarek Kowalski
38862a7bf9 kopia-ui: fixed redirection to /repo not working (404) 2020-02-29 21:55:06 -08:00
Jarek Kowalski
9079418c7c kopia-ui: simplified handling of Mac menu bar 2020-02-26 21:42:15 -08:00
Jarek Kowalski
5412d75f79 htmlui: approaching usability by mere mortals
- added ability to make new snapshots from the UI
- added directory picker
- hide/show macOS dock icon automatically
- fixed copy/paste on Mac (apparently if you don't have 'Edit' menu
  in your app, copy/paste and many other shortcut keys simply don't
  work)
- added smart time formatting ("X minutes ago", etc.) in lists
  using 'moment' library
- added progress information to snapshots
2020-02-22 20:03:57 -08:00
Jarek Kowalski
1e3100a88b Misc Kopia UI changes:
- disabled MacOS dock icon
- cleaned up MacOS menu bar
- added retry when opening main window, which is unavailable shortly
  after starting up server
- open main window on first run
- retry checking for updates every 24h
- fixed bug preventing Repository tab from finishing loading
- updated to latest package versions
2020-02-20 22:53:34 -08:00
Jarek Kowalski
98f1b26f39 kopia-ui: support for auto-update and publishing prerelease binaries from Travis to kopia/kopia-ui-release 2020-02-19 23:08:12 -08:00
Jarek Kowalski
758dbccd01 kopia-ui: UI/API server security (TLS & base auth)
This automatically launches Kopia CLI with new flags:

`--tls-generate-cert` which generates in-memory TLS certs for the server
and prints its fingerprint to stderr.

`--random-password` which sets up random base auth password

KopiaUI will then listen to the stderr messages and parse the cert
fingerprint and password and automatically provide them in the browser
it opens to show the UI.

This ensures that any local process (or script in a browser, etc.)
other than KopiaUI itself won't have access to the server API nor
UI because they won't know the ephemeral random password and won't
be able to intercept it due to TLS protection.
2020-02-05 17:08:47 -08:00
Jarek Kowalski
c3ead4bc3e Kopia UI: added desktop app shell based on Electron that runs in the tray (#183)
* app: added desktop app shell based on Electron that runs in the tray, starts a background kopia server and allows access to the UI

* icons: updated icons for the app

* htmlui: flexible containers
2020-02-01 11:58:22 -08:00