Have all error pages be rendered by Angular

Fixes #2198

Fixes https://www.pivotaltracker.com/story/show/135724483
This commit is contained in:
Joseph Schorr 2016-12-07 17:13:17 -05:00
parent 0aa6e6cd58
commit c06bba38de
13 changed files with 78 additions and 116 deletions

View file

@ -1,6 +1,8 @@
<!DOCTYPE html>
<html ng-app="quay">
<head>
<base href="/">
{% block title %}
{% endblock %}
@ -33,12 +35,12 @@
{% endblock %}
<script type="text/javascript">
window.__endpoints = {{ route_data|safe }}.paths;
window.__features = {{ feature_set|safe }};
window.__config = {{ config_set|safe }};
window.__oauth = {{ oauth_set|safe }};
window.__auth_scopes = {{ scope_set|safe }};
window.__vuln_priority = {{ vuln_priority_set|safe }}
window.__endpoints = {{ route_data|tojson|safe }}.paths;
window.__features = {{ feature_set|tojson|safe }};
window.__config = {{ config_set|tojson|safe }};
window.__oauth = {{ oauth_set|tojson|safe }};
window.__auth_scopes = {{ scope_set|tojson|safe }};
window.__vuln_priority = {{ vuln_priority_set|tojson|safe }}
window.__token = '{{ csrf_token() }}';
{% if error_code %}
@ -46,7 +48,7 @@
{% endif %}
{% if error_info %}
window.__error_info = {{ error_info|safe }};
window.__error_info = {{ error_info|tojson|safe }};
{% endif %}
</script>

View file

@ -1,20 +0,0 @@
{% extends "base.html" %}
{% block title %}
<title>Confirmation error · Quay</title>
{% endblock %}
{% block body_content %}
<div class="container">
<div class="row">
<div class="col-md-12">
<h2>There was an error confirming your e-mail address.</h2>
{% if error_message %}
<div class="alert alert-danger">{{ error_message }}</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}

View file

@ -1,16 +0,0 @@
{% extends "base.html" %}
{% block title %}
<title>Docker Trademark Disclaimer · Quay</title>
{% endblock %}
{% block body_content %}
<div class="container">
<div class="row">
<div class="col-md-12">
Quay is in no way affiliated with or sponsored by Docker, Inc. Docker, Docker logo and dotCloud are trademarks or registered trademarks of Docker, Inc. in the United States and/or other countries. Docker, Inc. and other parties may also have trademark rights in other terms used herein.
</div>
</div>
</div>
{% endblock %}

View file

@ -1,9 +1,5 @@
{% extends "base.html" %}
{% block added_meta %}
<base href="/">
{% endblock %}
{% block title %}
<title>Authorize {{ application.name }} · Quay</title>
{% endblock %}

View file

@ -1,28 +0,0 @@
{% extends "base.html" %}
{% block title %}
<title>Error Logging in with {{ service_name }} · Quay</title>
{% endblock %}
{% block body_content %}
<div class="container">
<div class="row">
<div class="col-md-12">
<h2 style="margin-bottom: 20px;">There was an error logging in with {{ service_name }}.</h2>
{% if error_message %}
<div class="co-alert co-alert-danger">{{ error_message }}</div>
{% endif %}
{% if user_creation %}
<div>
Please register using the <a ng-href="{{ service_url }}/signin" target="_self">registration form</a> to continue.
You will be able to connect your account to your Quay account
in the user settings.
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}