Skip to content

Commit fb188c4

Browse files
authored
UI updates to Connected Accounts (#9891)
Add reference to our documentation from Connected Accounts and add a text about how to fully disconnect an account.
1 parent 84a149a commit fb188c4

File tree

3 files changed

+54
-7
lines changed

3 files changed

+54
-7
lines changed

readthedocs/projects/static-src/projects/css/admin.less

+11
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,14 @@
3838
content: "\f063";
3939
}
4040
}
41+
42+
.connected-services {
43+
ul.socialaccount_providers {
44+
li {
45+
button.socialaccount-provider {
46+
float: none;
47+
}
48+
}
49+
}
50+
51+
}

readthedocs/projects/static/projects/css/admin.css

+3
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,6 @@
2929
#content .module-list.automation-rules .automation-rule button.automation-rule-down:before {
3030
content: "\f063";
3131
}
32+
.connected-services ul.socialaccount_providers li button.socialaccount-provider {
33+
float: none;
34+
}

readthedocs/templates/socialaccount/connections.html

+40-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
{% extends "profiles/base_profile_edit.html" %}
22

3-
{% load i18n %}
3+
{% load i18n static %}
44

55
{% block title %}{% trans "Connected Services" %}{% endblock %}
66

7+
{% block extra_links %}
8+
{{ block.super }}
9+
<link rel="stylesheet" type="text/css" href="{% static "projects/css/admin.css" %}" />
10+
{% endblock %}
11+
712
{% block edit_content_header %} {% trans "Connected Services" %} {% endblock %}
813

914
{% block profile-admin-social-accounts %}active{% endblock %}
@@ -12,6 +17,25 @@
1217

1318
<div class="module connected-services">
1419
<div class="module-wrapper">
20+
21+
<p class="help_text">
22+
{% blocktrans trimmed %}
23+
On this page,
24+
you can manage the integration with your Git provider(s) that enables automatic import and configuration of your repositories.
25+
<a href="https://docs.readthedocs.io/en/stable/connected-accounts.html" target="_blank">Read our documentation page about connecting Git providers.</a>
26+
{% endblocktrans %}
27+
</p>
28+
29+
<ul class="socialaccount_providers">
30+
{% include "socialaccount/snippets/provider_list.html" with process="connect" next="" %}
31+
</ul>
32+
33+
</div>
34+
</div>
35+
<div class="module connected-services">
36+
<div class="module-wrapper">
37+
<h3>{% trans "Active connections" %}</h3>
38+
1539
<p>
1640
{% blocktrans trimmed %}
1741
The following services are currently connected to your account:
@@ -74,13 +98,22 @@
7498
{% endif %}
7599

76100
</div>
77-
</div>
78-
</div>
79101

80-
<ul class="socialaccount_providers">
81-
{% include "socialaccount/snippets/provider_list.html" with process="connect" next="" %}
82-
</ul>
102+
{% if form.accounts %}
103+
<p class="help_text">
104+
{% blocktrans trimmed %}
105+
Note: If you press the <strong>Disconnect</strong> button to disconnect a service,
106+
you should also visit your Git Provider in order to
107+
delete the OAuth connection of Read the Docs.
108+
On GitHub, this is located in <code>Settings > Applications > Authorized OAuth Apps</code>.
109+
{% endblocktrans %}
110+
</p>
111+
{% endif %}
112+
113+
{% include "socialaccount/snippets/login_extra.html" %}
83114

84-
{% include "socialaccount/snippets/login_extra.html" %}
115+
</div>
116+
117+
</div>
85118

86119
{% endblock %}

0 commit comments

Comments
 (0)