Skip to content

Commit

Permalink
Merge pull request #306 from opengisch/create_project
Browse files Browse the repository at this point in the history
Improve the creating a new project experience with a wizard and explanations
  • Loading branch information
suricactus authored Sep 9, 2021
2 parents 19fdc41 + 962dc2c commit 5fb804b
Show file tree
Hide file tree
Showing 13 changed files with 1,038 additions and 929 deletions.
5 changes: 1 addition & 4 deletions qfieldsync/core/cloud_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ def server_urls() -> List[str]:
]

def auth(self) -> QgsAuthMethodConfig:
self.url
auth_manager = QgsApplication.authManager()

if not auth_manager.masterPasswordHashInDatabase():
Expand Down Expand Up @@ -273,17 +272,15 @@ def create_project(
)

def update_project(
self, project_id: str, name: str, owner: str, description: str, private: bool
self, project_id: str, name: str, description: str
) -> QNetworkReply:
"""Update an existing QFieldCloud project"""

return self.cloud_put(
["projects", project_id],
{
"name": name,
"owner": owner,
"description": description,
"private": private,
},
)

Expand Down
7 changes: 4 additions & 3 deletions qfieldsync/core/cloud_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,10 @@ def convert(self) -> None: # noqa: C901
str(project_path.parent.joinpath("DCIM")),
)

self.project.setTitle(
self.tr("{} (QFieldCloud)").format(self.project.title())
)
title = self.project.title()
title_suffix = self.tr("(QFieldCloud)")
if not title.endswith(title_suffix):
self.project.setTitle("{} {}".format(title, title_suffix))
# Now we have a project state which can be saved as cloud project
self.project.write(str(project_path))
is_converted = True
Expand Down
3 changes: 3 additions & 0 deletions qfieldsync/core/cloud_transferrer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ def __init__(
self.replies = []
self.temp_dir = Path(cloud_project.local_dir).joinpath(".qfieldsync")
self.error_message = None
self.throttled_uploader = None
self.throttled_downloader = None
self.throttled_deleter = None

if self.temp_dir.exists():
shutil.rmtree(self.temp_dir)
Expand Down
275 changes: 0 additions & 275 deletions qfieldsync/gui/cloud_converter_dialog.py

This file was deleted.

Loading

0 comments on commit 5fb804b

Please sign in to comment.