Compare commits

...

98 Commits

Author SHA1 Message Date
shivansh02 f252a8ec6a hide password field if encryption is none 2024-05-31 16:58:12 +01:00
Parnassius 6b5f7a7aac
Keep the profile list sorted when adding profiles. By @Parnassius (#1986) 2024-05-25 14:00:51 +01:00
Manu 9cabbbd193 Input to change macOS version for building 2024-04-08 16:24:31 +01:00
Aryaman Sharma 3268bf1599
Notify after post_backup_tasks. By @TheLazron (#1940) 2024-04-07 18:05:04 +01:00
Manu 7642002573 Fix stalebot config 2024-04-07 08:40:45 +01:00
Sam 58137f004d
Add new exclusion presets (#1970) 2024-04-06 22:35:31 +01:00
Parnassius 9b8dbcecfb
Sort profiles in the Backup Now tray menu (#1899)
The profile list in the main window is already sorted by name (alphabetically, case-sensitive). However the profile list in the *Backup Now* action found in the tray menu wasn't. This commit constructs the sql query to return the profiles in order.

* src/vorta/tray_menu.py
2024-04-01 21:00:53 +02:00
Adwait bde55188e4
Disabled "Collapse" button in "Flat" view (#1855)
Our `DiffResultDialog` and `ExtractDialog` show a context menu for items of the list/tree view. The collapse action in this menu only makes sense for the tree mode of the view. This commit therefore enables the option only for this view mode.

* src/vorta/views/extract_dialog.py
* src/vorta/views/diff_result.py

* tests/unit/test_diff.py : Add tests for the new behaviour.
* tests/unit/test_extract.py
2024-04-01 16:37:58 +02:00
Shivansh Singh d721011c90
VSC and Android exclusion patterns. By @shivansh02 (#1967) 2024-03-15 11:51:42 +00:00
Shivansh Singh b2cf5b1fc9
Move log file link below logs table. By @shivansh02 (#1939) 2024-02-21 20:11:45 +00:00
Shivansh Singh 472c7c8996
Fix About dialog wording and year. By @shivansh02 (#1936)
* fix: about dialogue grammar and copyright year
* fix: made about dialogue copyright year dynamic
2024-02-14 11:35:33 +00:00
Hofer-Julian d8cce255eb
Add developer name to appdata (#1922)
* Add developer name to appdata

Flathub is getting more and more strict when it comes to metadata.
I've added "Vorta developers" no, I can also be more specific if people prefer that.

* Update com.borgbase.Vorta.appdata.xml
2024-02-08 11:29:14 +00:00
Jeff Ramnani 634f984e78
Improve metered connection detection for macOS. By @jramnani (#1902)
* Add dependency for pyobjc-CoreWLAN on darwin

* Rename existing implementation with Android

The current implementation was tested with Android, but does not work
with iOS.

Move the existing implementation and include android in the name to make
room for adding a new iOS metered connection detection strategy.

* get_current_wifi works with objc

Switch from using command line tools to using the Objective-C Cocoa API
to get the Wi-Fi status information.

Cocoa has an API to specifically check whether a Wi-Fi connection is
using a Personal Hotspot on iOS.

I'm using a private method to get the Wi-Fi interface object in Cocoa.
The reason for this is that cleaning up mocks on PyObjC/ObjC objects is
much harder than mocking out methods on objects in our control. Using
test doubles also let's me check for different states the Wi-Fi network
could be in.

* get_known_wifis works on darwin

Use the networksetup command on macOS to get the list of the user's
Wi-Fi networks.

  networksetup -listpreferredwirelessnetworks bsd_device

It looks like this command and option has existed on macOS since at
least 2013.

Also add some type annotations around the PyObjC return values to help
the reader know what they're dealing with at each step.

* Add test for get_current_wifi when wifi is off

The user might have Wi-Fi turned off. Account for that use case.

* Add iOS Personal Hotspot support to is_network_metered

The DarwinNetworkManager can now determine if the user is connected to
a Personal Hotspot Wi-Fi network from iOS.

Account for whether the user has Wi-Fi turned on and off.

* Refactor to avoid deprecated API in Cocoa

According to Apple's developer documentation, creating CWInterface
objects directly are discouraged. Instead, they prefer to use
CWInterface objects created by CWWiFiClient.

This also happens to be more compliant with Apple's application sandbox.
Creating CWInterface objects directly accesses raw BSD sockets which is
not allowed in the sandbox.

More details here:
https://developer.apple.com/documentation/corewlan/cwinterface

* Add test case for blank Wi-Fi network name

I have one of these in my list of networks in Vorta. And this also
covers a missing branch in get_known_wifis.

* Move private method below public methods

This is to provide a little more clarity. Especially since this class is
subclassing another one.

* Account for when there is no wifi interface

When a Mac does not have a Wi-Fi interface, CWWiFiClient.interface() can
return None.

Update the type annotation to mark it as Optional, and account for the
null condition in the other methods.

* Fix type annotation error

The CI tests failed on python 3.8.

I used the wrong type annotation to describe a list of SystemWifiInfo's.

The tests now pass for me when I run 'make test-unit' using a python 3.8
interpreter.

* Fix linter issue with imports
2024-02-02 12:05:47 +00:00
Hofer-Julian 0cc15e3d3d
Update appdata.xml (#1885)
The appdata.xml doesn't pass validation of flathub

1. The `launchable` tag is nowadays required
2. Flatpak doesn't like the beta releases. In the end, it only made sense to remove them from the xml
2024-01-25 11:06:56 +01:00
Manu 4665972076
Fix issue after Qt6 migration to save allowed Wifis (#1903) 2024-01-20 10:26:06 +00:00
Manu 9cc7a98838 Minor: color settings icon 2024-01-11 08:27:25 +00:00
Manu 1d85cb48dc Bump version to v0.9.1 2024-01-10 13:20:01 +00:00
Manu be6e08552a
Update screencast for v0.9 (#1881) 2024-01-10 13:11:38 +00:00
TW 675010e401
Random cleanups by @ThomasWaldmann (#1879)
* fix PEP8 E721

do not compare types, for exact checks use `is` / `is not`, for instance checks use `isinstance()`

* remove redundant parentheses

* fix SiteWorker.run for empty job queue

local variable job is not assigned if queue was empty
when calling .run(), but it is used in exception handler.

* remove unreachable code in parse_diff_lines

* bug fix for unreachable code in is_worker_running

the code intended to check if *any* worker is running for
any site was *unreachable*.

this caused false negative results for site=None.

* check_failed_response: remove outdated part of docstring

* pull request template: fix relative path to LICENSE.txt

* fix typos

* use logger.warning, .warn is deprecated
2024-01-09 08:06:48 +00:00
Manu 1f062359d8 Minor: include exclusion presets for macos package 2023-11-30 11:34:03 +00:00
Manu 3fdc4eca3c Bump version to v0.9.1-beta3 2023-11-30 07:09:49 +00:00
Manu b502fc3fd3
Exclude GUI. By @diivi (#1846) 2023-11-24 21:19:28 +00:00
Adwait c9f170aecf
Backup settings.db before migrations. By @AdwaitSalankar (#1848) 2023-11-24 15:29:28 +00:00
Stefano Rivera 98b64621c2
Loosen platformdirs dependency (#1843)
4.x is backwards compatible with 3.x except that site_cache_dir has
moved to /var/cache. Vorta doesn't use this.

https://github.com/platformdirs/platformdirs/releases/tag/4.0.0
2023-11-14 15:54:20 +00:00
Manu b3550991e3 Bump version to v0.9.1-beta2 2023-10-27 13:39:42 +01:00
Manu 4c7b119b3e Minor: add missing notarization env var 2023-10-27 12:07:59 +01:00
Manu 8d0870ea3b
Update macOS notarization for use with notarytool (#1831) 2023-10-24 11:37:40 +01:00
Ted Lawson 071dd86ded
Profile sidebar and new setting interface. By @bigtedde (#1809) 2023-10-24 09:36:50 +01:00
Ted Lawson 60f9fc27b4
Unit test improvements and coverage increase. By @bigtedde (#1787) 2023-10-01 09:19:39 +01:00
Manu c807f93faf Bump version to v0.9.1-beta1 2023-09-27 11:20:55 +01:00
Ted Lawson 15fa46ff85
Improve SSH key process. By @bigtedde (#1802) 2023-09-26 14:22:54 +01:00
Ted Lawson cff00ad8e1
Add '.log' suffix to log files. By @bigtedde (#1710) 2023-09-25 22:51:17 +01:00
Ted Lawson 43140beda1
Refactor archive context menu. By @bigtedde (#1793) 2023-09-19 11:09:55 +01:00
Pradyot Ranjan 3573bdbc78
Minor: README type. By @prady0t (#1822) 2023-09-19 10:02:47 +01:00
Ted Lawson 4350f78de5
Prevent borg operation while renaming. By @bigtedde (#1791) 2023-09-11 20:29:07 +01:00
Sam 7d2b3634f1
Changed label and tooltip for startup setting of Vorta (#1804)
This makes the setting easier to comprehend and removes ambiguity between the autostart setting.

* modifed foreground label and tooltip
2023-09-09 07:18:09 +00:00
Sam 8c82c4069d
Changed title of adding `new repo` and `existing repo`. By @SAMAD101 (#1810) 2023-09-06 09:48:55 +02:00
Ted Lawson 567a3546ae
Reduce number of tests. By @bigtedde (#1780) 2023-08-21 20:31:51 +01:00
Ted Lawson e5c9b2245a
Improve import/export feature test coverage. By @bigtedde (#1774) 2023-08-17 18:05:42 +01:00
jetchirag 3bfa78bf04
Fix health indicator always being green in extract view.
Fixes #1776. Now the indicator is red for unhealthy files.

* src/vorta/views/extract_dialog.py (ExtractTree.data): Set red instead of green colour for unhealthy files.
2023-08-17 18:49:17 +02:00
Ted Lawson 2caa093541
Source tab test improvements. By @bigtedde (#1772) 2023-08-17 11:09:00 +01:00
Ted Lawson 81920ea3f0
Repo test improvements. By @bigtedde (#1771) 2023-08-17 11:08:03 +01:00
Ted Lawson e85ec38c65
Add diff tests. By @bigtedde (#1770) 2023-08-17 11:06:36 +01:00
Ted Lawson ee71bcae9a
DRY tests, increase coverage. By @bigtedde (#1769) 2023-08-17 11:05:52 +01:00
Ted Lawson fb42614524
Add test utility functions (#1768) 2023-08-17 11:04:33 +01:00
Divyansh Singh 30c572250f
Inline archive renaming. By @diivi (#1734) 2023-08-15 12:38:51 +01:00
Manu 92f285f623
Add full font licenses, add Google icons to README. (#1740) 2023-08-13 19:53:12 +01:00
Ted Lawson b58ffb6aed
Setting for number format in archive tab. By @bigtedde (#1719) 2023-08-11 12:22:10 +01:00
jetchirag b015368fee
Integration Tests for Borg (#1716)
Move existing tests into subfolder `tests/unit`. Write integration tests that actually run the installed borg executable. Those tests can be found in `tests/integration`.  Those pytest fixtures that are the same for both kinds of tests remain in `tests/conftest.py`. The others can be found in `tests/integration/conftest.py` or `tests/unit/conftest.py`. This adds nox to the project and configures it to run the tests with different borg versions. This also updates the ci workflow to run the integration tests using nox.

* noxfile.py : Run pytest with a matrix of borg versions OR a specific borg version

* Makefile : Run using nox. Add phonies `test-unit` and `test-integration`.

* tests/conftest.py : Move some fixtures/functions to `tests/unit/conftest.py`.

* tests/test_*.py --> tests/unit/ : Move unittests and assets into subfolder

* tests/integration/ : Write integration tests.

* requirements.d/dev.txt: Add `nox` and `pkgconfig`. The latter is needed for installing new borg versions.

* .github/actions/setup/action.yml : Update to install pre-commit and nox when needed. The action now no longer installs Vorta.

* .github/actions/install-dependencies/action.yml : Install system deps of borg with this new composite action.

* .github/workflows/test.yml : Rename `test` ci to `test-unit` and update it for the new test setup.
                                              Implement `test-integration` ci.

Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
2023-08-05 13:49:45 +00:00
Sam 0e37e1cf90
Correct homebrew path on arm macOS. By @sammcj (#1760) 2023-07-30 21:22:28 +01:00
jetchirag 25b4cc0b8b
Introduced password input widget (#1662)
Move existing code for password input widgets into common classes to increase maintainability and reusability alongside reducing redundancy. This implements a `PasswordLineEdit` that can show a red border when an invalid password is entered. It also features a button for showing/hiding the password entered. When combining two of these entries for setting a new password `PasswordInput` can be used from now on. It combines a form for entering and confirming a password with a label to show a message when there is an issue with the password. It also checks the entered password against some rules regarding its length. This PR replaces existing widgets for entering passwords with these two new widgets.

* src/vorta/views/partials/password_input.py : Implement common input widgets/classes

* src/vorta/views/repo_add_dialog.py : Use new widgets.
* src/vorta/assets/UI/repoadd.ui : ^^^
2023-07-28 07:39:10 +00:00
Divyansh Singh 157ac373a9
Run actions on multiple archives. By @diivi (#1723) 2023-07-05 11:28:09 +01:00
yfprojects ec1dfcd803
Add profile name to error notification. (#1728)
In a similar fashion like #1637 the commit adds the profile name to the error notification.

* src/vorta/scheduler.py

Co-authored-by: herrwusel <herrwusel@noreply.github.com>
2023-06-28 19:25:08 +00:00
Punyam Singh d087654eb3
Update GSoC notice in README (#1739)
* README.md
2023-06-27 09:30:41 +00:00
Manu 50be34cabe
Use maintained stale action (#1737) 2023-06-25 21:53:29 +01:00
Divyansh Singh 92608f9eaa
Assign names to repos. By @diivi (#1665) 2023-06-24 20:57:46 +01:00
Divyansh Singh f76195e47d
Disable compact button for older borg versions. By @diivi (#1727) 2023-06-23 20:20:23 +01:00
Divyansh Singh c56c6700ca
Show trigger (user/scheduled) in Archive tab. By @diivi (#1732) 2023-06-23 14:21:54 +01:00
Manu 210a968f91
Replace CC-BY Vaadin icon (#1735) 2023-06-21 09:09:38 +01:00
Manu 70ad554e03
Replace Font Awesome icons with Fork Awesome and others (#1729) 2023-06-19 08:16:37 +01:00
ratchek 2cb9afd4d5
Add a dev mode that allows for local storing of config files and logs (#1682)
Allows vorta to be called with the command-line flag `--development` or `-D` that will make it use a directory in the project tree to store all the settings, logs, and cache. This default directory will be called `.dev_config` and placed in the projects root.
Also allows for a custom directory path allowing for multiple "configuration" folders at once.
This can be used to prevent the vorta instance that a developer is working on from accessing the configuration files that they have set up for their personal backups.

* .gitignore : Add `.dev_config`.

* src/vorta/utils.py (parse_args): Add `--development` flag. The default will be `DEFAULT_DIR_FLAG`.

* src/vorta/utils.py : Add `DEFAULT_DIR_FLAG`.

* src/vorta/config.py : Add methods for populating the config directories exposed by this module.

* src/vorta/__main__.py (main): Handle `--development` flag and update config directories if its specified.

* Access config constants through the `config` module instead of importing them directly with `from .config import`.

---------
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-05-30 10:43:20 +00:00
yfprojects 5a3a7cf58e
Run pre-commit in lint ci and polish ci setup. (#1712)
Fix phonies in Makefile and run pre-commit for lint target.
Instead of running black, flake8 and ruff the lint phony now runs pre-commit which has these tools configured as hooks.

* Makefile

Define common composite action for setting up pre-commit and python.

* .github/actions/setup/action.yml

* .github/workflows/test.yml

Update codecov/codecov-action used in test ci to v3.

* .github/workflows/test.yml
2023-05-28 15:41:58 +00:00
Aaditya Sinha d7634e8719
Clear contents of `log_text` after successfull backup (#1626)
Currently the label `logText` is not cleared after a borg command finished. When creating a backup the label will show the path of the last backuped file even after backup completion.

This changes that and clears `logText` after the backup.

* src/vorta/borg/create.py (BorgCreateJob.process_result)

---------

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-05-18 19:29:59 +00:00
real-yfprojects 82270adf4f
Add re-format with ruff to `.git-blame-ignore.revs`.
* .git-blame-ignore-revs
2023-05-01 10:30:01 +02:00
real-yfprojects 24e1dd5c56
Run pre-commit (with newly added ruff) on code base.
Includes all changes by `pre-commit --all-files` including the changes introduced by ruff.
2023-05-01 10:28:11 +02:00
Divyansh Singh f0a5a36275
ci: Add ruff including print checks
Adds ruff replacing isort. Ruff comes with all flake8 rules and additional rules for print statements.

* .github/workflows/test.yml : Replace isort with ruff in comment

* .editorconfig : Update `yml` config to apply to all yaml files.

* Makefile (lint): Run ruff, remove isort

* .pre-commit-config.yaml : Remove isort, run ruff

* pyproject.toml : Configure ruff. Remove isort config.

* requirements.d/dev.txt : Add ruff, remove isort

* setup.cfg : Extend flake8 file ignore

* src/vorta/__main__.py : Add *noqa* for print statement.
2023-05-01 10:25:14 +02:00
Manu 4d65912d65
Fix pyobjc imports, bump minimum Python version (#1698) 2023-04-29 12:26:01 +01:00
Manu 20b7b4936c
hostname and fqdn template var consistent with Borg (#1697) 2023-04-17 22:14:19 +01:00
i1sm3ky 7535f92ac8
PyQt6 Upgrade (#1685)
This puts Vorta on PyQt6 and starts a new main branch 0.9.

---------

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-04-17 11:17:01 +01:00
Hofer-Julian 8571ef6cb8 Remove paramiko from dependencies 2023-04-09 16:00:55 +01:00
Manu 7c1b9535b2 Bump version to v0.8.11 2023-04-09 14:44:24 +01:00
Divyansh Singh b51b1ef85e
Save list view as setting. By @diivi (#1621)
* feat: add a setting for files list views

* separate logic from data class

* make mode optional

* rename display mode methods

* refactor

* move code above connect signals comment

* reorder code

---------

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
2023-04-05 12:20:42 +01:00
yfprojects 828e02953b
Use `pf` pattern format for extract. By @real-yfprojects (#1625)
* src/vorta/borg/extract.py : The pattern file passed to borg now contains `pf`-style patterns for included paths.
2023-04-05 12:08:06 +01:00
jetchirag 6d5e738107
Retain source tab sort settings. By @jetchirag (#1649) 2023-04-04 13:18:50 +01:00
bigtedde a64493d254
Setting for Full Disk Access check. By @bigtedde (#1653) 2023-04-04 12:49:34 +01:00
Henry Spanka e3451ed49e
Handle ctime and mtime diff changes (#1675)
Borg v1.2.4 added new change types called `mtime` and `ctime` for the modification and the creation time of a file.
Our diff json parser doesn't support these changes yet.
The plain text parser doesn't need to be updated since it is only used for earlier versions of borg.
This also extends the tooltip in the diff view to show changes in `ctime` or `mtime` in a localised manner.

* src/vorta/views/diff_result.py (ChangeType): Add `CTIME` and `MTIME` linking to `MODIFIED`.

* src/vorta/views/diff_result.py (DiffData): Add fields `ctime_change` and `mtime_change`.

* src/vorta/views/diff_result.py (parse_diff_json): Parse the new change types.

* src/vorta/views/diff_result.py (DiffTree.data): Add time changes to tooltip in a human readable format.

* tests/test_diff.py : Update test data to include new change types. Add additional test cases for unittesting the new change types.
2023-04-03 10:16:09 +02:00
Henry Spanka f407032a76
Revert "Added --content-only flag for borg 1.2.4 in diff view"
This reverts commit e0fe766051.
2023-04-01 20:13:31 +02:00
Chirag Aggarwal e0fe766051 Added --content-only flag for borg 1.2.4 in diff view
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
2023-03-30 18:40:31 +01:00
Nkwuda Sunday Cletus d0245977d2
Disable Archive tab buttons during backup. By @sunny775 (#1587)
* Disable archive action buttons when running backup.
* Disable archive action buttons only individually.
* Fix enabling.
* fixup! Fix enabling.

---------

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
Co-authored-by: Manu <3916435+m3nu@users.noreply.github.com>
2023-03-23 14:15:07 +00:00
Divyansh Singh 3ebb078409
feat: add profile name to log messages (#1637)
* feat: add profile name to log messages

* update tests

* add profile name to all occurences of backup progress event emit

* update tests

* merge with logs link code

---------

Co-authored-by: Hofer-Julian <30049909+Hofer-Julian@users.noreply.github.com>
2023-03-22 12:16:46 +01:00
Divyansh Singh 1f1278270d
Remove paramiko dependency (#1606)
Paramiko is a encryption key parsing library. It was used for determining which ssh keys are available on the system. This removes that fairly heavy dependency at replaces it with a very basic heuristic to determine ssh key file by their first line containing `-----BEGIN(\s\w+)? PRIVATE KEY-----`.

* src/vorta/utils.py: Implement `is_ssh_private_key_file`.

* src/vorta/utils.py (get_private_keys): Use `is_ssh_private_key_file` instead of paramiko. Enforce `077` permissions on key files.

* src/vorta/views/ssh_dialog.py : Remove paramiko.

* src/vorta/views/repo_tab.py (RepoTab.init_ssh): Show filename only in `sshComboBox`.

* src/vorta/views/repo_add_dialog.py (AddRepoWindow.init_ssh_key): Show filename only in `sshComboBox`.
2023-03-17 15:03:48 +00:00
Chirag Aggarwal c4d16e250d Fixes math error for negative size in diff view in archive tab
Signed-off-by: Chirag Aggarwal <thechiragaggarwal@gmail.com>
2023-03-14 16:08:27 +01:00
Divyansh Singh 6bc532187b
Add link to the logs folder in borg warnings (#1609)
In case a borg job finishes with warning, vorta will display it and tell the user to have a look in the logs. This adds a clickable link to the log message that opens the default file explorer at the log location.

* src/vorta/application.py (VortaApp.check_failed_response): Improve wording of warning message and link logs.

* src/vorta/borg/create.py (BorgCreateJob.process_result): Link logs.
* src/vorta/borg/compact.py (BorgCompactJob.finished_event): ^^
* src/vorta/borg/check.py (BorgCheckJob.finished_event): ^^

* src/vorta/assets/UI/mainwindow.ui : Enable `openExternalLinks` for `progressText` label.
2023-03-12 07:05:46 +00:00
Vamp 961e0b5057
Migrate from appdirs to platformdirs (#1617)
Fixes #1610. Replace deprecated `appdirs` with fork `platformdirs`. Use the new `*_path` api of set fork. This changes the type of the constants defined in `vorta.config` holding locations to `pathlib.Path`.

* setup.cfg : Replace dep `appdirs` with `platformdirs`.

* src/vorta/config.py : Migrate. Simplify code for ensuring that the directories exist.

* src/vorta/log.py
* src/vorta/autostart.py
* src/vorta/application.py
* src/vorta/__main__.py
2023-03-10 16:00:39 +00:00
Divyansh Singh b01fa1056a
Replace print with logging in application.py (#1612)
Log `An instance of Vorta is already running. Opening main window.` and `Creating backup using existing Vorta instance.` with severity *info* instead of printing it.

* src/vorta/application.py (VortaApp.__init__)
2023-03-08 16:47:50 +00:00
Manu e07c022ca3 Add GSoC link 2023-03-07 14:23:22 +00:00
yfprojects 79420c1271 Change check order in PR template. 2023-03-06 11:41:06 +00:00
Divyansh Singh a00ed62e49
Fix detecting whether sources are configured (#1613)
Fixes #1463. This makes the code count the database rows for the current profile only. 
Previously one could run a backup without any sources when one had sources configured in a different profile.

* src/vorta/borg/create.py (BorgCreateJob.prepare)
2023-03-02 16:55:31 +00:00
yfprojects 618a1fe278
Add tooltips to settings. (#1521)
This adds tooltips to the settings as well as a 'info' button that shows the tooltip when hovering over it.

* Add tooltips to settings.

* src/vorta/store/models.py (SettingsModel): Add `tooltip` column.

* src/vorta/store/migrations.py (run_migrations): Create `tooltip` column.

* src/vorta/store/connection.py (init_db): Populate `tooltip` column. Increase `SCHEMA_VERSION`.

* src/vorta/views/misc_tab.py (MiscTab.populate): Set tooltip of checkbox widgets.

* src/vorta/store/settings.py : Add tooltips and update label of `override_mount_permissions`

* Add *help* button to settings.

* src/vorta/assets/icons/help-about.svg: Add info icon.

* src/vorta/views/partials/tooltip_button.py: Implement `ToolTipButton`.

* src/vorta/views/misc_tab.py: Add `ToolTipButton` for each setting with a tooltip.
	Add `set_icons` and connect it to palette change.

* tests/test_misc.py (test_autostart): Update test.

---------

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2023-02-25 10:10:43 +00:00
Roberto Previdi bcc126b634
Improve size column readability in archives tab (#1598)
Use one size unit for all archives. The unit is selected by a simple algorithm that picks the largest unit that can represent the smallest size with a given precision. Align all sizes in archive and source tab to the left.

* src/vorta/utils.py : Implement `find_best_size_formatting`. Add missing sizes to `sort_sizes`. Simplify `pretty_bytes` and add `fixed_unit` option for use with `find_best_size_formatting`. Implement `clamp` utility function. Add type hints and docstrings.

* src/vorta/views/archive_tab.py (ArchiveTab.populate_from_profile): Use `find_best_sizes_formatting`.

* src/vorta/views/source_tab.py (SizeItem.__init__): Set alignment to left.

* tests/test_utils.py : Add comprehensive tests for `pretty_bytes` and `find_best_sizes_formatting`.

Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-02-21 21:01:49 +00:00
Joshua Goins a048dad136 Allow copying the public part of the first SSH key
Previously this button would only work if you had more than one SSH key
which prevents the first one from being copied.
2023-02-19 18:02:32 +00:00
ratchek 0cf9f0b36f
Modify pre-commit config file using autoupdate (#1601)
A new version of Poetry broke isort which caused errors when running
pre-commit.

This PR runs `pre-commit autoupdate` which updates the configuration
to use the newest isort, which has a hotfix for the bug. It also
updates pre-commit, black, and flake8 as a side-effect.

* Change black version back to 22.12
2023-02-18 18:10:24 +00:00
yfprojects f1e1ea4538 Update type of `debug_enabled` input. 2023-02-18 16:23:30 +00:00
yfprojects 35d9a3b438
Adjust dev files for borgbase/vorta.borgbase.com#32 (#1585)
* Add `pre-commit` to developer requirements.

* Add virtual python environments to `.gitignore`.

* Update pull request template.

---------

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
2023-02-14 07:38:27 +00:00
Théophile Bastian 1b27b9b499 Allow creating an SSH key when bootstrapping Vorta
Fixes #1579
2023-02-09 19:28:34 +00:00
herrwusel ffafcee05c
Correctly supply prune pattern for borg >=1.2.2 (#1565)
Adds different behaviour when borg version >=1.2.2 but <2.0.0: The prune pattern is supplied without a style prefix like `sh:`.
Fixes #1564.

---------

Co-authored-by: herrwusel <herrwusel@user.noreply.github.com>
Co-authored-by: yfprojects <62463991+real-yfprojects@users.noreply.github.com>
2023-02-06 21:02:55 +00:00
Manu a4ab7e713a
Specify build system (minor) (#1580) 2023-02-04 17:23:34 +00:00
Alan Barros de Oliveira 78863544ae
Remove pip install dependency. By @abdeoliveira (#1578) 2023-02-04 14:43:21 +00:00
194 changed files with 8603 additions and 3511 deletions

View File

@ -13,5 +13,5 @@ trim_trailing_whitespace = true
[Makefile]
indent_style = tab
[.github/**.yml]
[**.{yml,yaml}]
indent_size = 2

View File

@ -1,2 +1,5 @@
# Migrate code style to Black
b6a24debb78b953117a3f637db18942f370a4b85
# Run pre-commit after adding ruff
24e1dd5c561bc3da972e41e6fd61961f12a2fc9f

View File

@ -1,5 +1,5 @@
name: "Bug Report Form"
description: "Report a bug or a similiar issue."
description: "Report a bug or a similar issue."
body:
- type: markdown
attributes:

View File

@ -1,6 +1,6 @@
---
name: Bug Report
about: Report a bug or a similiar issue - the classic way
about: Report a bug or a similar issue - the classic way
title: ''
labels: ''
assignees: ''
@ -18,7 +18,7 @@ If you want to suggest a feature or have any other question, please use our
#### Description
<!-- Description
Please decribe your issue and its context in a clear and concise way.
Please describe your issue and its context in a clear and concise way.
Please try to reproduce the issue and provide the steps to reproduce it.
-->

View File

@ -1,8 +1,8 @@
---
name: Feature Request
about: Suggest an idea for this project.
title: 'FR: '
labels: 'type:enhancement'
title: ''
labels: ''
assignees: ''
---

View File

@ -0,0 +1,22 @@
name: Install Dependencies
description: Installs system dependencies
runs:
using: "composite"
steps:
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt update && sudo apt install -y \
xvfb libssl-dev openssl libacl1-dev libacl1 fuse3 build-essential \
libxkbcommon-x11-0 dbus-x11 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \
libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0 \
libegl1 libxcb-cursor0 libfuse-dev libsqlite3-dev libfuse3-dev pkg-config \
python3-pkgconfig libxxhash-dev borgbackup
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
shell: bash
run: |
brew install openssl readline xz xxhash pkg-config borgbackup

62
.github/actions/setup/action.yml vendored Normal file
View File

@ -0,0 +1,62 @@
name: Setup
description: Sets up python and pre-commit
# note:
# this is a local composite action
# documentation: https://docs.github.com/en/actions/creating-actions/creating-a-composite-action
# code example: https://github.com/GuillaumeFalourd/poc-github-actions/blob/main/.github/actions/local-action/action.yaml
inputs:
pre-commit:
description: Whether pre-commit shall be setup, too
required: false
default: "" # == false
python-version:
description: The python version to install
required: true
default: "3.10"
install-nox:
description: Whether nox shall be installed
required: false
default: "" # == false
runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version }}
- name: Get pip cache dir
shell: bash
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg', 'requirements.d/**') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install pre-commit
shell: bash
run: pip install pre-commit
- name: Install nox
if: ${{ inputs.install-nox }}
shell: bash
run: pip install nox
- name: Hash python version
if: ${{ inputs.setup-pre-commit }}
shell: bash
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- name: Caching for Pre-Commit
if: ${{ inputs.setup-pre-commit }}
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}

View File

@ -28,15 +28,17 @@
### Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I have read the [CONTRIBUTING](https://vorta.borgbase.com/contributing/) guide.
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [ ] I have read the [CONTRIBUTING](https://vorta.borgbase.com/contributing/) guide.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
*I provide my contribution under the terms of the [license](./../../LICENSE.txt) of this repository and I affirm the Developer Certificate of Origin.*
*I provide my contribution under the terms of the [license](./../LICENSE.txt) of this repository and I affirm the [Developer Certificate of Origin][dco].*
[dco]: https://developercertificate.org/
<!--
This template is sourced from the awesome https://github.com/TalAter/open-source-templates

30
.github/scripts/generate-matrix.sh vendored Normal file
View File

@ -0,0 +1,30 @@
event_name="$1"
branch_name="$2"
if [[ "$event_name" == "workflow_dispatch" ]] || [[ "$branch_name" == "master" ]]; then
echo '{
"python-version": ["3.8", "3.9", "3.10", "3.11"],
"os": ["ubuntu-latest", "macos-latest"],
"borg-version": ["1.2.4"]
}' | jq -c . > matrix-unit.json
echo '{
"python-version": ["3.8", "3.9", "3.10", "3.11"],
"os": ["ubuntu-latest", "macos-latest"],
"borg-version": ["1.1.18", "1.2.2", "1.2.4", "2.0.0b5"],
"exclude": [{"borg-version": "2.0.0b5", "python-version": "3.8"}]
}' | jq -c . > matrix-integration.json
elif [[ "$event_name" == "push" ]] || [[ "$event_name" == "pull_request" ]]; then
echo '{
"python-version": ["3.8", "3.9", "3.10", "3.11"],
"os": ["ubuntu-latest", "macos-latest"],
"borg-version": ["1.2.4"]
}' | jq -c . > matrix-unit.json
echo '{
"python-version": ["3.10"],
"os": ["ubuntu-latest"],
"borg-version": ["1.2.4"]
}' | jq -c . > matrix-integration.json
fi

33
.github/stale.yml vendored
View File

@ -1,33 +0,0 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 60
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- "status:idea"
- "status:planning"
- "status:on hold"
- "status:ready"
- "type:bug"
- "type:docs"
- "type:enhancement"
- "type:feature"
- "type:refactor"
- "type:task"
# Label to use when marking an issue as stale
staleLabel: "status:stale"
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
# Limit to only `issues` or `pulls`
only: issues

View File

@ -3,17 +3,21 @@ on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to use for building macOS release'
description: 'Branch to use for building release'
required: true
default: 'master'
borg_version:
description: 'Borg version to package'
required: true
default: '1.2.1'
default: '1.2.8'
macos_version:
description: 'macOS version for building'
required: true
default: 'macos-11'
jobs:
build:
runs-on: macos-11
runs-on: ${{ github.event.inputs.macos_version }}
steps:
- name: Check out selected branch
@ -50,6 +54,7 @@ jobs:
CERTIFICATE_NAME: ${{ secrets.MACOS_CERTIFICATE_NAME }}
APPLE_ID_USER: ${{ secrets.APPLE_ID_USER }}
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
run: |
echo $MACOS_CERTIFICATE | base64 --decode > certificate.p12
security create-keychain -p 123 build.keychain

40
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Close stale issues
on:
schedule:
- cron: '50 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: 90
days-before-pr-stale: -1
days-before-issue-close: 7
# days-before-pr-close: 10
stale-issue-label: "status:stale"
stale-pr-label: "status:stale"
exempt-issue-labels: >
status:idea,
status:planning,
status:on hold,
status:ready,
type:bug,
type:docs,
type:enhancement,
type:feature,
type:refactor,
type:task,
stale-issue-message: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
close-issue-message: >
This issue was closed because it has been stalled for 7 days with no activity.

View File

@ -6,7 +6,8 @@ on:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate debugging enabled'
type: boolean
description: "Run the build with tmate debugging enabled"
required: false
default: false
@ -14,84 +15,132 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@2c3dd9e7e29afd70cc0950079bde6c979d1f69f9 # v4.3.1
with:
python-version: 3.8
- name: Install Vorta
run: |
pip install .
pip install -r requirements.d/dev.txt
- name: Test formatting with Flake8, isort and Black
run: make lint
# - name: Run PyLint (info only)
# run: pylint --rcfile=setup.cfg src --exit-zero
- uses: actions/checkout@v3
- name: Setup python, vorta and dev deps
uses: ./.github/actions/setup
with:
python-version: 3.11
pre-commit: true
- name: Test formatting with Flake8, ruff and Black
shell: bash
run: make lint
test:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
matrix-unit: ${{ steps.set-matrix-unit.outputs.matrix }}
matrix-integration: ${{ steps.set-matrix-integration.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- name: Give execute permission to script
run: chmod +x ./.github/scripts/generate-matrix.sh
- name: Generate matrices
run: |
./.github/scripts/generate-matrix.sh "${{ github.event_name }}" "${GITHUB_REF##refs/heads/}"
- name: Set matrix for unit tests
id: set-matrix-unit
run: echo "matrix=$(cat matrix-unit.json)" >> $GITHUB_OUTPUT
- name: Set matrix for integration tests
id: set-matrix-integration
run: echo "matrix=$(cat matrix-integration.json)" >> $GITHUB_OUTPUT
test-unit:
needs: prepare-matrix
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
os: [ubuntu-latest, macos-latest]
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix-unit)}}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@2c3dd9e7e29afd70cc0950079bde6c979d1f69f9 # v4.3.1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v3
- name: Get pip cache dir
id: pip-cache
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
- name: pip cache
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg', 'requirements.d/**') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install system dependencies
uses: ./.github/actions/install-dependencies
- name: Install system dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt update && sudo apt install -y \
xvfb libssl-dev openssl libacl1-dev libacl1 build-essential borgbackup \
libxkbcommon-x11-0 dbus-x11 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 \
libxcb-randr0 libxcb-render-util0 libxcb-xinerama0 libxcb-xfixes0 libxcb-shape0
- name: Install system dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install openssl readline xz borgbackup
- name: Install Vorta
run: |
pip install -e .
pip install -r requirements.d/dev.txt
- name: Setup python, vorta and dev deps
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
install-nox: true
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }}
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
- name: Test with pytest (Linux)
if: runner.os == 'Linux'
run: |
xvfb-run --server-args="-screen 0 1024x768x24+32" \
-a dbus-run-session -- make test
- name: Test with pytest (macOS)
if: runner.os == 'macOS'
run: make test
- name: Run Unit Tests with pytest (Linux)
if: runner.os == 'Linux'
env:
BORG_VERSION: ${{ matrix.borg-version }}
run: |
xvfb-run --server-args="-screen 0 1024x768x24+32" \
-a dbus-run-session -- make test-unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS, python
- name: Run Unit Tests with pytest (macOS)
if: runner.os == 'macOS'
env:
BORG_VERSION: ${{ matrix.borg-version }}
PKG_CONFIG_PATH: /usr/local/opt/openssl@3/lib/pkgconfig
run: echo $PKG_CONFIG_PATH && make test-unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS, python
test-integration:
needs: prepare-matrix
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix: ${{fromJson(needs.prepare-matrix.outputs.matrix-integration)}}
steps:
- uses: actions/checkout@v3
- name: Install system dependencies
uses: ./.github/actions/install-dependencies
- name: Setup python, vorta and dev deps
uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
install-nox: true
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true'}}
- name: Run Integration Tests with pytest (Linux)
if: runner.os == 'Linux'
env:
BORG_VERSION: ${{ matrix.borg-version }}
run: |
xvfb-run --server-args="-screen 0 1024x768x24+32" \
-a dbus-run-session -- make test-integration
- name: Run Integration Tests with pytest (macOS)
if: runner.os == 'macOS'
env:
BORG_VERSION: ${{ matrix.borg-version }}
PKG_CONFIG_PATH: /usr/local/opt/openssl@3/lib/pkgconfig
run: echo $PKG_CONFIG_PATH && make test-integration
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
env:
OS: ${{ runner.os }}
python: ${{ matrix.python-version }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS, python

8
.gitignore vendored
View File

@ -15,9 +15,17 @@ vorta.egg-info
.vagrant
*.log
htmlcov
# virtual python environments
env
venv
.env
.venv
# dirs created by the --development option
.dev_config/
# Avoid adding translations of source language
# Files are still used by Transifex
src/vorta/i18n/ts/vorta.en.ts
src/vorta/i18n/ts/vorta.en_US.ts
flatpak/app/
flatpak/.flatpak-builder/
.vscode

View File

@ -12,7 +12,7 @@ minimum_pre_commit_version: "1.15"
repos:
# general stuff
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
# check file system problems
- id: check-case-conflict
@ -28,19 +28,19 @@ repos:
# sort requirements.txt files
- id: requirements-txt-fixer
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.257"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# format python files
- repo: https://github.com/psf/black
rev: 22.6.0
rev: 22.12.0
hooks:
- id: black
files: ^(src/vorta/|tests)
# sort python imports
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
# # run black on code embedded in docstrings
# - repo: https://github.com/asottile/blacken-docs
# rev: v1.12.1
@ -58,7 +58,7 @@ repos:
# check pep8 conformity using flake8
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8

View File

@ -7,4 +7,3 @@ source_file = src/vorta/i18n/ts/vorta.en.ts
source_lang = en
type = QT
minimum_perc = 80

View File

@ -2,15 +2,22 @@ export VORTA_SRC := src/vorta
export APPSTREAM_METADATA := src/vorta/assets/metadata/com.borgbase.Vorta.appdata.xml
VERSION := $(shell python -c "from src.vorta._version import __version__; print(__version__)")
.PHONY : help
.PHONY : help clean lint test
.DEFAULT_GOAL := help
# Set Homebrew location to /opt/homebrew on Apple Silicon, /usr/local on Intel
ifeq ($(shell uname -m),arm64)
export HOMEBREW = /opt/homebrew
else
export HOMEBREW = /usr/local
endif
clean:
rm -rf dist/*
dist/Vorta.app: ## Build macOS app locally (without Borg)
pyinstaller --clean --noconfirm package/vorta.spec
cp -R /usr/local/Caskroom/sparkle/*/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
cp -R ${HOMEBREW}/Caskroom/sparkle/*/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
rm -rf build/vorta dist/vorta
dist/Vorta.dmg: dist/Vorta.app ## Create notarized macOS DMG for distribution.
@ -57,12 +64,16 @@ flatpak-install: translations-to-qm
install -D src/vorta/assets/metadata/com.borgbase.Vorta.desktop ${FLATPAK_DEST}/share/applications/com.borgbase.Vorta.desktop
lint:
flake8
isort --check-only .
black --check .
pre-commit run --all-files --show-diff-on-failure
test:
pytest --cov=vorta
nox -- --cov=vorta
test-unit:
nox -- --cov=vorta tests/unit
test-integration:
nox -- --cov=vorta tests/integration
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

View File

@ -13,7 +13,7 @@
Vorta is a backup client for macOS and Linux desktops. It integrates the mighty [BorgBackup](https://borgbackup.readthedocs.io) with your desktop environment to protect your data from disk failure, ransomware and theft.
![](https://files.qmax.us/vorta/screencast-8-small.gif)
https://github.com/m3nu/vorta/assets/3916435/a622a148-5373-4ae0-87bc-4ca1d6f6202e
## Why is this great? 🤩
@ -28,15 +28,16 @@ Learn more on [Vorta's website](https://vorta.borgbase.com).
## Installation
Vorta should work on all platforms that support Qt and Borg. This includes macOS, Ubuntu, Debian, Fedora, Arch Linux and many others. Windows is currently not supported by Borg, but this may change in the future.
See our website for [download links and and install instructions](https://vorta.borgbase.com/install).
See our website for [download links and install instructions](https://vorta.borgbase.com/install).
## Connect and Contribute
- To discuss everything around using, improving, packaging and translating Vorta, join the [discussion on Github](https://github.com/borgbase/vorta/discussions).
- Report bugs by opening a new [Github issue](https://github.com/borgbase/vorta/issues/new/choose).
- Want to contribute to Vorta? Great! See our [contributor guide](https://vorta.borgbase.com/contributing/) on how to help out with coding, translation and packaging.
- We currently have students from the Google Summer Of Code 2023 Program contributing to this project.
## License and Credits
- See [CONTRIBUTORS.md](CONTRIBUTORS.md) to see who programmed and translated Vorta.
- Licensed under [GPLv3](LICENSE.txt). © 2018-2020 Manuel Riel and Vorta contributors
- Licensed under [GPLv3](LICENSE.txt). © 2018-2023 Manuel Riel and Vorta contributors
- Based on [PyQt](https://riverbankcomputing.com/software/pyqt/intro) and [Qt](https://www.qt.io).
- Icons by [FontAwesome](https://fontawesome.com)
- Icons by [Fork Awesome](https://forkaweso.me/) (licensed under [SIL Open Font License](https://scripts.sil.org/OFL), Version 1.1) and Material Design icons by Google (licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.txt)). See the `src/vorta/assets/icons` folder for a copy of applicable licenses.

56
noxfile.py Normal file
View File

@ -0,0 +1,56 @@
import os
import re
import sys
import nox
borg_version = os.getenv("BORG_VERSION")
if borg_version:
# Use specified borg version
supported_borgbackup_versions = [borg_version]
else:
# Generate a list of borg versions compatible with system installed python version
system_python_version = tuple(sys.version_info[:3])
supported_borgbackup_versions = [
borgbackup
for borgbackup in ("1.1.18", "1.2.2", "1.2.4", "2.0.0b6")
# Python version requirements for borgbackup versions
if (borgbackup == "1.1.18" and system_python_version >= (3, 5, 0))
or (borgbackup == "1.2.2" and system_python_version >= (3, 8, 0))
or (borgbackup == "1.2.4" and system_python_version >= (3, 8, 0))
or (borgbackup == "2.0.0b6" and system_python_version >= (3, 9, 0))
]
@nox.session
@nox.parametrize("borgbackup", supported_borgbackup_versions)
def run_tests(session, borgbackup):
# install borgbackup
if sys.platform == 'darwin':
# in macOS there's currently no fuse package which works with borgbackup directly
session.install(f"borgbackup=={borgbackup}")
elif borgbackup == "1.1.18":
# borgbackup 1.1.18 doesn't support pyfuse3
session.install("llfuse")
session.install(f"borgbackup[llfuse]=={borgbackup}")
else:
session.install(f"borgbackup[pyfuse3]=={borgbackup}")
# install dependencies
session.install("-r", "requirements.d/dev.txt")
session.install("-e", ".")
# check versions
cli_version = session.run("borg", "--version", silent=True).strip()
cli_version = re.search(r"borg (\S+)", cli_version).group(1)
python_version = session.run("python", "-c", "import borg; print(borg.__version__)", silent=True).strip()
session.log(f"Borg CLI version: {cli_version}")
session.log(f"Borg Python version: {python_version}")
assert cli_version == borgbackup
assert python_version == borgbackup
session.run("pytest", *session.posargs, env={"BORG_VERSION": borgbackup})

View File

@ -18,13 +18,13 @@ def create_symlink(folder: Path) -> None:
"""Create the appropriate symlink in the MacOS folder
pointing to the Resources folder.
"""
sibbling = Path(str(folder).replace("MacOS", ""))
sibling = Path(str(folder).replace("MacOS", ""))
# PyQt5/Qt/qml/QtQml/Models.2
root = str(sibbling).partition("Contents")[2].lstrip("/")
# PyQt6/Qt/qml/QtQml/Models.2
root = str(sibling).partition("Contents")[2].lstrip("/")
# ../../../../
backward = "../" * (root.count("/") + 1)
# ../../../../Resources/PyQt5/Qt/qml/QtQml/Models.2
# ../../../../Resources/PyQt6/Qt/qml/QtQml/Models.2
good_path = f"{backward}Resources/{root}"
folder.symlink_to(good_path)
@ -41,7 +41,7 @@ def fix_dll(dll: Path) -> None:
def match_func(pth: str) -> Optional[str]:
"""Callback function for MachO.rewriteLoadCommands() that is
called on every lookup path setted in the DLL headers.
called on every lookup path set in the DLL headers.
By returning None for system libraries, it changes nothing.
Else we return a relative path pointing to the good file
in the MacOS folder.
@ -51,7 +51,7 @@ def fix_dll(dll: Path) -> None:
return None
return f"@loader_path{good_path}/{basename}"
# Resources/PyQt5/Qt/qml/QtQuick/Controls.2/Fusion
# Resources/PyQt6/Qt/qml/QtQuick/Controls.2/Fusion
root = str(dll.parent).partition("Contents")[2][1:]
# /../../../../../../..
backward = "/.." * (root.count("/") + 1)
@ -73,7 +73,7 @@ def find_problematic_folders(folder: Path) -> Generator[Path, None, None]:
"""Recursively yields problematic folders (containing a dot in their name)."""
for path in folder.iterdir():
if not path.is_dir() or path.is_symlink():
# Skip simlinks as they are allowed (even with a dot)
# Skip symlinks as they are allowed (even with a dot)
continue
if "." in path.name:
yield path
@ -83,7 +83,7 @@ def find_problematic_folders(folder: Path) -> Generator[Path, None, None]:
def move_contents_to_resources(folder: Path) -> Generator[Path, None, None]:
"""Recursively move any non symlink file from a problematic folder
to the sibbling one in Resources.
to the sibling one in Resources.
"""
for path in folder.iterdir():
if path.is_symlink():
@ -91,10 +91,10 @@ def move_contents_to_resources(folder: Path) -> Generator[Path, None, None]:
if path.name == "qml":
yield from move_contents_to_resources(path)
else:
sibbling = Path(str(path).replace("MacOS", "Resources"))
sibbling.parent.mkdir(parents=True, exist_ok=True)
shutil.move(path, sibbling)
yield sibbling
sibling = Path(str(path).replace("MacOS", "Resources"))
sibling.parent.mkdir(parents=True, exist_ok=True)
shutil.move(path, sibling)
yield sibling
def main(args: List[str]) -> int:

View File

@ -7,7 +7,8 @@ APP_BUNDLE_ID="com.borgbase.client.macos"
APP_BUNDLE="Vorta"
# CERTIFICATE_NAME="Developer ID Application: Joe Doe (XXXXXX)"
# APPLE_ID_USER="name@example.com"
# APPLE_ID_PASSWORD="@keychain:Notarization"
# APPLE_ID_PASSWORD="CHANGEME"
# APPLE_TEAM_ID="CNMSCAXT48"
# Sign app bundle, Sparkle and Borg
@ -37,38 +38,13 @@ create-dmg \
"Vorta.dmg" \
"Vorta.app"
# Notarize DMG
RESULT=$(xcrun altool --notarize-app --type osx \
--primary-bundle-id $APP_BUNDLE_ID \
--username $APPLE_ID_USER --password $APPLE_ID_PASSWORD \
--file "$APP_BUNDLE.dmg" --output-format xml)
REQUEST_UUID=$(echo "$RESULT" | xpath5.18 "//key[normalize-space(text()) = 'RequestUUID']/following-sibling::string[1]/text()" 2> /dev/null)
# Poll for notarization status
echo "Submitted notarization request $REQUEST_UUID, waiting for response..."
sleep 60
while true
do
RESULT=$(xcrun altool --notarization-info "$REQUEST_UUID" \
--username "$APPLE_ID_USER" \
--password "$APPLE_ID_PASSWORD" \
--output-format xml)
STATUS=$(echo "$RESULT" | xpath5.18 "//key[normalize-space(text()) = 'Status']/following-sibling::string[1]/text()" 2> /dev/null)
if [ "$STATUS" = "success" ]; then
echo "Notarization of $APP_BUNDLE succeeded!"
break
elif [ "$STATUS" = "in progress" ]; then
echo "Notarization in progress..."
sleep 20
else
echo "Notarization of $APP_BUNDLE failed:"
echo "$RESULT"
exit 1
fi
done
xcrun notarytool submit \
--output-format plist --wait --timeout 10m \
--apple-id $APPLE_ID_USER \
--password $APPLE_ID_PASSWORD \
--team-id $APPLE_TEAM_ID \
"$APP_BUNDLE.dmg"
# Staple the notary ticket
xcrun stapler staple $APP_BUNDLE.dmg

View File

@ -23,6 +23,7 @@ a = Analysis([os.path.join(SRC_DIR, '__main__.py')],
datas=[
(os.path.join(SRC_DIR, 'assets/UI/*'), 'assets/UI'),
(os.path.join(SRC_DIR, 'assets/icons/*'), 'assets/icons'),
(os.path.join(SRC_DIR, 'assets/exclusion_presets/*'), 'assets/exclusion_presets'),
(os.path.join(SRC_DIR, 'i18n/qm/*'), 'vorta/i18n/qm'),
],
hiddenimports=[

View File

@ -4,10 +4,11 @@ skip-string-normalization = true
target-version = ['py39']
include = "(src/vorta/|tests).*.py$"
[tool.isort]
profile = "black"
line_length = 120
skip_gitignore = true
multi_line_output = 3
lines_between_sections = 0
src_paths = ["src", "tests"]
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[tool.ruff]
select = ["T", "I"]
exclude = ["package"]
fixable = ["I"]

View File

@ -1,8 +1,10 @@
black
black==22.*
coverage
flake8
isort
macholib
nox
pkgconfig
pre-commit
pyinstaller
pylint
pytest
@ -10,6 +12,7 @@ pytest-cov
pytest-faulthandler
pytest-mock
pytest-qt
ruff
tox
twine
wheel

View File

@ -35,20 +35,19 @@ packages = find:
package_dir =
=src
include_package_data = true
python_requires = >=3.7
setup_requires =
pip >= 10
python_requires = >=3.8
install_requires =
appdirs
paramiko
pyqt5
platformdirs >=3.0.0, <5.0.0; sys_platform == 'darwin' # for macOS: breaking changes in 3.0.0,
platformdirs >=2.6.0, <5.0.0; sys_platform != 'darwin' # for others: 2.6+ works consistently.
pyqt6
peewee
psutil
setuptools
secretstorage; sys_platform != 'darwin'
pyobjc-core; sys_platform == 'darwin'
pyobjc-framework-Cocoa; sys_platform == 'darwin'
pyobjc-framework-LaunchServices; sys_platform == 'darwin'
pyobjc-core < 10; sys_platform == 'darwin'
pyobjc-framework-Cocoa < 10; sys_platform == 'darwin'
pyobjc-framework-LaunchServices < 10; sys_platform == 'darwin'
pyobjc-framework-CoreWLAN < 10; sys_platform == 'darwin'
tests_require =
pytest
pytest-qt
@ -79,7 +78,7 @@ max-line-length = 120
extend-ignore = E203,E121,E123,E126,E226,E24,E704,W503,W504
exclude =
build,dist,.git,.idea,.cache,.tox,.eggs,
./src/vorta/__init__.py,.direnv
./src/vorta/__init__.py,.direnv,env
[tox:tox]
envlist = py36,py37,py38,flake8
@ -102,7 +101,7 @@ commands=flake8 src tests
max_line_length = 120
[pylint.master]
extension-pkg-whitelist=PyQt5
extension-pkg-whitelist=PyQt6
load-plugins=
[pylint.messages control]

View File

@ -1,20 +1,25 @@
import os
import signal
import sys
from peewee import SqliteDatabase
# Need to import config as a whole module instead of individual variables
# because we will be overriding the modules variables
from vorta import config
from vorta._version import __version__
from vorta.config import SETTINGS_DIR
from vorta.i18n import trans_late, translate
from vorta.log import init_logger, logger
from vorta.store.connection import init_db
from vorta.updater import get_updater
from vorta.utils import parse_args
from vorta.utils import DEFAULT_DIR_FLAG, parse_args
def main():
def exception_handler(type, value, tb):
from traceback import format_exception
from PyQt5.QtWidgets import QMessageBox
from PyQt6.QtWidgets import QMessageBox
logger.critical(
"Uncaught exception, file a report at https://github.com/borgbase/vorta/issues/new/choose",
@ -45,20 +50,30 @@ def main():
want_version = getattr(args, 'version', False)
want_background = getattr(args, 'daemonize', False)
want_development = getattr(args, 'development', False)
if want_version:
print(f"Vorta {__version__}")
print(f"Vorta {__version__}") # noqa: T201
sys.exit()
if want_background:
if os.fork():
sys.exit()
if want_development:
# if we're using the default dev dir
if want_development is DEFAULT_DIR_FLAG:
config.init_dev_mode(config.default_dev_dir())
else:
# if we're not using the default dev dir and
# instead we're using whatever dir is passed as an argument
config.init_dev_mode(want_development)
init_logger(background=want_background)
# Init database
sqlite_db = SqliteDatabase(
os.path.join(SETTINGS_DIR, 'settings.db'),
config.SETTINGS_DIR / 'settings.db',
pragmas={
'journal_mode': 'wal',
},

View File

@ -1 +1 @@
__version__ = '0.8.10'
__version__ = '0.9.1'

View File

@ -1,14 +1,17 @@
import logging
import os
import sys
from pathlib import Path
from typing import Any, Dict, List, Tuple
from PyQt5 import QtCore
from PyQt5.QtWidgets import QMessageBox
from PyQt6 import QtCore
from PyQt6.QtWidgets import QMessageBox
from vorta import config
from vorta.borg.break_lock import BorgBreakJob
from vorta.borg.create import BorgCreateJob
from vorta.borg.jobs_manager import JobsManager
from vorta.borg.version import BorgVersionJob
from vorta.config import PROFILE_BOOTSTRAP_FILE, TEMP_DIR
from vorta.i18n import init_translations, translate
from vorta.notifications import VortaNotifications
from vorta.profile_export import ProfileExport
@ -22,7 +25,7 @@ from vorta.views.main_window import MainWindow
logger = logging.getLogger(__name__)
APP_ID = os.path.join(TEMP_DIR, "socket")
APP_ID = config.TEMP_DIR / "socket"
class VortaApp(QtSingleApplication):
@ -41,16 +44,16 @@ class VortaApp(QtSingleApplication):
check_failed_event = QtCore.pyqtSignal(dict)
def __init__(self, args_raw, single_app=False):
super().__init__(APP_ID, args_raw)
super().__init__(str(APP_ID), args_raw)
args = parse_args()
if self.isRunning():
if single_app:
self.sendMessage("open main window")
print('An instance of Vorta is already running. Opening main window.')
logger.info('An instance of Vorta is already running. Opening main window.')
sys.exit()
elif args.profile:
self.sendMessage(f"create {args.profile}")
print('Creating backup using existing Vorta instance.')
logger.info('Creating backup using existing Vorta instance.')
sys.exit()
elif args.profile:
sys.exit('Vorta must already be running for --create to work')
@ -118,7 +121,7 @@ class VortaApp(QtSingleApplication):
translate('messages', msg['message']),
level='error',
)
self.backup_progress_event.emit(translate('messages', msg['message']))
self.backup_progress_event.emit(f"[{profile.name}] {translate('messages', msg['message'])}")
return None
def open_main_window_action(self):
@ -170,18 +173,19 @@ class VortaApp(QtSingleApplication):
"""
if 'version' in result['data']:
borg_compat.set_version(result['data']['version'], result['data']['path'])
self.main_window.miscTab.set_borg_details(borg_compat.version, borg_compat.path)
self.main_window.aboutTab.set_borg_details(borg_compat.version, borg_compat.path)
self.main_window.repoTab.toggle_available_compression()
self.main_window.archiveTab.toggle_compact_button_visibility()
self.scheduler.reload_all_timers() # Start timer after Borg version is set.
else:
self._alert_missing_borg()
def _alert_missing_borg(self):
msg = QMessageBox()
msg.setIcon(QMessageBox.Critical)
msg.setIcon(QMessageBox.Icon.Critical)
msg.setText(self.tr("No Borg Binary Found"))
msg.setInformativeText(self.tr("Vorta was unable to locate a usable Borg Backup binary."))
msg.setStandardButtons(QMessageBox.Ok)
msg.setStandardButtons(QMessageBox.StandardButton.Ok)
msg.exec()
def check_darwin_permissions(self):
@ -193,11 +197,15 @@ class VortaApp(QtSingleApplication):
This function tries reading a file that is known to be restricted and warn the user about
incomplete backups.
"""
test_path = os.path.expanduser('~/Library/Cookies')
if os.path.exists(test_path) and not os.access(test_path, os.R_OK):
if not SettingsModel.get(key="check_full_disk_access").value:
return
test_path = Path('~/Library/Cookies').expanduser()
if test_path.exists() and not os.access(test_path, os.R_OK):
msg = QMessageBox()
msg.setIcon(QMessageBox.Warning)
msg.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse)
msg.setIcon(QMessageBox.Icon.Warning)
msg.setTextInteractionFlags(QtCore.Qt.TextInteractionFlag.LinksAccessibleByMouse)
msg.setText(self.tr("Vorta needs Full Disk Access for complete Backups"))
msg.setInformativeText(
self.tr(
@ -207,7 +215,7 @@ class VortaApp(QtSingleApplication):
"System Preferences > Security & Privacy</a>."
)
)
msg.setStandardButtons(QMessageBox.Ok)
msg.setStandardButtons(QMessageBox.StandardButton.Ok)
msg.exec()
def react_to_log(self, mgs, context):
@ -220,9 +228,9 @@ class VortaApp(QtSingleApplication):
repo_url = context.get('repo_url')
msg = QMessageBox()
msg.setWindowTitle(self.tr("Repository In Use"))
msg.setIcon(QMessageBox.Critical)
abortButton = msg.addButton(self.tr("Abort"), QMessageBox.RejectRole)
msg.addButton(self.tr("Continue"), QMessageBox.AcceptRole)
msg.setIcon(QMessageBox.Icon.Critical)
abortButton = msg.addButton(self.tr("Abort"), QMessageBox.ButtonRole.RejectRole)
msg.addButton(self.tr("Continue"), QMessageBox.ButtonRole.AcceptRole)
msg.setDefaultButton(abortButton)
msg.setText(self.tr(f"The repository at {repo_url} might be in use elsewhere."))
msg.setInformativeText(
@ -249,12 +257,16 @@ class VortaApp(QtSingleApplication):
def break_lock(self, profile):
params = BorgBreakJob.prepare(profile)
if not params['ok']:
self.backup_progress_event.emit(params['message'])
self.backup_progress_event.emit(f"[{profile.name}] {params['message']}")
return
job = BorgBreakJob(params['cmd'], params)
self.jobs_manager.add_job(job)
def bootstrap_profile(self, bootstrap_file=PROFILE_BOOTSTRAP_FILE):
def bootstrap_profile(self, bootstrap_file=None):
# Necessary to dynamically load the variable from config during runtime
# Check out pull request for #1682 for context
bootstrap_file = bootstrap_file or config.PROFILE_BOOTSTRAP_FILE
"""
Make sure there is at least one profile when first starting Vorta.
Will either import a profile placed in ~/.vorta-init.json
@ -296,11 +308,6 @@ class VortaApp(QtSingleApplication):
Displays a `QMessageBox` with an error message depending on the
return code of the `BorgJob`.
Parameters
----------
repo_url : str
The url of the repo of concern
"""
# extract data from the params for the borg job
repo_url = result['params']['repo_url']
@ -313,24 +320,26 @@ class VortaApp(QtSingleApplication):
# No fail
logger.warning('VortaApp.check_failed_response was called with returncode 0')
elif returncode == 130:
# Keyboard interupt
# Keyboard interrupt
pass
else: # Real error
# Create QMessageBox
msg = QMessageBox()
msg.setIcon(QMessageBox.Icon.Critical) # changed for warning
msg.setStandardButtons(QMessageBox.Ok)
msg.setStandardButtons(QMessageBox.StandardButton.Ok)
msg.setWindowTitle(self.tr('Repo Check Failed'))
if returncode == 1:
# warning
msg.setIcon(QMessageBox.Icon.Warning)
text = self.tr('Borg exited with a warning message. See logs for details.')
text = translate(
'VortaApp', 'Borg exited with warning status (rc 1). See the <a href="{0}">logs</a> for details.'
).format(config.LOG_DIR.as_uri())
infotext = error_message
elif returncode > 128:
# 128+N - killed by signal N (e.g. 137 == kill -9)
signal = returncode - 128
text = self.tr('Repository data check for repo was killed by signal %s.') % (signal)
text = self.tr('Repository data check for repo was killed by signal %s.') % signal
infotext = self.tr('The process running the check job got a kill signal. Try again.')
else:
# Real error

View File

@ -0,0 +1,315 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Form</class>
<widget class="QWidget" name="Form">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>791</width>
<height>497</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>12</number>
</property>
<property name="bottomMargin">
<number>12</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Vorta Version:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="versionLabel">
<property name="text">
<string>0.0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Borg Version:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="borgVersion">
<property name="text">
<string>1.1.8</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="borgPath">
<property name="text">
<string>/usr/bin/borg</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="seperator">
<property name="frameShape">
<enum>QFrame::HLine</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/borgbase/vorta/issues/new/choose&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;Click here&lt;/span&gt;&lt;/a&gt; to report a bug.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="logLink">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;file:///&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;View the logs&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="indent">
<number>0</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://borgbackup.readthedocs.io/en/master/index.html&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt; Click here&lt;/span&gt;&lt;/a&gt; to view the docs.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://github.com/borgbase/vorta&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;Click here&lt;/span&gt;&lt;/a&gt; to view Git repo.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QFrame" name="seperator">
<property name="frameShape">
<enum>QFrame::HLine</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Sunken</enum>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<property name="spacing">
<number>20</number>
</property>
<item>
<widget class="QLabel" name="copyrightLabel">
<property name="text">
<string>
Vorta is a cross-platform, open-source client designed to simplify the management of Borg backups.
Copyright (C) 2018-2020 Manuel Riel and Vorta contributors (see CONTRIBUTORS.md)
</string>
</property>
<property name="indent">
<number>0</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>10</number>
</property>
<property name="bottomMargin">
<number>10</number>
</property>
<property name="spacing">
<number>20</number>
</property>
<property name="alignment">
<set>Qt::AlignHCenter</set>
</property>
<item>
<widget class="QLabel" name="gpl_logo"/>
</item>
<item>
<widget class="QLabel" name="python_logo"/>
</item>
</layout>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -142,9 +142,6 @@
<attribute name="horizontalHeaderCascadingSectionResizes">
<bool>false</bool>
</attribute>
<attribute name="horizontalHeaderStretchLastSection">
<bool>true</bool>
</attribute>
<attribute name="verticalHeaderVisible">
<bool>false</bool>
</attribute>
@ -173,6 +170,11 @@
<string>Name</string>
</property>
</column>
<column>
<property name="text">
<string>Trigger</string>
</property>
</column>
</widget>
</item>
<item row="0" column="1">
@ -207,10 +209,29 @@
</sizepolicy>
</property>
<property name="toolTip">
<string>Refresh selected archive</string>
<string>Recalculate selected archive's size(s)</string>
</property>
<property name="text">
<string>Refresh</string>
<string>Recalculate</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="bDiff">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Compare two archives</string>
</property>
<property name="text">
<string>Diff</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
@ -255,7 +276,7 @@
</property>
</widget>
</item>
<item>
<item>
<widget class="QToolButton" name="bRename">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
@ -274,60 +295,41 @@
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="bDelete">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Delete selected archive(s)</string>
</property>
<property name="text">
<string>Delete</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="bDiff">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Compare two archives</string>
</property>
<property name="text">
<string>Diff</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="bDelete">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Delete selected archive(s)</string>
</property>
<property name="text">
<string>Delete</string>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
</widget>
</item>
</layout>
</item>
</layout>
@ -618,7 +620,7 @@
<item row="0" column="1">
<widget class="QLineEdit" name="prunePrefixTemplate">
<property name="toolTip">
<string>Available variables: hostname, profile_id, profile_slug, now, utc_now, user</string>
<string>Available variables: hostname, fqdn, profile_id, profile_slug, now, utc_now, user</string>
</property>
<property name="placeholderText">
<string>{hostname}-{profile_slug}-</string>
@ -675,7 +677,7 @@
<item row="0" column="1">
<widget class="QLineEdit" name="archiveNameTemplate">
<property name="toolTip">
<string>Available variables: hostname, profile_id, profile_slug, now, utc_now, user</string>
<string>Available variables: hostname, fqdn, profile_id, profile_slug, now, utc_now, user</string>
</property>
<property name="placeholderText">
<string>{hostname}-{profile_slug}-{now:%Y-%m-%d-%H%M%S}</string>

View File

@ -0,0 +1,153 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>Dialog</class>
<widget class="QDialog" name="Dialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>504</width>
<height>426</height>
</rect>
</property>
<property name="windowTitle">
<string>Add patterns to exclude</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="topMargin">
<number>10</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Custom</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="customPresetsHelpText">
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QListView" name="customExclusionsList"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="bAddPattern"/>
</item>
<item>
<widget class="QToolButton" name="bRemovePattern"/>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Presets</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QLabel" name="exclusionPresetsHelpText">
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QListView" name="exclusionPresetsList"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_4">
<attribute name="title">
<string>Raw</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="rawExclusionsHelpText">
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="rawExclusionsText"/>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_3">
<attribute name="title">
<string>Preview</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<widget class="QLabel" name="exclusionsPreviewHelpText">
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QPlainTextEdit" name="exclusionsPreviewText"/>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<spacer name="horizontalSpacer_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="bPreviewCopy">
<property name="text">
<string>Copy to Clipboard</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Close</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -12,7 +12,7 @@
</property>
<property name="minimumSize">
<size>
<width>800</width>
<width>1000</width>
<height>600</height>
</size>
</property>
@ -23,28 +23,9 @@
<double>1.000000000000000</double>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QVBoxLayout" name="verticalLayout">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
<number>12</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<layout class="QVBoxLayout" name="verticalLayoutSidebar">
<item>
<widget class="QLabel" name="label">
<property name="text">
@ -53,75 +34,142 @@
</widget>
</item>
<item>
<widget class="QComboBox" name="profileSelector">
<property name="minimumSize">
<widget class="QListWidget" name="profileSelector">
<property name="fixedSize">
<size>
<width>300</width>
<height>0</height>
<width>200</width>
<height>400</height>
</size>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAsNeeded</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileAddButton">
<property name="toolTip">
<string>Add a new profile (Dropdown: Import from file)</string>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::MenuButtonPopup</enum>
</property>
</widget>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QToolButton" name="profileAddButton">
<property name="text">
<string/>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="popupMode">
<enum>QToolButton::InstantPopup</enum>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileDeleteButton">
<property name="toolTip">
<string>Delete current profile</string>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QToolButton" name="profileRenameButton">
<property name="toolTip">
<string>Rename current profile</string>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileExportButton">
<property name="toolTip">
<string>Export current profile</string>
</property>
<property name="iconSize">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QToolButton" name="profileRenameButton">
<property name="toolTip">
<string>Rename current profile</string>
</property>
<property name="iconSize">
<size>
<width>16</width>
<height>16</height>
</size>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileExportButton">
<property name="toolTip">
<string>Export current profile</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="profileDeleteButton">
<property name="toolTip">
<string>Delete current profile</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QPushButton" name="miscButton">
<property name="text">
<string> Settings / About</string>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>40</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="styleSheet">
<string notr="true">QPushButton:focus { border: none; outline: none; }</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item>
<spacer name="bottomSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
@ -130,103 +178,137 @@
</layout>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="documentMode">
<bool>false</bool>
</property>
<property name="tabsClosable">
<bool>false</bool>
</property>
<widget class="QWidget" name="repoTabSlot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Repository</string>
</attribute>
</widget>
<widget class="QWidget" name="sourceTabSlot">
<attribute name="title">
<string>Sources</string>
</attribute>
</widget>
<widget class="QWidget" name="scheduleTabSlot">
<attribute name="title">
<string>Schedule</string>
</attribute>
</widget>
<widget class="QWidget" name="archiveTabSlot">
<attribute name="title">
<string>Archives</string>
</attribute>
</widget>
<widget class="QWidget" name="miscTabSlot">
<attribute name="title">
<string>Misc</string>
</attribute>
</widget>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" alignment="Qt::AlignTop">
<widget class="QPushButton" name="cancelButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="progressText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="1" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="logText">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
<layout class="QVBoxLayout" name="verticalLayoutSidebar">
<item>
<widget class="QTabWidget" name="miscWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="documentMode">
<bool>false</bool>
</property>
<property name="tabsClosable">
<bool>false</bool>
</property>
<widget class="QWidget" name="SettingsTabSlot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Settings</string>
</attribute>
</widget>
<widget class="QWidget" name="AboutTabSlot">
<attribute name="title">
<string>About</string>
</attribute>
</widget>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="documentMode">
<bool>false</bool>
</property>
<property name="tabsClosable">
<bool>false</bool>
</property>
<widget class="QWidget" name="repoTabSlot">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<attribute name="title">
<string>Repository</string>
</attribute>
</widget>
<widget class="QWidget" name="sourceTabSlot">
<attribute name="title">
<string>Sources</string>
</attribute>
</widget>
<widget class="QWidget" name="scheduleTabSlot">
<attribute name="title">
<string>Schedule</string>
</attribute>
</widget>
<widget class="QWidget" name="archiveTabSlot">
<attribute name="title">
<string>Archives</string>
</attribute>
</widget>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="1" column="0" alignment="Qt::AlignTop">
<widget class="QPushButton" name="cancelButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="minimumSize">
<size>
<width>150</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>Cancel</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="progressText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="1" alignment="Qt::AlignTop">
<widget class="QLabel" name="logText">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>

View File

@ -43,113 +43,6 @@
</property>
</spacer>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Vorta Version:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="versionLabel">
<property name="text">
<string>0.0</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;| &lt;a href=&quot;https://github.com/borgbase/vorta/issues/new/choose&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;Report&lt;/span&gt;&lt;/a&gt; a Bug |&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="logLink">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;file:///&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;Log&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="indent">
<number>0</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>5</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Borg Version:</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="borgVersion">
<property name="text">
<string>1.1.8</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="borgPath">
<property name="text">
<string>/usr/bin/borg</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>

View File

@ -1,278 +1,236 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>AddRepository</class>
<widget class="QDialog" name="AddRepository">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>466</width>
<height>274</height>
</rect>
</property>
<property name="modal">
<class>AddRepository</class>
<widget class="QDialog" name="AddRepository">
<property name="modal">
<bool>true</bool>
</property>
<property name="windowTitle">
<string>Add Repository</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="errorText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="2" column="0">
<widget class="QLabel" name="errorText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
</size>
</property>
<property name="font">
<font>
<pointsize>11</pointsize>
</font>
</property>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabWidgetPage1">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QFormLayout" name="repoDataFormLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>20</number>
</property>
<item row="0" column="1">
<widget class="QLabel" name="title">
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Initialize New Backup Repository</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="repoLabel">
<property name="text">
<string>Repository URL:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="repoURL">
<property name="placeholderText">
<string>ssh://abc123@abc123.repo.borgbase.com/./repo</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="chooseLocalFolderButton">
<property name="toolTip">
<string>Choose a local folder</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/folder-open.svg</normaloff>:/icons/folder-open.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="useRemoteRepoButton">
<property name="toolTip">
<string>Choose a remote repository</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/globe.svg</normaloff>:/icons/globe.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Repository Name:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="repoName">
<property name="placeholderText">
<string>Macbook Pro Office (optional)</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string />
<string/>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tabWidgetPage1">
<attribute name="title">
<string>General</string>
</attribute>
<layout class="QFormLayout" name="repoDataFormLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item row="0" column="1">
<widget class="QLabel" name="title">
<property name="font">
<font>
<bold>true</bold>
</font>
</property>
<property name="text">
<string>Initialize New Backup Repository</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="repoLabel">
<property name="text">
<string>Repository URL:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QLineEdit" name="repoURL">
<property name="placeholderText">
<string>ssh://abc123@abc123.repo.borgbase.com/./repo</string>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="chooseLocalFolderButton">
<property name="toolTip">
<string>Choose a local folder</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/folder-open.svg</normaloff>:/icons/folder-open.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QToolButton" name="useRemoteRepoButton">
<property name="toolTip">
<string>Choose a remote repository</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset>
<normaloff>:/icons/globe.svg</normaloff>:/icons/globe.svg</iconset>
</property>
</widget>
</item>
</layout>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Borg passphrase:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="passwordLineEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLineEdit" name="confirmLineEdit">
<property name="enabled">
<bool>true</bool>
</property>
<property name="echoMode">
<enum>QLineEdit::Password</enum>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QLabel" name="confirmLabel">
<property name="text">
<string>Confirm passphrase:</string>
</property>
</widget>
</item>
<item row="4" column="0" colspan="2">
<widget class="QLabel" name="passwordLabel">
<property name="text">
<string>TextLabel</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabWidgetPage2">
<attribute name="title">
<string>Advanced</string>
</attribute>
<layout class="QFormLayout" name="advancedFormLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>SSH Key:</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="sshComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Automatically choose SSH Key (default)</string>
</property>
</item>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="encryptionLabel">
<property name="text">
<string>Encryption:</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QComboBox" name="encryptionComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Extra Borg Arguments:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="extraBorgArgumentsLineEdit" />
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tabWidgetPage2">
<attribute name="title">
<string>Advanced</string>
</attribute>
<layout class="QFormLayout" name="advancedFormLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::ExpandingFieldsGrow</enum>
</property>
<property name="leftMargin">
<number>5</number>
</property>
<property name="topMargin">
<number>5</number>
</property>
<property name="rightMargin">
<number>5</number>
</property>
<property name="bottomMargin">
<number>5</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string>SSH Key:</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</item>
<item row="0" column="1">
<widget class="QComboBox" name="sshComboBox">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<item>
<property name="text">
<string>Automatically choose SSH Key (default)</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<resources />
<connections />
</ui>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Extra Borg Arguments:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QLineEdit" name="extraBorgArgumentsLineEdit"/>
</item>
</layout>
</widget>
</widget>
</item>
<item row="3" column="0">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>

View File

@ -626,6 +626,19 @@
</column>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="logLink">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;file:///&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;View the logs&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="indent">
<number>0</number>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_3">

View File

@ -13,7 +13,7 @@
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2,1">
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="2">
<property name="spacing">
<number>12</number>
</property>
@ -112,6 +112,16 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="bExclude">
<property name="text">
<string>Manage Excluded Items…</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout"/>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -147,65 +157,6 @@
</layout>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1">
<property name="topMargin">
<number>12</number>
</property>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Exclude Patterns (&lt;a href=&quot;https://borgbackup.readthedocs.io/en/stable/usage/help.html#borg-help-patterns&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0984e3;&quot;&gt;more&lt;/span&gt;&lt;/a&gt;):&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>Exclude If Present (exclude folders with these files):</string>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QPlainTextEdit" name="excludePatternsField">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
</property>
<property name="plainText">
<string/>
</property>
<property name="placeholderText">
<string>E.g. */.cache</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPlainTextEdit" name="excludeIfPresentField">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
</property>
<property name="placeholderText">
<string>E.g. .nobackup</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources/>

View File

@ -0,0 +1,71 @@
[
{
"name": "Chromium cache and config files",
"slug": "chromium-cache",
"patterns":
[
"fm:*/.config/chromium/*/Local Storage",
"fm:*/.config/chromium/*/Session Storage",
"fm:*/.config/chromium/*/Service Worker/CacheStorage",
"fm:*/.config/chromium/*/Application Cache",
"fm:*/.config/chromium/*/History Index *",
"fm:*/snap/chromium/common/.cache",
"fm:*/snap/chromium/*/.config/chromium/*/Service Worker/CacheStorage",
"fm:*/snap/chromium/*/.local/share/"
],
"tags":["application:chromium", "type:browser", "os:linux"],
"author": "Divi"
},
{
"name": "Google Chrome cache and config files",
"slug": "google-chrome-cache",
"patterns":
[
"fm:*/.config/google-chrome/ShaderCache",
"fm:*/.config/google-chrome/*/Local Storage",
"fm:*/.config/google-chrome/*/Session Storage",
"fm:*/.config/google-chrome/*/Application Cache",
"fm:*/.config/google-chrome/*/History Index *",
"fm:*/.config/google-chrome/*/Service Worker/CacheStorage"
],
"tags": ["application:chrome", "type:browser", "os:linux"],
"author": "Divi"
},
{
"name": "Brave cache and config files",
"slug": "brave-cache",
"patterns":[
"fm:*/.config/BraveSoftware/Brave-Browser/*/Feature Engagement Tracker/",
"fm:*/.config/BraveSoftware/Brave-Browser/*/Local Storage/",
"fm:*/.config/BraveSoftware/Brave-Browser/*/Service Worker/CacheStorage/",
"fm:*/.config/BraveSoftware/Brave-Browser/*/Session Storage/",
"fm:*/.config/BraveSoftware/Brave-Browser/Safe Browsing/",
"fm:*/.config/BraveSoftware/Brave-Browser/ShaderCache/"
],
"tags": ["application:brave", "type:browser", "os:linux"],
"author": "Divi"
},
{
"name": "Mozilla Firefox cache and config files",
"slug": "firefox-cache",
"patterns":[
"fm:*/.mozilla/firefox/*/Cache",
"fm:*/.mozilla/firefox/*/minidumps",
"fm:*/.mozilla/firefox/*/.parentlock",
"fm:*/.mozilla/firefox/*/urlclassifier3.sqlite",
"fm:*/.mozilla/firefox/*/blocklist.xml",
"fm:*/.mozilla/firefox/*/extensions.sqlite",
"fm:*/.mozilla/firefox/*/extensions.sqlite-journal",
"fm:*/.mozilla/firefox/*/extensions.rdf",
"fm:*/.mozilla/firefox/*/extensions.ini",
"fm:*/.mozilla/firefox/*/extensions.cache",
"fm:*/.mozilla/firefox/*/XUL.mfasl",
"fm:*/.mozilla/firefox/*/XPC.mfasl",
"fm:*/.mozilla/firefox/*/xpti.dat",
"fm:*/.mozilla/firefox/*/compreg.dat",
"fm:*/.mozilla/firefox/*/pluginreg.dat"
],
"tags": ["application:firefox", "type:browser", "os:linux"],
"author": "Divi"
}
]

View File

@ -0,0 +1,99 @@
[
{
"name": "Node Modules and package manager cache",
"slug": "node-cache",
"patterns":
[
"fm:*/node_modules",
"fm:*/.npm",
"fm:*/npm-global"
],
"tags": ["type:dev", "lang:javascript", "os:linux", "os:darwin"],
"author": "Divi"
},
{
"name": "Python cache and virtualenv",
"slug": "python-cache",
"patterns":
[
"fm:*/__pycache__",
"fm:*.pyc",
"fm:*.pyo",
"fm:*/.virtualenvs"
],
"tags": ["type:dev", "lang:python", "os:linux", "os:darwin"],
"author": "Divi"
},
{
"name": "Rust artefacts",
"slug": "rust-artefacts",
"patterns":
[
"fm:*/.cargo",
"fm:*/.rustup"
],
"tags": ["type:dev", "lang:rust", "os:linux", "os:darwin"],
"author": "Divi"
},
{
"name": "Visual Studio Code cache and config files",
"slug": "vscode-cache",
"patterns": [
"fm:*/.config/Code",
"fm:*/.vscode/extensions/*"
],
"tags": ["type:editor", "editor:vscode", "os:linux"],
"author": "shivansh02"
},
{
"name": "Android Studio Artefacts",
"slug": "android-studio",
"patterns": [
"fm:*/.android",
"fm:*/.gradle",
"fm:*/Android/Sdk",
"fm:*/.AndroidStudio"
],
"tags": ["type:dev", "editor:android-studio", "os:linux"],
"author": "shivansh02"
},
{
"name": "Jetbrains IDEs cache, config, path and logs",
"slug": "jetbrains",
"patterns": [
"fm:*/.config/JetBrains",
"fm:*/.cache/JetBrains",
"fm:*/.local/share/JetBrains"
],
"tags": ["type:dev", "editor:jetbrains", "os:linux"],
"author": "SAMAD101"
},
{
"name": "AWS artefacts",
"slug": "aws-artefacts",
"patterns": [
"fm:*/.aws"
],
"tags": ["type:dev", "cloud:aws", "os:linux", "os:darwin"],
"author": "SAMAD101"
},
{
"name": "Spotify cache and config files",
"slug": "spotify",
"patterns": [
"fm:*/.cache/spotify",
"fm:*/.config/spotify"
],
"tags": ["type:media", "media:spotify", "os:linux"],
"author": "SAMAD101"
},
{
"name": "Docker artefacts",
"slug": "docker-artefacts",
"patterns": [
"fm:*/.docker"
],
"tags": ["type:dev", "cloud:docker", "os:linux", "os:darwin"],
"author": "SAMAD101"
}
]

View File

@ -0,0 +1,204 @@
/!\ The Apache version 2 license applies to all SVG icon files in this directory that
have a copyright header referring to "Material Design icons by Google".
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -0,0 +1,99 @@
/!\ The SIL OPEN FONT LICENSE applies to all SVG icon files in this directory that
don't have any other copyright information.
Copyright (c) 2018, Fork Awesome (https://forkawesome.github.io),
with Reserved Font Name Fork Awesome.
This Font Software is licensed under the SIL Open Font License, Version 1.1.
This license is copied below, and is also available with a FAQ at:
http://scripts.sil.org/OFL
-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------
PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.
The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.
DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.
"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).
"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).
"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.
"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.
PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:
1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.
2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.
3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.
5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.
TERMINATION
This license becomes null and void if any of the above conditions are
not met.
DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

View File

@ -1,6 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg viewBox="0 0 512 512" version="1.1" id="svg3" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<defs id="defs7" />
<!--! Font Awesome Pro 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<path d="m 255.985,368 c -8.188,0 -16.38,-3.125 -22.62,-9.375 l -160,-160 c -12.5,-12.5 -12.5,-32.75 0,-45.25 12.5,-12.5 32.75,-12.5 45.25,0 l 137.37,137.425 137.4,-137.4 c 12.5,-12.5 32.75,-12.5 45.25,0 12.5,12.5 12.5,32.75 0,45.25 l -160,160 c -6.25,6.25 -14.45,9.35 -22.65,9.35 z" id="path2" style="fill:#000000;fill-opacity:1;stroke:none" />
</svg>
<!-- Material Design icons by Google (Apache License 2.0) -->
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="m8.12 9.29 3.88 3.88 3.88-3.88c.39-.39 1.02-.39 1.41 0s.39 1.02 0 1.41l-4.59 4.59c-.39.39-1.02.39-1.41 0l-4.59-4.59c-.39-.39-.39-1.02 0-1.41.39-.38 1.03-.39 1.42 0z"/></svg>

Before

Width:  |  Height:  |  Size: 735 B

After

Width:  |  Height:  |  Size: 343 B

View File

@ -1,5 +1,2 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg viewBox="0 0 512 512" version="1.1" id="svg3" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<!--! Font Awesome Pro 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. -->
<path fill="#000000" d="m 416.025,367.925 c -8.188,0 -16.38,-3.125 -22.62,-9.375 l -137.38,-137.325 -137.4,137.4 c -12.5,12.5 -32.75,12.5 -45.25,0 -12.5,-12.5 -12.5,-32.75 0,-45.25 l 160,-160 c 12.5,-12.5 32.75,-12.5 45.25,0 l 160,160 c 12.5,12.5 12.5,32.75 0,45.25 -6.2,6.2 -14.4,9.3 -22.6,9.3 z" id="path2" style="fill:#000000;fill-opacity:1;stroke:none;stroke-opacity:1" />
</svg>
<!-- Material Design icons by Google (Apache License 2.0) -->
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="m8.12 14.71 3.88-3.88 3.88 3.88c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41l-4.59-4.59c-.39-.39-1.02-.39-1.41 0l-4.59 4.59c-.39.39-.39 1.02 0 1.41.39.38 1.03.39 1.42 0z"/></svg>

Before

Width:  |  Height:  |  Size: 742 B

After

Width:  |  Height:  |  Size: 341 B

View File

@ -1 +1,2 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--! Font Awesome Pro 6.0.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) Copyright 2022 Fonticons, Inc. --><path fill="#000000" d="M93.13 257.7C71.25 275.1 53 313.5 38.63 355.1L99 333.1c5.75-2.125 10.62 4.749 6.625 9.499L11 454.7C3.75 486.1 0 510.2 0 510.2s206.6 13.62 266.6-34.12c60-47.87 76.63-150.1 76.63-150.1L256.5 216.7C256.5 216.7 153.1 209.1 93.13 257.7zM633.2 12.34c-10.84-13.91-30.91-16.45-44.91-5.624l-225.7 175.6l-34.99-44.06C322.5 131.9 312.5 133.1 309 140.5L283.8 194.1l86.75 109.2l58.75-12.5c8-1.625 11.38-11.12 6.375-17.5l-33.19-41.79l225.2-175.2C641.6 46.38 644.1 26.27 633.2 12.34z"/></svg>
<!-- Material Design icons by Google (Apache License 2.0) -->
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path fill="#000000" d="m19.36 2.72 1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59l-6.32-6.32c1.2-.9 3.05-.75 4.59.32zm-13.43 14.85c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 379 B

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="utf-8"?>
<svg fill="#000000" width="1792" height="1792" viewBox="0 0 1792 1792" xmlns="http://www.w3.org/2000/svg"><path d="M1696 384q40 0 68 28t28 68v1216q0 40-28 68t-68 28h-960q-40 0-68-28t-28-68v-288h-544q-40 0-68-28t-28-68v-672q0-40 20-88t48-76l408-408q28-28 76-48t88-20h416q40 0 68 28t28 68v328q68-40 128-40h416zm-544 213l-299 299h299v-299zm-640-384l-299 299h299v-299zm196 647l316-316v-416h-384v416q0 40-28 68t-68 28h-416v640h512v-256q0-40 20-88t48-76zm956 804v-1152h-384v416q0 40-28 68t-68 28h-416v640h896z"/></svg>
<!-- Material Design icons by Google (Apache License 2.0) -->
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15 1H4c-1.1 0-2 .9-2 2v13c0 .55.45 1 1 1s1-.45 1-1V4c0-.55.45-1 1-1h10c.55 0 1-.45 1-1s-.45-1-1-1zm.59 4.59l4.83 4.83c.37.37.58.88.58 1.41V21c0 1.1-.9 2-2 2H7.99C6.89 23 6 22.1 6 21l.01-14c0-1.1.89-2 1.99-2h6.17c.53 0 1.04.21 1.42.59zM15 12h4.5L14 6.5V11c0 .55.45 1 1 1z"/></svg>

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 489 B

View File

@ -1,8 +1,14 @@
<svg width="576" height="512" fill="#000000" xmlns="http://www.w3.org/2000/svg">
<!-- Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) -->
<g>
<title>Layer 1</title>
<path id="svg_1" fill="#000000" d="m288,144a110.94,110.94 0 0 0 -31.24,5a55.4,55.4 0 0 1 7.24,27a56,56 0 0 1 -56,56a55.4,55.4 0 0 1 -27,-7.24a111.71,111.71 0 1 0 107,-80.76zm284.52,97.4c-54.23,-105.81 -161.59,-177.4 -284.52,-177.4s-230.32,71.64 -284.52,177.41a32.35,32.35 0 0 0 0,29.19c54.23,105.81 161.59,177.4 284.52,177.4s230.32,-71.64 284.52,-177.41a32.35,32.35 0 0 0 0,-29.19zm-284.52,158.6c-98.65,0 -189.09,-55 -237.93,-144c48.84,-89 139.27,-144 237.93,-144s189.09,55 237.93,144c-48.83,89 -139.27,144 -237.93,144z"/>
<line stroke-linecap="undefined" stroke-linejoin="undefined" id="svg_2" y2="512" x2="575" stroke-width="40" stroke="#000000" />
</g>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" fill="#000000"
viewBox="0 0 1536 1536" style="enable-background:new 0 0 1536 1536;" xml:space="preserve">
<path d="M483.4,1088l65.1-120.3C451.6,896,394,780.8,394,658.8c0-67.4,17.5-134,50.9-192C314.7,535,206.2,642.6,126.9,768
C213.7,905.4,336.5,1020.6,483.4,1088z M808.1,440.3c0-22.2-18.4-41-40.1-41c-139.4,0-253.8,116.9-253.8,259.4
c0,22.2,18.4,41,40.1,41s40.1-18.8,40.1-41c0-98.1,78.5-177.5,173.6-177.5C789.7,481.3,808.1,462.5,808.1,440.3z M1111.1,277.3
c0,1.7,0,6-0.8,7.7c-176.1,321.7-350.6,645.1-526.7,966.8l-40.9,75.9c-5,8.5-14.2,13.7-23.4,13.7c-15,0-94.3-49.5-111.9-59.7
c-8.3-5.1-13.4-13.7-13.4-23.9c0-13.7,28.4-59.7,36.7-74.2c-161.9-75.1-298-203.1-394-356.7c-10.9-17.1-16.7-37.5-16.7-58.9
c0-20.5,5.8-41.8,16.7-58.9C202.1,449.7,460,276.5,768,276.5c50.1,0,101,5.1,150.2,14.5l45.1-82.8c5-8.5,13.4-13.7,23.4-13.7
c15,0,93.5,49.5,111,59.7C1106.1,259.4,1111.1,267.9,1111.1,277.3z M1142,658.8c0,158.7-96,300.4-240.4,356.7l233.7-428.4
C1139.4,611,1142,634.9,1142,658.8z M1515.9,768c0,22.2-5.8,40.1-16.7,58.9c-25.9,43.5-58.4,85.3-91,123.7
c-163.6,192-389,308.9-640.2,308.9l61.8-112.6c242.9-21.3,449.1-172.4,579.3-378.9c-61.8-98.1-141.1-184.3-235.4-250.9l52.6-95.6
c103.5,70.8,207.8,177.5,273,287.6C1510.1,727.9,1515.9,745.8,1515.9,768z"/>
</svg>

Before

Width:  |  Height:  |  Size: 961 B

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -1 +1,10 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="#000000" viewBox="0 0 576 512"><!-- Font Awesome Free 5.15.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) --><path d="M288 144a110.94 110.94 0 0 0-31.24 5 55.4 55.4 0 0 1 7.24 27 56 56 0 0 1-56 56 55.4 55.4 0 0 1-27-7.24A111.71 111.71 0 1 0 288 144zm284.52 97.4C518.29 135.59 410.93 64 288 64S57.68 135.64 3.48 241.41a32.35 32.35 0 0 0 0 29.19C57.71 376.41 165.07 448 288 448s230.32-71.64 284.52-177.41a32.35 32.35 0 0 0 0-29.19zM288 400c-98.65 0-189.09-55-237.93-144C98.91 167 189.34 112 288 112s189.09 55 237.93 144C477.1 345 386.66 400 288 400z"/></svg>
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" fill="#000000"
viewBox="0 0 1536 1536" style="enable-background:new 0 0 1536 1536;" xml:space="preserve">
<path d="M1404.2,768c-78.7-121.8-186.4-226.2-315.6-292.4c33.1,56.3,50.5,120.9,50.5,186.4c0,204.6-166.5,371.1-371.1,371.1
S396.9,866.6,396.9,662c0-65.4,17.4-130.1,50.5-186.4C318.2,541.8,210.5,646.2,131.8,768c141.7,218.7,370.3,371.1,636.2,371.1
S1262.6,986.7,1404.2,768z M807.8,449.9c0-21.5-18.2-39.8-39.8-39.8c-138.3,0-251.8,113.5-251.8,251.8c0,21.5,18.2,39.8,39.8,39.8
c21.5,0,39.8-18.2,39.8-39.8c0-94.4,77.9-172.3,172.3-172.3C789.5,489.7,807.8,471.4,807.8,449.9z M1510.3,768
c0,20.7-6.6,39.8-16.6,57.2c-152.4,251-431.6,420-725.7,420s-573.3-169.8-725.7-420c-9.9-17.4-16.6-36.5-16.6-57.2
s6.6-39.8,16.6-57.2c152.4-250.2,431.6-420,725.7-420s573.3,169.8,725.7,420C1503.6,728.2,1510.3,747.3,1510.3,768z"/>
</svg>

Before

Width:  |  Height:  |  Size: 705 B

After

Width:  |  Height:  |  Size: 987 B

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 108 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg viewBox="0 0 64 64" version="1.1" id="svg6" sodipodi:docname="help-about.svg" width="64" height="64" inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview id="namedview8" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageshadow="2" inkscape:pageopacity="0.0" inkscape:pagecheckerboard="0" showgrid="false" inkscape:zoom="13.068182" inkscape:cx="52.37913" inkscape:cy="41.972174" inkscape:window-width="3840" inkscape:window-height="2107" inkscape:window-x="0" inkscape:window-y="0" inkscape:window-maximized="1" inkscape:current-layer="svg6" />
<defs id="defs3051">
<style type="text/css" id="current-color-scheme">
.ColorScheme-Text {
color:#000000;
}
</style>
</defs>
<path style="fill:currentColor;fill-opacity:1;stroke:none;stroke-width:2.90909" d="m 31.999999,8.7272725 c -12.893091,0 -23.2727265,10.3796355 -23.2727265,23.2727265 0,12.893091 10.3796355,23.272729 23.2727265,23.272729 C 44.89309,55.272728 55.272728,44.89309 55.272728,32 55.272727,19.106908 44.89309,8.7272725 31.999999,8.7272725 Z m 0,2.9090905 c 11.281455,0 20.363637,9.082182 20.363637,20.363636 0,11.281455 -9.082182,20.363637 -20.363637,20.363637 -11.281454,0 -20.363636,-9.082182 -20.363636,-20.363637 0,-11.281454 9.082182,-20.363636 20.363636,-20.363636 z m -2.909091,5.818182 v 5.818182 h 5.818182 v -5.818182 z m 0,8.727272 V 46.545454 H 34.90909 V 26.181817 Z" class="ColorScheme-Text" id="path4" />
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -1,6 +1 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="128px" viewBox="0 0 128 128" width="128px" xmlns="http://www.w3.org/2000/svg">
<path d="m 127.183594 82.421875 v 21.050781 c 0 5.8125 -4.714844 10.527344 -10.527344 10.527344 h -105.265625 c -5.8125 0 -10.527344 -4.714844 -10.527344 -10.527344 v -21.050781 c 0 -5.8125 4.714844 -10.527344 10.527344 -10.527344 h 105.265625 c 5.8125 0 10.527344 4.714844 10.527344 10.527344 z m -10.527344 -17.546875 c 2.324219 0 4.605469 0.460938 6.753906 1.359375 l -21.160156 -31.753906 c -1.953125 -2.9375 -5.242188 -4.691407 -8.75 -4.691407 h -58.929688 c -3.507812 0 -6.796874 1.753907 -8.75 4.691407 l -21.183593 31.753906 c 2.148437 -0.898437 4.429687 -1.359375 6.753906 -1.359375 z m -10.527344 21.054688 c -3.878906 0 -7.015625 3.136718 -7.015625 7.019531 c 0 3.878906 3.136719 7.015625 7.015625 7.015625 c 3.882813 0 7.019532 -3.136719 7.019532 -7.015625 c 0 -3.882813 -3.136719 -7.019531 -7.019532 -7.019531 z m -21.050781 0 c -3.882813 0 -7.019531 3.136718 -7.019531 7.019531 c 0 3.878906 3.136718 7.015625 7.019531 7.015625 c 3.878906 0 7.015625 -3.136719 7.015625 -7.015625 c 0 -3.882813 -3.136719 -7.019531 -7.015625 -7.019531 z m 0 0" fill="#888888"/>
<path d="m 92.09375 92.992188 c 0 3.898437 -3.160156 7.0625 -7.058594 7.0625 c -3.902344 0 -7.0625 -3.164063 -7.0625 -7.0625 c 0 -3.902344 3.160156 -7.0625 7.0625 -7.0625 c 3.898438 0 7.058594 3.160156 7.058594 7.0625 z m 0 0" fill="#e65100"/>
<path d="m 113.191406 92.949219 c 0 3.898437 -3.160156 7.058593 -7.0625 7.058593 c -3.898437 0 -7.058594 -3.160156 -7.058594 -7.058593 c 0 -3.902344 3.160157 -7.0625 7.058594 -7.0625 c 3.902344 0 7.0625 3.160156 7.0625 7.0625 z m 0 0" fill="#ff9800"/>
</svg>
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" height="128px" viewBox="0 0 128 128" width="128px"><path fill="#888" fill-rule="evenodd" d="M1.288 84.818c0-9.344 7.019-16.918 15.678-16.918h94.068c8.659 0 15.678 7.574 15.678 16.918v8.459c0 9.344-7.019 16.918-15.678 16.918H16.966c-8.659 0-15.678-7.574-15.678-16.918v-8.459z" clip-rule="evenodd"/><circle cx="88.306" cy="89.581" r="6.821" fill="#E65100"/><circle cx="108.662" cy="89.581" r="6.821" fill="#FF9800"/><path fill="#888" d="M8.421 61.167a21.931 21.931 0 0 1 8.545-1.725h94.068c3.01 0 5.895.609 8.545 1.725l-14.635-28.946c-2.06-4.078-6.02-6.615-10.324-6.615H33.381c-4.304 0-8.264 2.537-10.324 6.615L8.421 61.167z"/></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 693 B

View File

@ -0,0 +1,265 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
version="1.0"
id="svg2"
sodipodi:version="0.32"
inkscape:version="1.2.1 (9c6d41e410, 2022-07-14)"
sodipodi:docname="python-logo-only.svg"
width="83.371017pt"
height="101.00108pt"
inkscape:export-filename="python-logo-only.png"
inkscape:export-xdpi="232.44"
inkscape:export-ydpi="232.44"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<metadata
id="metadata371">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<sodipodi:namedview
inkscape:window-height="2080"
inkscape:window-width="1976"
inkscape:pageshadow="2"
inkscape:pageopacity="0.0"
guidetolerance="10.0"
gridtolerance="10.0"
objecttolerance="10.0"
borderopacity="1.0"
bordercolor="#666666"
pagecolor="#ffffff"
id="base"
inkscape:zoom="2.1461642"
inkscape:cx="91.558698"
inkscape:cy="47.9926"
inkscape:window-x="1092"
inkscape:window-y="72"
inkscape:current-layer="svg2"
width="210mm"
height="40mm"
units="mm"
inkscape:showpageshadow="2"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="pt"
showgrid="false"
inkscape:window-maximized="0" />
<defs
id="defs4">
<linearGradient
id="linearGradient2795">
<stop
style="stop-color:#b8b8b8;stop-opacity:0.49803922;"
offset="0"
id="stop2797" />
<stop
style="stop-color:#7f7f7f;stop-opacity:0;"
offset="1"
id="stop2799" />
</linearGradient>
<linearGradient
id="linearGradient2787">
<stop
style="stop-color:#7f7f7f;stop-opacity:0.5;"
offset="0"
id="stop2789" />
<stop
style="stop-color:#7f7f7f;stop-opacity:0;"
offset="1"
id="stop2791" />
</linearGradient>
<linearGradient
id="linearGradient3676">
<stop
style="stop-color:#b2b2b2;stop-opacity:0.5;"
offset="0"
id="stop3678" />
<stop
style="stop-color:#b3b3b3;stop-opacity:0;"
offset="1"
id="stop3680" />
</linearGradient>
<linearGradient
id="linearGradient3236">
<stop
style="stop-color:#f4f4f4;stop-opacity:1"
offset="0"
id="stop3244" />
<stop
style="stop-color:white;stop-opacity:1"
offset="1"
id="stop3240" />
</linearGradient>
<linearGradient
id="linearGradient4671">
<stop
style="stop-color:#ffd43b;stop-opacity:1;"
offset="0"
id="stop4673" />
<stop
style="stop-color:#ffe873;stop-opacity:1"
offset="1"
id="stop4675" />
</linearGradient>
<linearGradient
id="linearGradient4689">
<stop
style="stop-color:#5a9fd4;stop-opacity:1;"
offset="0"
id="stop4691" />
<stop
style="stop-color:#306998;stop-opacity:1;"
offset="1"
id="stop4693" />
</linearGradient>
<linearGradient
x1="224.23996"
y1="144.75717"
x2="-65.308502"
y2="144.75717"
id="linearGradient2987"
xlink:href="#linearGradient4671"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(100.2702,99.61116)" />
<linearGradient
x1="172.94208"
y1="77.475983"
x2="26.670298"
y2="76.313133"
id="linearGradient2990"
xlink:href="#linearGradient4689"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(100.2702,99.61116)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4689"
id="linearGradient2587"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(100.2702,99.61116)"
x1="172.94208"
y1="77.475983"
x2="26.670298"
y2="76.313133" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4671"
id="linearGradient2589"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(100.2702,99.61116)"
x1="224.23996"
y1="144.75717"
x2="-65.308502"
y2="144.75717" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4689"
id="linearGradient2248"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(100.2702,99.61116)"
x1="172.94208"
y1="77.475983"
x2="26.670298"
y2="76.313133" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4671"
id="linearGradient2250"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(100.2702,99.61116)"
x1="224.23996"
y1="144.75717"
x2="-65.308502"
y2="144.75717" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4671"
id="linearGradient2255"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)"
x1="224.23996"
y1="144.75717"
x2="-65.308502"
y2="144.75717" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4689"
id="linearGradient2258"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.562541,0,0,0.567972,-11.5974,-7.60954)"
x1="172.94208"
y1="76.176224"
x2="26.670298"
y2="76.313133" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2795"
id="radialGradient2801"
cx="61.518883"
cy="132.28575"
fx="61.518883"
fy="132.28575"
r="29.036913"
gradientTransform="matrix(1,0,0,0.177966,0,108.7434)"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4671"
id="linearGradient1475"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.562541,0,0,0.567972,-14.99112,-11.702371)"
x1="150.96111"
y1="192.35176"
x2="112.03144"
y2="137.27299" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4689"
id="linearGradient1478"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.562541,0,0,0.567972,-14.99112,-11.702371)"
x1="26.648937"
y1="20.603781"
x2="135.66525"
y2="114.39767" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient2795"
id="radialGradient1480"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.7490565e-8,-0.23994696,1.054668,3.7915457e-7,-83.7008,142.46201)"
cx="61.518883"
cy="132.28575"
fx="61.518883"
fy="132.28575"
r="29.036913" />
</defs>
<path
style="fill:url(#linearGradient1478);fill-opacity:1"
d="M 54.918785,9.1927421e-4 C 50.335132,0.02221727 45.957846,0.41313697 42.106285,1.0946693 30.760069,3.0991731 28.700036,7.2947714 28.700035,15.032169 v 10.21875 h 26.8125 v 3.40625 h -26.8125 -10.0625 c -7.792459,0 -14.6157588,4.683717 -16.7499998,13.59375 -2.46181998,10.212966 -2.57101508,16.586023 0,27.25 1.9059283,7.937852 6.4575432,13.593748 14.2499998,13.59375 h 9.21875 v -12.25 c 0,-8.849902 7.657144,-16.656248 16.75,-16.65625 h 26.78125 c 7.454951,0 13.406253,-6.138164 13.40625,-13.625 v -25.53125 c 0,-7.2663386 -6.12998,-12.7247771 -13.40625,-13.9374997 C 64.281548,0.32794397 59.502438,-0.02037903 54.918785,9.1927421e-4 Z m -14.5,8.21875012579 c 2.769547,0 5.03125,2.2986456 5.03125,5.1249996 -2e-6,2.816336 -2.261703,5.09375 -5.03125,5.09375 -2.779476,-1e-6 -5.03125,-2.277415 -5.03125,-5.09375 -10e-7,-2.826353 2.251774,-5.1249996 5.03125,-5.1249996 z"
id="path1948" />
<path
style="fill:url(#linearGradient1475);fill-opacity:1"
d="m 85.637535,28.657169 v 11.90625 c 0,9.230755 -7.825895,16.999999 -16.75,17 h -26.78125 c -7.335833,0 -13.406249,6.278483 -13.40625,13.625 v 25.531247 c 0,7.266344 6.318588,11.540324 13.40625,13.625004 8.487331,2.49561 16.626237,2.94663 26.78125,0 6.750155,-1.95439 13.406253,-5.88761 13.40625,-13.625004 V 86.500919 h -26.78125 v -3.40625 h 26.78125 13.406254 c 7.792461,0 10.696251,-5.435408 13.406241,-13.59375 2.79933,-8.398886 2.68022,-16.475776 0,-27.25 -1.92578,-7.757441 -5.60387,-13.59375 -13.406241,-13.59375 z m -15.0625,64.65625 c 2.779478,3e-6 5.03125,2.277417 5.03125,5.093747 -2e-6,2.826354 -2.251775,5.125004 -5.03125,5.125004 -2.76955,0 -5.03125,-2.29865 -5.03125,-5.125004 2e-6,-2.81633 2.261697,-5.093747 5.03125,-5.093747 z"
id="path1950" />
<ellipse
style="opacity:0.44382;fill:url(#radialGradient1480);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:15.4174;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
id="path1894"
cx="55.816761"
cy="127.70079"
rx="35.930977"
ry="6.9673119" />
</svg>

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"><path fill="#000000" d="m370-80-16-128q-13-5-24.5-12T307-235l-119 50L78-375l103-78q-1-7-1-13.5v-27q0-6.5 1-13.5L78-585l110-190 119 50q11-8 23-15t24-12l16-128h220l16 128q13 5 24.5 12t22.5 15l119-50 110 190-103 78q1 7 1 13.5v27q0 6.5-2 13.5l103 78-110 190-118-50q-11 8-23 15t-24 12L590-80H370Zm70-80h79l14-106q31-8 57.5-23.5T639-327l99 41 39-68-86-65q5-14 7-29.5t2-31.5q0-16-2-31.5t-7-29.5l86-65-39-68-99 42q-22-23-48.5-38.5T533-694l-13-106h-79l-14 106q-31 8-57.5 23.5T321-633l-99-41-39 68 86 64q-5 15-7 30t-2 32q0 16 2 31t7 30l-86 65 39 68 99-42q22 23 48.5 38.5T427-266l13 106Zm42-180q58 0 99-41t41-99q0-58-41-99t-99-41q-59 0-99.5 41T342-480q0 58 40.5 99t99.5 41Zm-2-140Z"/></svg>

After

Width:  |  Height:  |  Size: 768 B

View File

@ -0,0 +1 @@
<svg fill="#000000" viewBox="0 0 448 512" xmlns="http://www.w3.org/2000/svg"><path d="m224 256c70.7 0 128-57.3 128-128s-57.3-128-128-128-128 57.3-128 128 57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7c-74.2 0-134.4 60.2-134.4 134.4v41.6c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"/></svg>

After

Width:  |  Height:  |  Size: 365 B

View File

@ -1,6 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>com.borgbase.Vorta</id>
<launchable type="desktop-id">com.borgbase.Vorta.desktop</launchable>
<developer_name>Vorta contributors</developer_name>
<name>Vorta</name>
<project_license>GPL-3.0</project_license>
<metadata_license>CC0-1.0</metadata_license>
@ -40,7 +42,18 @@
</screenshot>
</screenshots>
<releases>
<release version="v0.8.10" date="2023-01-22">
<release version="v0.9.1" date="2024-01-10" urgency="low">
<description>
<ul>
<li>First production 0.9 release</li>
<li>Exclude GUI. By @diivi (#1846)</li>
<li>Backup settings.db before migrations. By @AdwaitSalankar (#1848)</li>
<li>Loosen platformdirs dependency (#1843)</li>
<li>Unit test improvements and coverage increase. By @bigtedde (#1787)</li>
<li>Profile sidebar and new setting interface. By @bigtedde (#1809)</li>
<li>Update macOS notarization for use with notarytool (#1831)</li>
</ul>
</description>
</release>
</releases>
<url type="bugtracker">https://github.com/borgbase/vorta/issues</url>

View File

@ -1,5 +1,25 @@
import sys
try:
from Cocoa import NSURL, NSBundle
from CoreFoundation import kCFAllocatorDefault
from Foundation import NSDictionary
from LaunchServices import (
LSSharedFileListCopySnapshot,
LSSharedFileListCreate,
LSSharedFileListInsertItemURL,
LSSharedFileListItemRemove,
LSSharedFileListItemResolve,
kLSSharedFileListItemHidden,
kLSSharedFileListItemLast,
kLSSharedFileListNoUserInteraction,
kLSSharedFileListSessionLoginItems,
)
APP_PATH = NSBundle.mainBundle().bundlePath()
except ImportError:
pass
AUTOSTART_DELAY = """StartupNotify=false
X-GNOME-Autostart-enabled=true
X-GNOME-Autostart-Delay=20"""
@ -11,25 +31,8 @@ def open_app_at_startup(enabled=True):
while on Linux it adds a .desktop file at ~/.config/autostart
"""
if sys.platform == 'darwin':
from Cocoa import NSURL, NSBundle
from CoreFoundation import kCFAllocatorDefault
from Foundation import NSDictionary
# CF = CDLL(find_library('CoreFoundation'))
from LaunchServices import (
LSSharedFileListCopySnapshot,
LSSharedFileListCreate,
LSSharedFileListInsertItemURL,
LSSharedFileListItemRemove,
LSSharedFileListItemResolve,
kLSSharedFileListItemHidden,
kLSSharedFileListItemLast,
kLSSharedFileListNoUserInteraction,
kLSSharedFileListSessionLoginItems,
)
app_path = NSBundle.mainBundle().bundlePath()
url = NSURL.alloc().initFileURLWithPath_(app_path)
url = NSURL.alloc().initFileURLWithPath_(APP_PATH)
login_items = LSSharedFileListCreate(kCFAllocatorDefault, kLSSharedFileListSessionLoginItems, None)
props = NSDictionary.dictionaryWithObject_forKey_(True, kLSSharedFileListItemHidden)
@ -47,7 +50,8 @@ def open_app_at_startup(enabled=True):
elif sys.platform.startswith('linux'):
from pathlib import Path
from appdirs import user_config_dir
from platformdirs import user_config_path
is_flatpak = Path('/.flatpak-info').exists()
@ -58,7 +62,7 @@ def open_app_at_startup(enabled=True):
if is_flatpak:
autostart_path = Path.home() / '.config' / 'autostart'
else:
autostart_path = Path(user_config_dir("autostart"))
autostart_path = user_config_path("autostart")
if not autostart_path.exists():
autostart_path.mkdir(parents=True, exist_ok=True)

View File

@ -11,8 +11,10 @@ from collections import namedtuple
from datetime import datetime as dt
from subprocess import PIPE, Popen, TimeoutExpired
from threading import Lock
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication
from PyQt6 import QtCore
from PyQt6.QtWidgets import QApplication
from vorta import application
from vorta.borg.jobs_manager import JobInterface
from vorta.i18n import trans_late, translate
@ -25,7 +27,7 @@ keyring_lock = Lock()
db_lock = Lock()
logger = logging.getLogger(__name__)
FakeRepo = namedtuple('Repo', ['url', 'id', 'extra_borg_arguments', 'encryption'])
FakeRepo = namedtuple('Repo', ['url', 'name', 'id', 'extra_borg_arguments', 'encryption'])
FakeProfile = namedtuple('FakeProfile', ['id', 'repo', 'name', 'ssh_key'])
"""
@ -188,6 +190,7 @@ class BorgJob(JobInterface, BackupProfileMixin):
ret['ssh_key'] = profile.ssh_key
ret['repo_id'] = profile.repo.id
ret['repo_url'] = profile.repo.url
ret['repo_name'] = profile.repo.name
ret['extra_borg_arguments'] = profile.repo.extra_borg_arguments
ret['profile_name'] = profile.name
ret['profile_id'] = profile.id
@ -270,7 +273,9 @@ class BorgJob(JobInterface, BackupProfileMixin):
'profile_name': self.params.get('profile_name'),
'cmd': self.params['cmd'][1],
}
self.app.backup_log_event.emit(f'{parsed["levelname"]}: {parsed["message"]}', context)
self.app.backup_log_event.emit(
f'[{self.params["profile_name"]}] {parsed["levelname"]}: {parsed["message"]}', context
)
level_int = getattr(logging, parsed["levelname"])
logger.log(level_int, parsed["message"])
@ -279,9 +284,11 @@ class BorgJob(JobInterface, BackupProfileMixin):
error_messages.append((level_int, parsed["message"]))
elif parsed['type'] == 'file_status':
self.app.backup_log_event.emit(f'{parsed["path"]} ({parsed["status"]})', {})
self.app.backup_log_event.emit(
f'[{self.params["profile_name"]}] {parsed["path"]} ({parsed["status"]})', {}
)
elif parsed['type'] == 'progress_percent' and parsed.get("message"):
self.app.backup_log_event.emit(f'{parsed["message"]}', {})
self.app.backup_log_event.emit(f'[{self.params["profile_name"]}] {parsed["message"]}', {})
elif parsed['type'] == 'archive_progress' and not parsed.get('finished', False):
msg = (
f"{translate('BorgJob','Files')}: {parsed['nfiles']}, "
@ -289,11 +296,11 @@ class BorgJob(JobInterface, BackupProfileMixin):
# f"{translate('BorgJob','Compressed')}: {pretty_bytes(parsed['compressed_size'])}, "
f"{translate('BorgJob','Deduplicated')}: {pretty_bytes(parsed['deduplicated_size'])}" # noqa: E501
)
self.app.backup_progress_event.emit(msg)
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {msg}")
except json.decoder.JSONDecodeError:
msg = line.strip()
if msg: # Log only if there is something to log.
self.app.backup_log_event.emit(msg, {})
self.app.backup_log_event.emit(f'[{self.params["profile_name"]}] {msg}', {})
logger.warning(msg)
if p.poll() is not None:

View File

@ -4,11 +4,13 @@ from .borg_job import BorgJob
class BorgBreakJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Breaking repository lock…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Breaking repository lock…')}")
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
self.app.backup_progress_event.emit(self.tr('Repository lock broken. Please redo your last action.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] {self.tr('Repository lock broken. Please redo your last action.')}"
)
self.result.emit(result)
@classmethod

View File

@ -1,12 +1,16 @@
from typing import Any, Dict
from vorta import config
from vorta.i18n import translate
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgCheckJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Starting consistency check…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Starting consistency check…')}")
def finished_event(self, result: Dict[str, Any]):
"""
@ -20,10 +24,15 @@ class BorgCheckJob(BorgJob):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
if result['returncode'] != 0:
self.app.backup_progress_event.emit(self.tr('Repo check failed. See logs for details.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] "
+ translate('RepoCheckJob', 'Repo check failed. See the <a href="{0}">logs</a> for details.').format(
config.LOG_DIR.as_uri()
)
)
self.app.check_failed_event.emit(result)
else:
self.app.backup_progress_event.emit(self.tr('Check completed.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Check completed.')}")
@classmethod
def prepare(cls, profile):

View File

@ -1,13 +1,18 @@
from typing import Any, Dict
from vorta.i18n import trans_late
from vorta import config
from vorta.i18n import translate
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgCompactJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Starting repository compaction...'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']} {self.tr('Starting repository compaction...')}]"
)
def finished_event(self, result: Dict[str, Any]):
"""
@ -21,9 +26,14 @@ class BorgCompactJob(BorgJob):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
if result['returncode'] != 0:
self.app.backup_progress_event.emit(self.tr('Errors during compaction. See logs for details.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] "
+ translate(
'BorgCompactJob', 'Errors during compaction. See the <a href="{0}">logs</a> for details.'
).format(config.LOG_DIR.as_uri())
)
else:
self.app.backup_progress_event.emit(self.tr('Compaction completed.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Compaction completed.')}")
@classmethod
def prepare(cls, profile):
@ -34,9 +44,7 @@ class BorgCompactJob(BorgJob):
ret['ok'] = False # Set back to false, so we can do our own checks here.
if not borg_compat.check('COMPACT_SUBCOMMAND'):
ret['ok'] = False
ret['message'] = trans_late('messages', 'This feature needs Borg 1.2.0 or higher.')
return ret
raise Exception('The compact action needs Borg >= 1.2.0')
cmd = ['borg', '--info', '--log-json', 'compact', '--progress']
if borg_compat.check('V2'):

View File

@ -2,9 +2,17 @@ import os
import subprocess
import tempfile
from datetime import datetime as dt
from vorta.i18n import trans_late
from vorta.store.models import ArchiveModel, RepoModel, SourceFileModel, WifiSettingModel
from vorta import config
from vorta.i18n import trans_late, translate
from vorta.store.models import (
ArchiveModel,
RepoModel,
SourceFileModel,
WifiSettingModel,
)
from vorta.utils import borg_compat, format_archive_name, get_network_status_monitor
from .borg_job import BorgJob
@ -20,6 +28,7 @@ class BorgCreateJob(BorgJob):
'repo': result['params']['repo_id'],
'duration': result['data']['archive']['duration'],
'size': result['data']['archive']['stats']['deduplicated_size'],
'trigger': result['params'].get('category', 'user'),
},
)
new_archive.save()
@ -33,16 +42,23 @@ class BorgCreateJob(BorgJob):
repo.save()
if result['returncode'] == 1:
self.app.backup_progress_event.emit(self.tr('Backup finished with warnings. See logs for details.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] "
+ translate(
'BorgCreateJob',
'Backup finished with warnings. See the <a href="{0}">logs</a> for details.',
).format(config.LOG_DIR.as_uri())
)
else:
self.app.backup_progress_event.emit(self.tr('Backup finished.'))
self.app.backup_log_event.emit('', {})
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Backup finished.')}")
def progress_event(self, fmt):
self.app.backup_progress_event.emit(fmt)
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {fmt}")
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Backup started.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Backup started.')}")
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
@ -77,7 +93,7 @@ class BorgCreateJob(BorgJob):
else:
ret['ok'] = False # Set back to False, so we can do our own checks here.
n_backup_folders = SourceFileModel.select().count()
n_backup_folders = SourceFileModel.select().where(SourceFileModel.profile == profile).count()
# cmd options like `--paths-from-command` require a command
# that is appended to the arguments
@ -148,24 +164,24 @@ class BorgCreateJob(BorgJob):
# Add excludes
# Partly inspired by borgmatic/borgmatic/borg/create.py
if profile.exclude_patterns is not None:
exclude_dirs = []
for p in profile.exclude_patterns.split('\n'):
if p.strip():
expanded_directory = os.path.expanduser(p.strip())
exclude_dirs.append(expanded_directory)
exclude_dirs = []
for p in profile.get_combined_exclusion_string().split('\n'):
if p.strip():
expanded_directory = os.path.expanduser(p.strip())
exclude_dirs.append(expanded_directory)
if exclude_dirs:
pattern_file = tempfile.NamedTemporaryFile('w', delete=True)
pattern_file.write('\n'.join(exclude_dirs))
pattern_file.flush()
cmd.extend(['--exclude-from', pattern_file.name])
ret['cleanup_files'].append(pattern_file)
if exclude_dirs:
pattern_file = tempfile.NamedTemporaryFile('w', delete=True)
pattern_file.write('\n'.join(exclude_dirs))
pattern_file.flush()
cmd.extend(['--exclude-from', pattern_file.name])
ret['cleanup_files'].append(pattern_file)
if profile.exclude_if_present is not None:
for f in profile.exclude_if_present.split('\n'):
if f.strip():
cmd.extend(['--exclude-if-present', f.strip()])
# Currently not in use, but may be added back to the UI later.
# if profile.exclude_if_present is not None:
# for f in profile.exclude_if_present.split('\n'):
# if f.strip():
# cmd.extend(['--exclude-if-present', f.strip()])
# Add repo url and source dirs.
new_archive_name = format_archive_name(profile, profile.new_archive_name)

View File

@ -1,13 +1,15 @@
from typing import List
from vorta.store.models import RepoModel
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgDeleteJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Deleting archive…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Deleting archive…')}")
def finished_event(self, result):
# set repo stats to N/A
@ -20,7 +22,7 @@ class BorgDeleteJob(BorgJob):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
self.app.backup_progress_event.emit(self.tr('Archive deleted.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Archive deleted.')}")
@classmethod
def prepare(cls, profile, archives: List[str]):

View File

@ -1,15 +1,20 @@
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgDiffJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Requesting differences between archives…'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] {self.tr('Requesting differences between archives…')}"
)
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
self.app.backup_progress_event.emit(self.tr('Obtained differences between archives.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] {self.tr('Obtained differences between archives.')}"
)
self.result.emit(result)
@classmethod

View File

@ -1,20 +1,27 @@
import tempfile
from PyQt5.QtCore import QModelIndex, Qt
from PyQt6.QtCore import QModelIndex, Qt
from vorta.utils import borg_compat
from vorta.views.extract_dialog import ExtractTree, FileData
from vorta.views.partials.treemodel import FileSystemItem, path_to_str
from .borg_job import BorgJob
class BorgExtractJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Downloading files from archive…'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] {self.tr('Downloading files from archive…')}"
)
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
self.app.backup_progress_event.emit(self.tr('Restored files from archive.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] {self.tr('Restored files from archive.')}"
)
@classmethod
def prepare(cls, profile, archive_name, model: ExtractTree, destination_folder):
@ -36,7 +43,7 @@ class BorgExtractJob(BorgJob):
# Unselected (and excluded) parent folders will be restored by borg
# but without the metadata stored in the archive.
pattern_file = tempfile.NamedTemporaryFile('w', delete=True)
pattern_file.write("P fm\n")
pattern_file.write("P pf\n")
indexes = [QModelIndex()]
while indexes:
@ -50,7 +57,7 @@ class BorgExtractJob(BorgJob):
if item.data.checkstate == Qt.CheckState.Checked:
pattern_file.write("+ " + path_to_str(item.path) + "\n")
pattern_file.write("- *\n")
pattern_file.write("- fm:*\n")
pattern_file.flush()
cmd.extend(['--patterns-from', pattern_file.name])
ret['cleanup_files'].append(pattern_file)

View File

@ -1,17 +1,18 @@
from vorta.store.models import ArchiveModel, RepoModel
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgInfoArchiveJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Refreshing archive…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Refreshing archive…')}")
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
self.app.backup_progress_event.emit(self.tr('Refreshing archive done.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Refreshing archive done.')}")
@classmethod
def prepare(cls, profile, archive_name):
@ -40,6 +41,11 @@ class BorgInfoArchiveJob(BorgJob):
# Update remote archives.
for remote_archive in remote_archives:
archive = ArchiveModel.get_or_none(snapshot_id=remote_archive['id'], repo=repo_id)
if archive is None:
# archive id was changed during rename, so we need to find it by name
archive = ArchiveModel.get_or_none(name=remote_archive['name'], repo=repo_id)
archive.snapshot_id = remote_archive['id']
archive.name = remote_archive['name'] # incase name changed
# archive.time = parser.parse(remote_archive['time'])
archive.duration = remote_archive['duration']

View File

@ -1,6 +1,7 @@
from vorta.i18n import trans_late
from vorta.store.models import RepoModel
from vorta.utils import borg_compat
from .borg_job import BorgJob, FakeProfile, FakeRepo
@ -17,7 +18,7 @@ class BorgInfoRepoJob(BorgJob):
# Build fake profile because we don't have it in the DB yet. Assume unencrypted.
profile = FakeProfile(
999,
FakeRepo(params['repo_url'], 999, params['extra_borg_arguments'], 'none'),
FakeRepo(params['repo_url'], params['repo_name'], 999, params['extra_borg_arguments'], 'none'),
'New Repo',
params['ssh_key'],
)
@ -46,6 +47,7 @@ class BorgInfoRepoJob(BorgJob):
ret['message'] = trans_late('messages', 'Please unlock your password manager.')
return ret
ret['repo_name'] = params['repo_name']
ret['ok'] = True
ret['cmd'] = cmd
@ -53,7 +55,9 @@ class BorgInfoRepoJob(BorgJob):
def process_result(self, result):
if result['returncode'] == 0:
new_repo, _ = RepoModel.get_or_create(url=result['cmd'][-1])
new_repo, _ = RepoModel.get_or_create(
url=result['cmd'][-1], defaults={'name': result['params']['repo_name']}
)
if 'cache' in result['data']:
stats = result['data']['cache']['stats']
new_repo.total_size = stats['total_size']
@ -63,7 +67,6 @@ class BorgInfoRepoJob(BorgJob):
new_repo.encryption = result['data']['encryption']['mode']
if new_repo.encryption != 'none':
self.keyring.set_password("vorta-repo", new_repo.url, result['params']['password'])
new_repo.extra_borg_arguments = result['params']['extra_borg_arguments']
new_repo.save()

View File

@ -1,5 +1,6 @@
from vorta.store.models import RepoModel
from vorta.utils import borg_compat
from .borg_job import BorgJob, FakeProfile, FakeRepo
@ -15,6 +16,7 @@ class BorgInitJob(BorgJob):
999,
FakeRepo(
params['repo_url'],
params['repo_name'],
999,
params['extra_borg_arguments'],
params['encryption'],
@ -60,6 +62,7 @@ class BorgInitJob(BorgJob):
defaults={
'encryption': result['params']['encryption'],
'extra_borg_arguments': result['params']['extra_borg_arguments'],
'name': result['params']['repo_name'],
},
)
if new_repo.encryption != 'none':

View File

@ -2,7 +2,8 @@ import logging
import queue
import threading
from abc import abstractmethod
from PyQt5.QtCore import QObject
from PyQt6.QtCore import QObject
logger = logging.getLogger(__name__)
@ -24,9 +25,9 @@ class JobInterface(QObject):
@abstractmethod
def cancel(self):
"""
Cancel can be called when the job is not started. It is the responsability of FuncJob to not cancel job if
Cancel can be called when the job is not started. It is the responsibility of FuncJob to not cancel job if
no job is running.
The cancel mehod of JobsManager calls the cancel method on the running jobs only. Other jobs are dequeued.
The cancel method of JobsManager calls the cancel method on the running jobs only. Other jobs are dequeued.
"""
pass
@ -49,6 +50,7 @@ class SiteWorker(threading.Thread):
self.current_job = None
def run(self):
job = None
while True:
try:
job = self.jobs.get(False)
@ -57,7 +59,8 @@ class SiteWorker(threading.Thread):
job.run()
logger.debug("Finish job for site: %s", job.repo_id())
except queue.Empty:
logger.debug("No more jobs for site: %s", job.repo_id())
if job is not None:
logger.debug("No more jobs for site: %s", job.repo_id())
return
@ -76,19 +79,20 @@ class JobsManager:
def is_worker_running(self, site=None):
"""
See if there are any active jobs. The user can't start a backup if a job is
running. The scheduler can.
"""
# Check status for specific site (repo)
if site in self.workers:
return self.workers[site].is_alive()
else:
return False
See if there are any active jobs.
The user can't start a backup if a job is running. The scheduler can.
# Check if *any* worker is active
for _, worker in self.workers.items():
if worker.is_alive():
return True
If site is None, check if there is any worker active for any site (repo).
If site is not None, only check if there is a worker active for the given site (repo).
"""
if site is not None:
if site in self.workers:
if self.workers[site].is_alive():
return True
else:
for _, worker in self.workers.items():
if worker.is_alive():
return True
return False
def add_job(self, job):

View File

@ -1,15 +1,18 @@
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgListArchiveJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Getting archive content…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Getting archive content…')}")
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
self.app.backup_progress_event.emit(self.tr('Done getting archive content.'))
self.app.backup_progress_event.emit(
f"[{self.params['profile_name']}] {self.tr('Done getting archive content.')}"
)
self.result.emit(result)
@classmethod

View File

@ -1,18 +1,20 @@
from datetime import datetime as dt
from vorta.store.models import ArchiveModel, RepoModel
from vorta.utils import borg_compat
from .borg_job import BorgJob
class BorgListRepoJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Refreshing archives…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Refreshing archives…')}")
def finished_event(self, result):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
self.app.backup_progress_event.emit(self.tr('Refreshing archives done.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Refreshing archives done.')}")
@classmethod
def prepare(cls, profile):

View File

@ -1,7 +1,9 @@
import logging
import os
from vorta.store.models import SettingsModel
from vorta.utils import SHELL_PATTERN_ELEMENT, borg_compat
from .borg_job import BorgJob
logger = logging.getLogger(__name__)

View File

@ -1,12 +1,13 @@
from vorta.store.models import RepoModel
from vorta.utils import borg_compat, format_archive_name
from .borg_job import BorgJob
class BorgPruneJob(BorgJob):
def started_event(self):
self.app.backup_started_event.emit()
self.app.backup_progress_event.emit(self.tr('Pruning old archives…'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Pruning old archives…')}")
def finished_event(self, result):
# set repo stats to N/A
@ -19,7 +20,7 @@ class BorgPruneJob(BorgJob):
self.app.backup_finished_event.emit(result)
self.result.emit(result)
self.app.backup_progress_event.emit(self.tr('Pruning done.'))
self.app.backup_progress_event.emit(f"[{self.params['profile_name']}] {self.tr('Pruning done.')}")
@classmethod
def prepare(cls, profile):
@ -47,8 +48,10 @@ class BorgPruneJob(BorgJob):
if profile.prune_prefix:
formatted_prune_prefix = format_archive_name(profile, profile.prune_prefix)
if borg_compat.check('V122'):
pruning_opts += ['-a', 'sh:' + formatted_prune_prefix + '*']
if borg_compat.check('V2'):
pruning_opts += ['-a', f"sh:{formatted_prune_prefix}*"]
elif borg_compat.check('V122'):
pruning_opts += ['-a', f"{formatted_prune_prefix}*"]
else:
pruning_opts += ['--prefix', formatted_prune_prefix]

View File

@ -1,5 +1,6 @@
from vorta.store.models import ArchiveModel, RepoModel
from vorta.utils import borg_compat
from .borg_job import BorgJob

View File

@ -1,5 +1,7 @@
import os.path
import psutil
from ..i18n import trans_late
from .borg_job import BorgJob

View File

@ -1,4 +1,5 @@
from vorta.i18n import trans_late
from .borg_job import BorgJob

View File

@ -1,25 +1,61 @@
import os
from pathlib import Path
import appdirs
import platformdirs
APP_NAME = 'Vorta'
APP_AUTHOR = 'BorgBase'
APP_ID_DARWIN = 'com.borgbase.client.macos'
dirs = appdirs.AppDirs(APP_NAME, APP_AUTHOR)
SETTINGS_DIR = dirs.user_data_dir
LOG_DIR = dirs.user_log_dir
CACHE_DIR = dirs.user_cache_dir
TEMP_DIR = os.path.join(CACHE_DIR, "tmp")
PROFILE_BOOTSTRAP_FILE = Path.home() / '.vorta-init.json'
SETTINGS_DIR = None
LOG_DIR = None
CACHE_DIR = None
TEMP_DIR = None
PROFILE_BOOTSTRAP_FILE = None
if not os.path.exists(SETTINGS_DIR):
os.makedirs(SETTINGS_DIR)
if not os.path.exists(LOG_DIR):
os.makedirs(LOG_DIR)
def default_dev_dir() -> Path:
"""Returns a default dir for config files in the project's main folder"""
return Path(__file__).parent.parent.parent / '.dev_config'
if not os.path.exists(CACHE_DIR):
os.makedirs(CACHE_DIR)
if not os.path.exists(TEMP_DIR):
os.makedirs(TEMP_DIR)
def init_from_platformdirs():
"""Initializes config dirs for system-wide use"""
dirs = platformdirs.PlatformDirs(APP_NAME, APP_AUTHOR)
init(dirs.user_data_path, dirs.user_log_path, dirs.user_cache_path, dirs.user_cache_path / 'tmp', Path.home())
def init_dev_mode(dir: Path):
"""Initializes config dirs for local use inside provided dir"""
dir_full_path = Path(dir).resolve()
init(
dir_full_path / 'settings',
dir_full_path / 'logs',
dir_full_path / 'cache',
dir_full_path / 'tmp',
dir_full_path,
)
def init(settings: Path, logs: Path, cache: Path, tmp: Path, bootstrap: Path):
"""Initializes config directories with provided paths"""
global SETTINGS_DIR
global LOG_DIR
global CACHE_DIR
global TEMP_DIR
global PROFILE_BOOTSTRAP_FILE
SETTINGS_DIR = settings
LOG_DIR = logs
CACHE_DIR = cache
TEMP_DIR = tmp
PROFILE_BOOTSTRAP_FILE = bootstrap / '.vorta-init.json'
ensure_dirs()
def ensure_dirs():
"""Creates config dirs and parent dirs if they don't exist"""
# ensure directories exist
for dir in (SETTINGS_DIR, LOG_DIR, CACHE_DIR, TEMP_DIR):
dir.mkdir(parents=True, exist_ok=True)
# Make sure that the config values are valid
init_from_platformdirs()

View File

@ -3,7 +3,8 @@ internationalisation (i18n) support code
"""
import logging
import os
from PyQt5.QtCore import QLocale, QTranslator
from PyQt6.QtCore import QLocale, QTranslator
logger = logging.getLogger(__name__)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1606,11 +1606,11 @@
</message>
<message>
<location filename="../../views/import_window.py" line="69"/>
<source>Schema upgrade failure, file a bug report with the link in the Misc tab with the following error:
{0}
<source>Schema upgrade failure, file a bug report with the link in the Misc tab with the following error:
{0}
{1}</source>
<translation>Aktualizace schématu se nezdařila, vyplňte hlášení chyby s odkazem v panelu Různé s následující chybou:
{0}
{0}
{1}</translation>
</message>
<message>
@ -2346,4 +2346,4 @@
<translation>Ukládání hesla do nastavení Vorta.</translation>
</message>
</context>
</TS>
</TS>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1606,8 +1606,8 @@
</message>
<message>
<location filename="../../views/import_window.py" line="69"/>
<source>Schema upgrade failure, file a bug report with the link in the Misc tab with the following error:
{0}
<source>Schema upgrade failure, file a bug report with the link in the Misc tab with the following error:
{0}
{1}</source>
<translation>Het schema kan niet worden bijgewerkt. Stel een bugmelding op via de link op het tabblad Overig. Stuur de volgende informatie mee:
@ -2347,4 +2347,4 @@
<translation>Het wachtwoord wordt opgeslagen in de Vorta-instellingen.</translation>
</message>
</context>
</TS>
</TS>

View File

@ -1606,8 +1606,8 @@
</message>
<message>
<location filename="../../views/import_window.py" line="69"/>
<source>Schema upgrade failure, file a bug report with the link in the Misc tab with the following error:
{0}
<source>Schema upgrade failure, file a bug report with the link in the Misc tab with the following error:
{0}
{1}</source>
<translation>Upgrade schémy skončil s chybou, otvorte hlásenie o chybe kliknutím na odkaz na karte Rôzne a skopírujte tento text:
{0}
@ -2346,4 +2346,4 @@
<translation type="unfinished"/>
</message>
</context>
</TS>
</TS>

View File

@ -1,5 +1,6 @@
import importlib
import logging
from vorta.i18n import trans_late
logger = logging.getLogger(__name__)

View File

@ -9,6 +9,9 @@ Adapted from https://gist.github.com/apettinen/5dc7bf1f6a07d148b2075725db6b1950
"""
import logging
import sys
from ctypes import c_char
import objc
from Foundation import NSBundle
from .abc import VortaKeyring
logger = logging.getLogger(__name__)
@ -23,8 +26,6 @@ class VortaDarwinKeyring(VortaKeyring):
"""
Lazy import to avoid conflict with pytest-xdist.
"""
import objc
from Foundation import NSBundle
Security = NSBundle.bundleWithIdentifier_('com.apple.security')
@ -121,7 +122,5 @@ class VortaDarwinKeyring(VortaKeyring):
def _resolve_password(password_length, password_buffer):
from ctypes import c_char
s = (c_char * password_length).from_address(password_buffer.__pointer__)[:]
return s.decode()

View File

@ -1,6 +1,9 @@
import logging
import peewee
from vorta.store.models import SettingsModel
from .abc import VortaKeyring
logger = logging.getLogger(__name__)

View File

@ -1,7 +1,9 @@
import logging
import os
from PyQt5 import QtDBus
from PyQt5.QtCore import QVariant
from PyQt6 import QtDBus
from PyQt6.QtCore import QMetaType, QVariant
from vorta.keyring.abc import VortaKeyring
logger = logging.getLogger(__name__)
@ -47,9 +49,9 @@ class VortaKWallet5Keyring(VortaKeyring):
def get_result(self, method, args=[]):
if args:
result = self.iface.callWithArgumentList(QtDBus.QDBus.AutoDetect, method, args)
result = self.iface.callWithArgumentList(QtDBus.QDBus.CallMode.AutoDetect, method, args)
else:
result = self.iface.call(QtDBus.QDBus.AutoDetect, method)
result = self.iface.call(QtDBus.QDBus.CallMode.AutoDetect, method)
return result.arguments()[0]
@property
@ -60,7 +62,7 @@ class VortaKWallet5Keyring(VortaKeyring):
def try_unlock(self):
wallet_name = self.get_result("networkWallet")
wId = QVariant(0)
wId.convert(4)
wId.convert(QMetaType(QMetaType.Type.LongLong.value))
output = self.get_result("open", args=[wallet_name, wId, 'vorta-repo'])
try:
self.handle = int(output)

View File

@ -1,7 +1,9 @@
import asyncio
import logging
import os
import secretstorage
from vorta.keyring.abc import VortaKeyring
logger = logging.getLogger(__name__)

View File

@ -7,9 +7,9 @@ Set up logging to user log dir. Uses the platform's default location:
"""
import logging
import os
from logging.handlers import TimedRotatingFileHandler
from .config import LOG_DIR
from vorta import config
logger = logging.getLogger()
@ -17,13 +17,15 @@ logger = logging.getLogger()
def init_logger(background=False):
logger.setLevel(logging.DEBUG)
logging.getLogger('peewee').setLevel(logging.INFO)
logging.getLogger('PyQt5').setLevel(logging.INFO)
logging.getLogger('PyQt6').setLevel(logging.INFO)
# create logging format
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
# create handlers
fh = TimedRotatingFileHandler(os.path.join(LOG_DIR, 'vorta.log'), when='d', interval=1, backupCount=5)
fh = TimedRotatingFileHandler(config.LOG_DIR / 'vorta.log', when='d', interval=1, backupCount=5)
# ensure ".log" suffix
fh.namer = lambda log_name: log_name.replace(".log", "") + ".log"
fh.setLevel(logging.DEBUG)
fh.setFormatter(formatter)
logger.addHandler(fh)

View File

@ -11,7 +11,11 @@ class NetworkStatusMonitor:
return DarwinNetworkStatus()
else:
from .network_manager import DBusException, NetworkManagerMonitor, UnsupportedException
from .network_manager import (
DBusException,
NetworkManagerMonitor,
UnsupportedException,
)
try:
return NetworkManagerMonitor()
@ -20,7 +24,7 @@ class NetworkStatusMonitor:
def is_network_status_available(self):
"""Is the network status really available, and not just a dummy implementation?"""
return type(self) != NetworkStatusMonitor
return type(self) is not NetworkStatusMonitor
def is_network_metered(self) -> bool:
"""Is the currently connected network a metered connection?"""

View File

@ -1,44 +1,74 @@
import subprocess
from datetime import datetime as dt
from typing import Iterator, Optional
from typing import Iterator, List, Optional
from CoreWLAN import CWInterface, CWNetwork, CWWiFiClient
from vorta.log import logger
from vorta.network_status.abc import NetworkStatusMonitor, SystemWifiInfo
class DarwinNetworkStatus(NetworkStatusMonitor):
def is_network_metered(self) -> bool:
return any(is_network_metered(d) for d in get_network_devices())
interface: CWInterface = self._get_wifi_interface()
network: Optional[CWNetwork] = interface.lastNetworkJoined()
if network:
is_ios_hotspot = network.isPersonalHotspot()
else:
is_ios_hotspot = False
return is_ios_hotspot or any(is_network_metered_with_android(d) for d in get_network_devices())
def get_current_wifi(self) -> Optional[str]:
"""
Get current SSID or None if Wifi is off.
Get current SSID or None if Wi-Fi is off.
"""
interface: Optional[CWInterface] = self._get_wifi_interface()
if not interface:
return None
From https://gist.github.com/keithweaver/00edf356e8194b89ed8d3b7bbead000c
"""
cmd = [
'/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport',
'-I',
]
process = subprocess.Popen(cmd, stdout=subprocess.PIPE)
out, err = process.communicate()
process.wait()
for line in out.decode(errors='ignore').split('\n'):
split_line = line.strip().split(':')
if split_line[0] == 'SSID':
return split_line[1].strip()
# If the user has Wi-Fi turned off lastNetworkJoined will return None.
network: Optional[CWNetwork] = interface.lastNetworkJoined()
def get_known_wifis(self):
if network:
network_name = network.ssid()
return network_name
else:
return None
def get_known_wifis(self) -> List[SystemWifiInfo]:
"""
Listing all known Wifi networks isn't possible any more from macOS 11. Instead we
just return the current Wifi.
Use the program, "networksetup", to get the list of know Wi-Fi networks.
"""
wifis = []
current_wifi = self.get_current_wifi()
if current_wifi is not None:
wifis.append(SystemWifiInfo(ssid=current_wifi, last_connected=dt.now()))
interface: Optional[CWInterface] = self._get_wifi_interface()
if not interface:
return []
interface_name = interface.name()
output = call_networksetup_listpreferredwirelessnetworks(interface_name)
result = []
for line in output.strip().splitlines():
if line.strip().startswith("Preferred networks"):
continue
elif not line.strip():
continue
else:
result.append(line.strip())
for wifi_network_name in result:
wifis.append(SystemWifiInfo(ssid=wifi_network_name, last_connected=dt.now()))
return wifis
def _get_wifi_interface(self) -> Optional[CWInterface]:
wifi_client: CWWiFiClient = CWWiFiClient.sharedWiFiClient()
interface: Optional[CWInterface] = wifi_client.interface()
return interface
def get_network_devices() -> Iterator[str]:
for line in call_networksetup_listallhardwareports().splitlines():
@ -46,7 +76,7 @@ def get_network_devices() -> Iterator[str]:
yield line.split()[1].strip().decode('ascii')
def is_network_metered(bsd_device) -> bool:
def is_network_metered_with_android(bsd_device) -> bool:
return b'ANDROID_METERED' in call_ipconfig_getpacket(bsd_device)
@ -65,3 +95,11 @@ def call_networksetup_listallhardwareports():
return subprocess.check_output(cmd)
except subprocess.CalledProcessError:
logger.debug("Command %s failed", ' '.join(cmd))
def call_networksetup_listpreferredwirelessnetworks(interface) -> str:
command = ['/usr/sbin/networksetup', '-listpreferredwirelessnetworks', interface]
try:
return subprocess.check_output(command).decode(encoding='utf-8')
except subprocess.CalledProcessError:
logger.debug("Command %s failed", " ".join(command))

View File

@ -2,8 +2,10 @@ import logging
from datetime import datetime
from enum import Enum
from typing import Any, List, Mapping, NamedTuple, Optional
from PyQt5 import QtDBus
from PyQt5.QtCore import QObject, QVersionNumber
from PyQt6 import QtDBus
from PyQt6.QtCore import QObject, QVersionNumber
from vorta.network_status.abc import NetworkStatusMonitor, SystemWifiInfo
logger = logging.getLogger(__name__)

View File

@ -1,8 +1,15 @@
import logging
import sys
from PyQt5 import QtCore, QtDBus
from PyQt6 import QtCore, QtDBus
from vorta.store.models import SettingsModel
try:
from Foundation import NSUserNotification, NSUserNotificationCenter
except ImportError:
pass
logger = logging.getLogger(__name__)
@ -50,8 +57,6 @@ class DarwinNotifications(VortaNotifications):
if self.notifications_suppressed(level):
return
from Foundation import NSUserNotification, NSUserNotificationCenter
notification = NSUserNotification.alloc().init()
notification.setTitle_(title)
notification.setInformativeText_(text)
@ -77,13 +82,12 @@ class DBusNotifications(VortaNotifications):
path = "/org/freedesktop/Notifications"
interface = "org.freedesktop.Notifications"
app_name = "vorta"
v = QtCore.QVariant(12321) # random int to identify all notifications
if v.convert(QtCore.QVariant.UInt):
id_replace = v
id_replace = QtCore.QVariant(12321)
id_replace.convert(QtCore.QMetaType(QtCore.QMetaType.Type.UInt.value))
icon = "com.borgbase.Vorta-symbolic"
title = header
text = msg
actions_list = QtDBus.QDBusArgument([], QtCore.QMetaType.QStringList)
actions_list = QtDBus.QDBusArgument([], QtCore.QMetaType.Type.QStringList.value)
hint = {'urgency': self.URGENCY[level]}
time = 5000 # milliseconds for display timeout
@ -91,7 +95,9 @@ class DBusNotifications(VortaNotifications):
notify = QtDBus.QDBusInterface(item, path, interface, bus)
if notify.isValid():
x = notify.call(
QtDBus.QDBus.AutoDetect,
# Call arguments for Notify interface need to match exactly:
# https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html#command-notify
QtDBus.QDBus.CallMode.AutoDetect,
"Notify",
app_name,
id_replace,

View File

@ -1,7 +1,9 @@
import datetime
import json
from json import JSONDecodeError
from playhouse.shortcuts import dict_to_model, model_to_dict
from vorta.keyring.abc import VortaKeyring
from vorta.store.connection import DB, SCHEMA_VERSION, init_db
from vorta.store.models import (
@ -34,7 +36,7 @@ class ProfileExport:
def repo_url(self):
if (
'repo' in self._profile_dict
and type(self._profile_dict['repo']) == dict
and isinstance(self._profile_dict['repo'], dict)
and 'url' in self._profile_dict['repo']
):
return self._profile_dict['repo']['url']

View File

@ -1,6 +1,6 @@
from PyQt5.QtCore import QTextStream, pyqtSignal
from PyQt5.QtNetwork import QLocalServer, QLocalSocket
from PyQt5.QtWidgets import QApplication
from PyQt6.QtCore import QTextStream, pyqtSignal
from PyQt6.QtNetwork import QLocalServer, QLocalSocket
from PyQt6.QtWidgets import QApplication
class QtSingleApplication(QApplication):
@ -52,7 +52,6 @@ class QtSingleApplication(QApplication):
if self._isRunning:
# Yes, there is.
self._outStream = QTextStream(self._outSocket)
self._outStream.setCodec('UTF-8')
else:
# No, there isn't.
self._outSocket = None
@ -84,7 +83,6 @@ class QtSingleApplication(QApplication):
if not self._inSocket:
return
self._inStream = QTextStream(self._inSocket)
self._inStream.setCodec('UTF-8')
self._inSocket.readyRead.connect(self._onReadyRead)
def _onReadyRead(self):

View File

@ -4,9 +4,11 @@ import threading
from datetime import datetime as dt
from datetime import timedelta
from typing import Dict, NamedTuple, Optional, Tuple, Union
from PyQt5 import QtCore, QtDBus
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QApplication
from PyQt6 import QtCore, QtDBus
from PyQt6.QtCore import QTimer
from PyQt6.QtWidgets import QApplication
from vorta import application
from vorta.borg.check import BorgCheckJob
from vorta.borg.create import BorgCreateJob
@ -32,7 +34,6 @@ class ScheduleStatus(NamedTuple):
class VortaScheduler(QtCore.QObject):
#: The schedule for the profile with the given id changed.
schedule_changed = QtCore.pyqtSignal(int)
@ -69,7 +70,7 @@ class VortaScheduler(QtCore.QObject):
self.bus = bus
self.bus.connect(service, path, interface, name, "b", self.loginSuspendNotify)
else:
logger.warn('Failed to connect to DBUS interface to detect sleep/resume events')
logger.warning('Failed to connect to DBUS interface to detect sleep/resume events')
@QtCore.pyqtSlot(bool)
def loginSuspendNotify(self, suspend: bool):
@ -196,7 +197,6 @@ class VortaScheduler(QtCore.QObject):
return
with self.lock: # Acquire lock
self.remove_job(profile_id) # reset schedule
pause = self.pauses.get(profile_id)
@ -290,7 +290,6 @@ class VortaScheduler(QtCore.QObject):
# handle missing of a scheduled time
if next_time <= dt.now():
if profile.schedule_make_up_missed:
self.lock.release()
try:
@ -444,7 +443,7 @@ class VortaScheduler(QtCore.QObject):
else:
notifier.deliver(
self.tr('Vorta Backup'),
self.tr('Error during backup creation.'),
self.tr('Error during backup creation for %s.') % profile_name,
level='error',
)
logger.error('Error during backup creation.')
@ -460,6 +459,7 @@ class VortaScheduler(QtCore.QObject):
Pruning and checking after successful backup.
"""
profile = BackupProfileModel.get(id=profile_id)
notifier = VortaNotifications.pick()
logger.info('Doing post-backup jobs for %s', profile.name)
if profile.prune_on:
msg = BorgPruneJob.prepare(profile)
@ -490,6 +490,11 @@ class VortaScheduler(QtCore.QObject):
self.app.jobs_manager.add_job(job)
logger.info('Finished background task for profile %s', profile.name)
notifier.deliver(
self.tr('Vorta Backup'),
self.tr('Post Backup Tasks successful for %s' % profile.name),
level='info',
)
def remove_job(self, profile_id):
if profile_id in self.timers:

Some files were not shown because too many files have changed in this diff Show More