99 Commits

Author SHA1 Message Date
Nino van Hooff
8e75da552d Do not inherit SyncState from QObject
not necessary and fixes mypy warning

CURA-7290
2020-05-12 11:23:14 +02:00
Kostas Karmas
b717755f20 Add "Sign in with another account" button in AddCloudPrintersView
There are cases where Cura and the browser fall out of sync when it
comes to accounts. In such cases, you may be logged in cura with an
account that has no cloud printers and in the browser with an account
that has printers. So when you press the "Add cloud printer" button,
you are redirected to mycloud and you see cloud printers that are not
detected by Cura (because Cura is in a different acconut). In such
cases, the user can now press the "Sign in with a different account"
link in the "Waiting for cloud response" page, which will log him/her
out in Cura AND in the browser, and then reinitiate the whole
authorization flow, to make sure the accounts are in sync.

CURA-7427
2020-05-11 17:47:09 +02:00
Nino van Hooff
176919eee0 Merge branch 'master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	plugins/CuraEngineBackend/CuraEngineBackend.py
#	plugins/CuraEngineBackend/StartSliceJob.py
2020-05-08 15:31:23 +02:00
Nino van Hooff
1ae050bbc5 Expose Account.SyncState as an Enum to QML
Provides a single source of truth

CURA-7290
2020-05-08 11:09:48 +02:00
Nino van Hooff
8937c63219 Finish merge of auto sync packages
CURA-7290
2020-05-06 16:08:47 +02:00
Nino van Hooff
9b79b70f2b Merge branch 'CURA-7290_auto_sync_packages' into CURA-7290_manual_account_sync
# Conflicts:
#	cura/API/Account.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudOutputDeviceManager.py
2020-05-06 16:03:37 +02:00
Nino van Hooff
ef6cf8d5cc Remove unused pyqtProperty
CURA-7290
2020-05-06 12:08:55 +02:00
Nino van Hooff
7322526791 Fix typing warning
CURA-7290
2020-05-04 17:30:32 +02:00
Nino van Hooff
eac884fcd2 Convert SYNC_STATES to Enum
CURA-7290
2020-05-04 17:26:38 +02:00
Nino van Hooff
88ff68e40c Also check for package updates automatically
Moves the 30-second sync timer from CloudOutputDeviceManager to
Account and subscribes CloudPackageChecker to the timer.

CURA-7290
2020-05-04 16:56:09 +02:00
Nino van Hooff
637a241d99 Use single qml file for sync states
CURA-7290
2020-05-04 15:13:38 +02:00
Nino van Hooff
049c1946d4 Create Account sync state interface to allow for multiple sync services
Needed to add the package sync

CURA-7290
2020-05-04 13:52:40 +02:00
Nino van Hooff
81d02d5d58 Implement printer cloud sync error state
CURA-7290
2020-05-04 13:19:16 +02:00
Nino van Hooff
4e7f446fe1 Account sync: create additional sync states
CURA-7290
2020-05-04 11:26:20 +02:00
Nino van Hooff
4b88247af8 Account sync: remove debug info
CURA-7290
2020-05-01 17:49:40 +02:00
Nino van Hooff
acf36d1e42 Add Account sync last update datetime
CURA-7290
2020-05-01 17:44:58 +02:00
Nino van Hooff
0aed6d3731 Connect the manual sync button
CURA-7290
2020-05-01 15:56:09 +02:00
Nino van Hooff
828e931f52 Add manual sync button (non-functional)
CURA-7290
2020-04-30 17:19:14 +02:00
Kostas Karmas
ea404af973 Transfer cloudPrintersDetectedChanged in DiscoveredUltimakerCloudPrintersModel
CURA-7022
2020-04-28 14:19:28 +02:00
Jelle Spijker
679739d09d
Applied requested changes proposed by @ninovanhooff
Fixed a couple of missed double quotes, trailing and leading spaces, to long comment lines
2020-04-27 20:09:00 +02:00
Kostas Karmas
1602b71841 Inform the Cloud page about new cloud printers
Properly close the welcome screen if the user has signed in and has
cloud printers linked to his/her account. If he doesn't have any, move
to the next page of the welcome wizard.

CURA-7019
2020-04-23 09:59:32 +02:00
Jelle Spijker
68318d20fd
Converted comments in dir Cura/cura/API to rst style
Converted doxygen style comments to reStructuredText style in the files found in Cura/cura/API directory recursively  using the script dox_2_rst.py (provided in the Uranium repo). Comments were manually checked and changed if needed.

