-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Show connect buttons for installed apps only #3394
Changes from 3 commits
49d3542
4b2e3cc
f2b8db6
671623b
85d4268
c631dc4
416d8d2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -690,19 +690,16 @@ div.project-import-remote button.remote-sync:before { | |
content: "\f021"; | ||
} | ||
|
||
div.project-import-remote form.import-connect-github button:before, | ||
a.socialaccount-provider.github:before { | ||
font-family: FontAwesome; | ||
content: "\f09b"; | ||
} | ||
|
||
div.project-import-remote form.import-connect-gitlab button:before, | ||
a.socialaccount-provider.gitlab:before { | ||
font-family: FontAwesome; | ||
content: "\f1d3"; | ||
} | ||
|
||
div.project-import-remote form.import-connect-bitbucket button:before, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's the reason we're removing this styles? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I removed these because the |
||
a.socialaccount-provider.bitbucket:before, | ||
a.socialaccount-provider.bitbucket_oauth2:before { | ||
font-family: FontAwesome; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,12 +49,14 @@ div.project-import-remote li.remote-repo ul.remote-repo-menu { | |
top: 10px; | ||
right: 10px; | ||
} | ||
div.project-import-remote form.import-connect { | ||
overflow: auto; | ||
display: inline; | ||
div.project-import-remote div.project-import-providers ul { | ||
overflow: hidden; | ||
} | ||
div.project-import-remote div.project-import-providers ul li { | ||
float: left; | ||
} | ||
div.project-import-remote form.import-connect button { | ||
display: inline; | ||
div.project-import-remote a.socialaccount-provider { | ||
display: block; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These changes look to have some negative side effect on spacing and alignment. What prompted these changes? If we have to alter layout on one of the forms, that might be better. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "I don't know CSS", so I don't have good reasons. I touched it a little, googled something and it looked it worked so I thought that I could propose it. I'm totally 👍 on remove this and change it as you like/prefer/wish/etc. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, missed this the first time. This is actually editing a compiled css file, the source is at |
||
margin-bottom: .5em; | ||
font-size: 1em; | ||
font-weight: normal; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,7 @@ def get_version_compare_data(project, base_version=None): | |
} | ||
if highest_version_obj: | ||
ret_val['url'] = highest_version_obj.get_absolute_url() | ||
ret_val['slug'] = highest_version_obj.slug, | ||
ret_val['slug'] = highest_version_obj.slug | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like an unrelated bug? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ha! Yeah. I don't understand how this passed the test in the PR that was merged :/ |
||
if base_version and base_version.slug != LATEST: | ||
try: | ||
base_version_comparable = parse_version_failsafe( | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,41 +93,12 @@ <h1>{% trans "Import a Repository" %}</h1> | |
{% endblocktrans %} | ||
</p> | ||
|
||
<div class="project-import-providers"> | ||
<form | ||
method="get" | ||
action="{% provider_login_url "github" %}" | ||
class="import-connect import-connect-github"> | ||
<button> | ||
{% trans "Connect to GitHub" %} | ||
</button> | ||
<input type="hidden" name="process" value="connect"> | ||
<input type="hidden" name="next" value="/dashboard/import/"> | ||
</form> | ||
|
||
<form | ||
method="get" | ||
action="{% provider_login_url "gitlab" %}" | ||
class="import-connect import-connect-gitlab"> | ||
<button> | ||
{% trans "Connect to GitLab" %} | ||
</button> | ||
<input type="hidden" name="process" value="connect"> | ||
<input type="hidden" name="next" value="/dashboard/import/"> | ||
</form> | ||
|
||
<form | ||
method="get" | ||
action="{% provider_login_url "bitbucket_oauth2" %}" | ||
class="import-connect import-connect-bitbucket"> | ||
<button> | ||
{% trans "Connect to Bitbucket" %} | ||
</button> | ||
<input type="hidden" name="process" value="connect"> | ||
<input type="hidden" name="next" value="/dashboard/import/"> | ||
</form> | ||
<div class="project-import-providers"> | ||
<ul class="socialaccount_providers"> | ||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't see this file in the commit, did it already exist? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh I see it below -- is it also used somewhere else? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, it is used in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We do lose the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch! I didn't realize this. Yes, I think it's important since you are at the import page. I'd like to connect my account and import the my project immediately. I'm proposing a fix for this using the template tag: https://github.com/pennersr/django-allauth/blob/cfc5112bf474af2cbb16e4b4a36708e8949a2105/allauth/socialaccount/templatetags/socialaccount.py#L45 |
||
</ul> | ||
</div> | ||
|
||
{% endif %} | ||
</li> | ||
</ul> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\f296
should be for gitlabhttp://fontawesome.io/icon/gitlab/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!