Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Ask user whether to init a new repo if adding existing repo fails #1799

Open
real-yfprojects opened this issue Sep 1, 2023 · 2 comments
Labels
type:enhancement Improvement of an existing function

Comments

@real-yfprojects
Copy link
Collaborator

The problem

In #1782 a user confused the two options for adding a repo to vorta and tried to initialize a repo by using the add existing repo dialog.

Requested Solution

When adding an existing repo fails because the repo wasn't initialized yet, Vorta should inform the user about that and ask them if they want to initialize the repo instead. Then Vorta could open the init repo dialog and prefill the fields that are also present in the add repo dialog.

Alternatives

  • Prevent confusion over the two options.
@real-yfprojects real-yfprojects added the type:enhancement Improvement of an existing function label Sep 1, 2023
@SAMAD101
Copy link
Collaborator

SAMAD101 commented Sep 4, 2023

I've looked into the code, it seems like when a repository fails to be added to Vorta (doesn't matter whether through New Repository... or Existing Repository...), we simply get the same error message, "Unable to add your repository."
In src/vorta/views/repo_add_dialog.py :

def run_result(self, result):
        self.saveButton.setEnabled(True)
        if result['returncode'] == 0:
            self.added_repo.emit(result)
            self.accept()
        else:
            self._set_status(self.tr('Unable to add your repository.'))

I think we can add a differentiating (if there is really not, I might've failed to see it) parameter between new repo and existing repo , we can accomplish this. Suggestions are most welcome :)

@real-yfprojects
Copy link
Collaborator Author

You don't need to addsa parameter because you can use inheritance. RepoWindow will never be instanciated it serves as a super class implementin, common features of the two dialogs for
adding a repo to Vorta.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Improvement of an existing function
Projects
None yet
Development

No branches or pull requests

2 participants