Comments from the hidden attributes in the class CuraAPI (_acount, _backups, _interface) were moved to the public property getters, so they docstrings are exposed to the user.
2020-04-22 20:57:41 +02:00
Nino van Hooff
96ed85f9c0 Move UltimakerCloudAuthentication and UltimakerCloudScope
...to their own module
Fixes an import error where UltimakerCloudScope was used my both the
Toolbox and CuraDrive plugins

CURA-7150
2020-03-12 17:48:54 +01:00
Jaime van Kessel
5f76070f05 Fix situation where authtoken wasnt updated for the toolbox request headers 2019-04-25 16:16:44 +02:00
Jaime van Kessel
c35aabd2c4 Add message to indicate that Cura was unable to connect with account server
This happens when you were logged previously, but currently don't have internet acces.

CURA-6231
2019-02-19 13:34:04 +01:00
ChrisTerBeke
05c4b6012e
Calculate expiry date to determine if token refresh is needed 2019-02-08 21:39:45 +01:00
ChrisTerBeke
56f0a341bc Fix merge conflicts 2019-01-10 15:17:53 +01:00
Diego Prado Gesto
da69c16e09 Split the constants in to files, indicating which constants each file
stores.

Contributes to CURA-6005.
2018-12-18 16:14:13 +01:00
ChrisTerBeke
36f5150d94 Fix merge conflict 2018-12-13 11:48:35 +01:00
ChrisTerBeke
f72b58386b Also use CuraConstants for account API root 2018-12-13 11:46:11 +01:00
Daniel Schiavini
9046b39b43 STAR-322: Creating a Cloud API client to handle the interaction 2018-12-04 16:14:08 +01:00
Daniel Schiavini
fc26ccd6fa STAR-332: Some improvements to get the job in connect 2018-12-03 14:41:36 +01:00
ChrisTerBeke
4e8979334e
Switch Ultimaker Account OAuth2 client
The new client has access to more permissions and is labeled as "Ultimaker Cura" instead of "Cura Backups Plugin".
Also removes `self._cloud_api_root` as that's not used anymore now that `self._oauth_root` is used for the redirect URLs.
2018-11-20 19:18:48 +01:00
ChrisTerBeke
38b615c734
Update OAuth2 scopes
Part of STAR-273.
2018-10-17 17:43:04 +02:00
Lipu Fei
dd150bbab9 Resolve circular imports for CuraAPI 2018-09-28 12:07:00 +02:00
Jaime van Kessel
8d9a1fb85d Merge branch 'CURA-5744-move-oauth-login' of github.com:Ultimaker/Cura into CURA-5744-move-oauth-login 2018-09-27 13:47:32 +02:00
Jaime van Kessel
f8369703ed Connect signals before loading auth data
CURA-5744
2018-09-27 13:45:46 +02:00
ChrisTerBeke
6d402806ac Ensure logged in state is not always set to False after loading from preferences 2018-09-27 13:35:18 +02:00
Jaime van Kessel
202cf698c3 Change callback for succes / failure to the new location
CURA-5744
2018-09-27 11:56:19 +02:00
Jaime van Kessel
506ec5109d Moved loading of the authentication to the account
CURA-5744
2018-09-27 11:37:22 +02:00
ChrisTerBeke
246d12a596 Remove client.package.download scope until that is deployed on production 2018-09-27 10:48:22 +02:00
ChrisTerBeke
52ffe39c07 Small fixes in settings 2018-09-27 10:33:50 +02:00
Jaime van Kessel
16ff1c3712 Add property for the accessToken
CURA-5744
2018-09-26 17:12:00 +02:00
Jaime van Kessel
067e59a254 Add logged_in as argument to loginStateChanged callback
CURA-5744
2018-09-26 17:06:09 +02:00
Jaime van Kessel
b48adf5b3e Typing fixes
CURA-5744
2018-09-24 17:37:06 +02:00
Jaime van Kessel
f16a9c62b5 Fix typo
CL-5744
2018-09-24 17:28:19 +02:00
Jaime van Kessel
fe85c020b1 Fixed incorrect OAuth2 settings
CURA-5744
2018-09-24 17:12:45 +02:00
Jaime van Kessel
081b2a28fe Expose Account API to QML
This is done by adding the API as an SingletonType to Cura.

CURA-5744
2018-09-21 17:23:30 +02:00
Jaime van Kessel
b54383e685 Added account object to API
CURA-5744
2018-09-21 16:43:32 +02:00