Lots of style fixes
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<style>
|
||||
.file_manager {
|
||||
position: absolute;
|
||||
padding: 0px 8px 0px 8px;
|
||||
padding: 0;
|
||||
background-color: var(--body_color);
|
||||
box-shadow: #000000 8px 8px 50px 5px;
|
||||
left:100px;
|
||||
@@ -25,7 +25,7 @@
|
||||
.file_manager > .nav_bar > .breadcrumbs {flex: 1; margin: 1px 10px; min-width: 100px;}
|
||||
.file_manager > .status_bar {text-align: left;}
|
||||
.file_manager > .directory_area {
|
||||
margin: 0 -8px 0 -8px;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
max-height: 500px;
|
||||
overflow-x: hidden;
|
||||
@@ -47,7 +47,7 @@
|
||||
{{template "menu" .}}
|
||||
<br/>
|
||||
<div class="file_manager">
|
||||
<div class="nav_bar highlight_light border_top border_bottom">
|
||||
<div class="nav_bar highlight_light">
|
||||
<button>⇐</button>
|
||||
<button>⇑</button>
|
||||
<button style="margin-right: 16px;">⇒</button>
|
||||
@@ -68,7 +68,7 @@
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="status_bar highlight_light border_top border_bottom">
|
||||
<div class="status_bar highlight_light">
|
||||
13 items (5 directories, 7 files). Total size: 1.23 GB
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -9,7 +9,7 @@
|
||||
{{template "menu" .}}
|
||||
|
||||
<h1>Please confirm that you want to log out of your pixeldrain account</h1>
|
||||
<form method="POST" action="/logout" class="highlight_light border_top border_bottom">
|
||||
<form method="POST" action="/logout" class="highlight_light">
|
||||
<input type="submit" value="I want to log out of pixeldrain on this computer" class="button_highlight"/>
|
||||
</form>
|
||||
<br/>
|
||||
|
@@ -1,137 +0,0 @@
|
||||
{{define "register"}}<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
{{template "meta_tags" "Register"}}
|
||||
{{template "user_style" .}}
|
||||
<script type="text/javascript">var apiEndpoint = '{{.APIEndpoint}}';</script>
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id='body' class="body">
|
||||
{{template "menu" .}}
|
||||
|
||||
<h1>Register a new Pixeldrain account</h1>
|
||||
<div id="submit_result"></div>
|
||||
<form onSubmit="return submitForm();" class="highlight_dark border_top border_bottom">
|
||||
<table style="margin-left: auto; margin-right: auto; text-align: left; max-width: 30em;">
|
||||
<tr class="form">
|
||||
<td>Username</td>
|
||||
<td><input id="register_username" type="text" autocomplete="username" class="form_input"/></td>
|
||||
</tr>
|
||||
<tr class="form"><td colspan="2">used for logging into your account<br/><hr/></td></tr>
|
||||
<tr class="form">
|
||||
<td>E-mail address</td>
|
||||
<td><input id="register_email" type="text" autocomplete="email" class="form_input"/></td>
|
||||
</tr>
|
||||
<tr class="form"><td colspan="2">
|
||||
not required. your e-mail address will only be used for
|
||||
password resets and important account notifications<br/>
|
||||
<hr/>
|
||||
</td></tr>
|
||||
<tr class="form">
|
||||
<td>Password</td>
|
||||
<td><input id="register_password1" type="password" autocomplete="new-password" class="form_input"/></td>
|
||||
</tr>
|
||||
<tr class="form">
|
||||
<td>Password verification</td>
|
||||
<td><input id="register_password2" type="password" autocomplete="new-password" class="form_input"/></td>
|
||||
</tr>
|
||||
<tr class="form">
|
||||
<td colspan="2">
|
||||
you need to enter your password twice so we can
|
||||
verify that you have not made any typing errors<br/>
|
||||
<hr/>
|
||||
</td>
|
||||
</tr>
|
||||
{{if ne .Other "none"}}<tr class="form">
|
||||
<td>
|
||||
Turing test<br/>
|
||||
(Click the white box)
|
||||
</td>
|
||||
<td style="text-align: center;">
|
||||
<div class="g-recaptcha" data-theme="dark" data-sitekey="{{.Other}}"></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="form">
|
||||
<td colspan="2">
|
||||
the reCaptcha turing test verifies that you are not
|
||||
an evil robot that is trying to flood the website
|
||||
with fake accounts<br/><hr/>
|
||||
</td>
|
||||
</tr>{{end}}
|
||||
<tr class="form">
|
||||
<td colspan="2" style="text-align: right;">
|
||||
<input type="submit" value="Register" class="button_highlight"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<br/>
|
||||
Welcome to the club!<br/>
|
||||
{{template "footer"}}
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function submitForm(){
|
||||
var uname = document.getElementById("register_username").value;
|
||||
var email = document.getElementById("register_email").value;
|
||||
var passwd1 = document.getElementById("register_password1").value;
|
||||
var passwd2 = document.getElementById("register_password2").value;
|
||||
var capt;
|
||||
try {
|
||||
capt = grecaptcha.getResponse();
|
||||
} catch (err) {
|
||||
console.log("Error occurred while reading captcha: "+err);
|
||||
}
|
||||
|
||||
if (passwd1 !== passwd2) {
|
||||
alert("Passwords do not match! Good thing we checked.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var req = new XMLHttpRequest();
|
||||
req.onreadystatechange = function(){
|
||||
if (this.readyState === 4) {
|
||||
var response = JSON.parse(req.responseText);
|
||||
var resultDiv = document.getElementById("submit_result");
|
||||
if (response.success) {
|
||||
resultDiv.className = "border_top border_bottom highlight_green";
|
||||
resultDiv.innerHTML = 'Registration completed! You can now <a href="/login">log in to your account</a>.<br/>'
|
||||
+ "We're glad to have you on board, have fun sharing!";
|
||||
} else {
|
||||
resultDiv.className = "border_top border_bottom highlight_red";
|
||||
var resultHtml = "Something went wrong, please correct these problems and try again:<br/><ul>";
|
||||
for (err in response.errors) {
|
||||
resultHtml += "<li>"+ response.errors[err].message +"</li>";
|
||||
}
|
||||
resultHtml += "</ul>";
|
||||
resultDiv.innerHTML = resultHtml;
|
||||
}
|
||||
|
||||
// On small screens the whole form won't fit on the screen,
|
||||
// so we need to scroll up to show the user the result of
|
||||
// the form submission
|
||||
window.scrollTo(0, 0);
|
||||
|
||||
console.log(response);
|
||||
}
|
||||
}
|
||||
|
||||
req.open("POST", apiEndpoint+"/user/register", true);
|
||||
|
||||
var data = new FormData();
|
||||
data.append("username", uname);
|
||||
data.append("email", email);
|
||||
data.append("password", passwd1);
|
||||
data.append("recaptcha_response", capt);
|
||||
req.send(data);
|
||||
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
|
||||
{{template "analytics"}}
|
||||
</body>
|
||||
</html>
|
||||
{{end}}
|
@@ -8,7 +8,7 @@
|
||||
|
||||
<body>
|
||||
{{template "menu" .}}
|
||||
<div class="highlight_middle border_bottom">
|
||||
<div class="highlight_middle">
|
||||
These files were uploaded while logged in to your pixeldrain account,
|
||||
<a href="/history">click here</a> to view files uploaded anonymously
|
||||
in this browser.
|
||||
|
@@ -10,7 +10,7 @@
|
||||
<div id='body' class="body">
|
||||
{{template "menu" .}}
|
||||
|
||||
<h1 class="highlight_middle border_bottom">Welcome home, {{.Username}}!</h1>
|
||||
<h1 class="highlight_middle">Welcome home, {{.Username}}!</h1>
|
||||
|
||||
<h2>Actions</h2>
|
||||
<ul>
|
||||
@@ -19,7 +19,7 @@
|
||||
</ul>
|
||||
|
||||
<h2>Your most recently uploaded files:</h2>
|
||||
<div class="highlight_dark border_top border_bottom">
|
||||
<div class="highlight_dark">
|
||||
{{$files := .PixelAPI.UserFiles 0 18}}
|
||||
{{range $files.Files}}
|
||||
<a class="file_button" href="/u/{{.ID}}" target="_blank">
|
||||
@@ -33,7 +33,7 @@
|
||||
<a href="/user/files" class="button">...All my files</a>
|
||||
</div>
|
||||
<h2>Your most recently created lists:</h2>
|
||||
<div class="highlight_dark border_top border_bottom">
|
||||
<div class="highlight_dark">
|
||||
{{$lists := .PixelAPI.UserLists 0 18}}
|
||||
{{range $lists.Lists}}
|
||||
<a class="file_button" href="/l/{{.ID}}" target="_blank">
|
||||
|
Reference in New Issue
Block a user