Skip to content

Commit b13ec29

Browse files
committed
chore(passport): add common message ui
1 parent b87c7a7 commit b13ec29

13 files changed

Lines changed: 123 additions & 357 deletions

rootfs/api/settings/production.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@
263263
SECRET_KEY = os.environ.get('DRYCC_SECRET_KEY', random_secret)
264264

265265
# database setting
266-
DRYCC_DATABASE_URL = os.environ.get('DRYCC_DATABASE_URL', 'postgres://:@:5432/passport')
266+
DRYCC_DATABASE_URL = os.environ.get('DRYCC_DATABASE_URL', 'postgres://postgres:123456@192.168.6.50:5432/drycc_passport')
267267
DATABASES = {
268268
'default': dj_database_url.config(default=DRYCC_DATABASE_URL,
269269
conn_max_age=600)

rootfs/api/static/css/app-a26e92cde3afe8d5333ec54d0608aca2.css

Lines changed: 0 additions & 161 deletions
This file was deleted.

rootfs/api/static/css/message.css

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.login-gradient {
2+
background-image: -webkit-linear-gradient(top,#654a86,#534292);
3+
background-image: linear-gradient(to bottom,#654a86,#534292);
4+
background-color: #534292;
5+
}
6+
7+
.login-button {
8+
cursor: pointer;
9+
color: #fff;
10+
background-color: #79589f;
11+
background-image: -webkit-gradient(linear,right top,left bottom,color-stop(0,rgba(159,88,150,0)),color-stop(1,rgba(159,88,150,0.6)));
12+
background-image: -o-linear-gradient(left bottom,rgba(159,88,150,0) 0,rgba(159,88,150,0.6) 100%);
13+
background-image: -moz-linear-gradient(left bottom,rgba(159,88,150,0) 0,rgba(159,88,150,0.6) 100%);
14+
background-image: -webkit-linear-gradient(left bottom,rgba(159,88,150,0) 0,rgba(159,88,150,0.6) 100%);
15+
background-image: -ms-linear-gradient(left bottom,rgba(159,88,150,0) 0,rgba(159,88,150,0.6) 100%);
16+
background-image: linear,to left bottom,rgba(159,88,150,0) 0,rgba(159,88,150,0.6) 100%;
17+
}
18+
19+
.login-button:active {
20+
background-color: #5f467e;
21+
}
22+
23+
@media screen AND (min-width: 30em) {
24+
.mw-430px-ns {
25+
max-width: 430px;
26+
}
27+
}
28+
29+
.screenreader-only {
30+
display: block;
31+
position: absolute;
32+
left: -10000px;
33+
top: auto;
34+
width: 1px;
35+
height: 1px;
36+
overflow: hidden;
37+
}

rootfs/api/static/js/cookie-banner-08945b76c5550ae984a98d2ebf8bbac6.js

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
1-
{% load static %}
2-
3-
<link rel="stylesheet" href="{% static 'index.css' %}" type="text/css">
4-
5-
<head>
6-
<meta charset="UTF-8">
7-
<title>Reset Password</title>
8-
</head>
9-
10-
<div class="container">
11-
<div class="panel" style="padding-bottom: 30px">
12-
<h2 class="h3" style="margin-bottom: 40px;color: green">Account activite successful</h2>
13-
<p>Your account has been activated successfully.</p>
14-
<a href="/">please go to the login page.</a>
15-
</div>
16-
</div>
1+
{% extends 'user/message.html' %}
2+
{% block title %}Account activite successful{% endblock %}
3+
{% block message %}
4+
Your account has been activated successfully.
5+
<a href="/">please go to the login page.</a>
6+
{% endblock %}
Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,5 @@
1-
{% load static %}
2-
3-
<link rel="stylesheet" href="{% static 'index.css' %}" type="text/css">
4-
5-
<head>
6-
<meta charset="UTF-8">
7-
<title>Reset Password</title>
8-
</head>
9-
10-
<div class="container">
11-
<div class="panel" style="padding-bottom: 30px">
12-
<h2 class="h3" style="margin-bottom: 40px;color: red">Account activite fail</h2>
13-
<p>The confirmation link was invalid, possibly because it has already been used.</p>
14-
<a href="/user/register/">please go to the register page.</a>
15-
</div>
16-
</div>
1+
{% extends 'user/message.html' %}
2+
{% block title %}Account activite fail{% endblock %}
3+
{% block message %}
4+
The confirmation link was invalid, possibly it has already been used, go back <a href="/user/register/">register</a>
5+
{% endblock %}

rootfs/api/templates/user/logged_out.html

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 5 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,5 @@
1-
{% load static %}
2-
<!DOCTYPE html>
3-
<!-- saved from url=(0130)https://cli-auth.heroku.com/auth/cli/callback?code=b334d202-af2c-42d9-94c8-ed88ffbfaaee&state=4f452c91-db9b-482c-90f7-0513afafdb8d -->
4-
<html class="w-100 h-100 login-gradient" lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5-
6-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8-
<title>Heroku | Login</title>
9-
<link rel="stylesheet" href="{% static 'css/purple3.min.css' %}">
10-
<link rel="stylesheet" href="{% static 'css/app-a26e92cde3afe8d5333ec54d0608aca2.css' %}">
11-
<link rel="shortcut icon" type="image/x-icon" href="https://www.herokucdn.com/favicons/favicon.ico">
12-
</head>
13-
<body class="h-100 w-100 flex flex-column">
14-
<div id="heroku-cookie-banner">
15-
<div class="heroku-cookie-banner">
16-
<p>We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can <a href="https://www.salesforce.com/company/privacy/full_privacy.jsp#nav_info">read more</a> and <a href="https://www.salesforce.com/company/privacy/full_privacy.jsp#nav_info">make your cookie choices here</a>. By continuing to use this site you are giving us your consent to do this.</p>
17-
<a class="heroku-cookie-banner__dismiss" href="https://cli-auth.heroku.com/auth/cli/callback?code=b334d202-af2c-42d9-94c8-ed88ffbfaaee&amp;state=4f452c91-db9b-482c-90f7-0513afafdb8d#" role="button" aria-label="Dismiss cookie notice">
18-
<svg viewBox="0 0 16 16">
19-
<path fill-rule="evenodd" d="M6.663 8.01l-3.362 3.362a.955.955 0 0 0-.005 1.352.953.953 0 0 0 1.352-.005L8.01 9.357l3.362 3.362a.955.955 0 0 0 1.352.005.953.953 0 0 0-.005-1.352L9.357 8.01l3.362-3.362a.955.955 0 0 0 .005-1.352.953.953 0 0 0-1.352.005L8.01 6.663 4.648 3.301a.955.955 0 0 0-1.352-.005.953.953 0 0 0 .005 1.352L6.663 8.01z"></path>
20-
</svg>
21-
</a>
22-
</div>
23-
</div>
24-
<link rel="stylesheet" href="{% static 'css/purple3.min.css' %}">
25-
<script src="{% static 'js/cookie-banner-08945b76c5550ae984a98d2ebf8bbac6.js' %}"></script>
26-
27-
<main role="main" class="flex flex-column w-100 h-100">
28-
<div class="flex flex-1 items-center mw-430px-ns self-center w-100">
29-
<div class="mh4 w-100 flex flex-column items-center">
30-
<div class="mt2 mb5 flex flex-column items-center self-center">
31-
<a href="https://heroku.com/" class="db" title="Heroku">
32-
<img class="db h5" src="{% static 'images/heroku-logotype-vertical-white.svg' alt="Heroku"> %}">
33-
</a>
34-
</div>
35-
<div class="br2 w-100-ns mw-430px-ns self-center flex flex-column bg-white pv5 ph6">
36-
37-
<div class="tc mb4">
38-
<h1 class="f1 fw3 purple">Logged In</h1>
39-
</div>
40-
<p class="tc gray-90">
41-
You can close this page and return to your CLI. It should now be logged in.
42-
</p>
43-
44-
</div>
45-
</div>
46-
</div>
47-
48-
<footer class="mt2 mb5 mw-430px-ns self-center flex flex-column justify-end w-100">
49-
<div class="flex flex-column items-center self-center">
50-
<a class="db flex items-center hk-link no-underline light-gray" href="https://heroku.com/">
51-
<span class="db f3 fw1 mr1">Heroku is a</span>
52-
<img class="db h4 nudge-down--3" src="{% static 'images/sfdc@2x.png' alt="" aria-hidden="true" %}">
53-
<span class="db screenreader-only">Salesforce</span><span class="f3 fw1 ml1">company</span>
54-
</a>
55-
</div>
56-
<div class="mt2 mh4 self-center w-100-ns mw-430px-ns flex flex-column items-center">
57-
<div>
58-
<ul class="list flex flex-column flex-row-ns pa0 items-center justify-between w-100">
59-
<li class="mb2 mb0-ns word-nowrap mr2">
60-
<a class="hk-link light-gray no-underline" href="https://heroku.com/policy/tos">Terms of Service</a>
61-
</li>
62-
<li class="mb2 mb0-ns mr2">
63-
<a class="hk-link light-gray no-underline" href="https://www.salesforce.com/company/privacy">Privacy</a>
64-
</li>
65-
<li class="mb2 mb0-ns">
66-
<a class="hk-link light-gray no-underline" href="https://www.salesforce.com/company/privacy/full_privacy.jsp#nav_info">Cookies</a>
67-
</li>
68-
</ul>
69-
<div class="tc light-gray">© 2021 Salesforce.com</div>
70-
</div>
71-
</div>
72-
</footer>
73-
</main>
74-
75-
76-
</body></html>
1+
{% extends 'user/message.html' %}
2+
{% block title %}Login done{% endblock %}
3+
{% block message %}
4+
You can close this page and return to your CLI. It should now be logged in.
5+
{% endblock %}

0 commit comments

Comments
 (0)