blob: 0c69ef5e75ccbfa4c26c9ab78ab4742319f2418c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
<!--
Copyright 2022 NotDankEnough (ilotterytea)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html>
<head>
<title><%= user.name %> - Image Hoster</title>
<%- include("../partials/meta") %>
</head>
<body>
<div class="container">
<div class="wrapper">
<section class="infoblock">
<a href="/" class="button">Go back...</a>
</section>
<section class="infoblock">
<div class="user_summary">
<div class="pfp">
<img src="<%= user.pic %>">
</div>
<div class="summary">
<h2 id="name"><%= user.name%> (<%= user.alias_id %>)</h2>
<p id="desc"><%= user.desc %></p>
</div>
</div>
<div class="action_buttons">
</div>
</section>
<section class="infoblock" id="authk">
<h2 id="name">
<span class="fa-solid fa-key"></span> Authentication Key
</h2>
<p>An authentication key is required if you want to upload images under your account <soontm>and be able to delete them.</soontm></p>
<div class="action_buttons">
<button value="<%= authKey %>" id="authkey" class="button" onclick="copyAuthkey()">Copy to Clipboard</button>
</div>
</section>
<section class="infoblock">
<h2 id="name">
Files (<%= images.length %>)
</h2>
<div class="items">
<% images.forEach((image, index) => { %>
<div class="item">
<div id="info">
<div id="numeration">
<p><%= index + 1 %></p>
</div>
<div id="thumbnail">
<img src="../images/<%= image.storage_id %>">
</div>
<div id="summary">
<!--<p id="desc"><% if (!image.description) {%> No description provided. <% } else { %> <%= image.description %> <%}%></p>-->
<p id="timestamp" title="Timestamp"><span class="fa-solid fa-stamp"></span> <%= image.timestamp %></p>
</div>
<div id="actions">
<a href="/<%= image.id %>" class="button">View</a>
</div>
</div>
</div>
<%})%>
</div>
</section>
</div>
</div>
</body>
<script>
function copyAuthkey() {
var text = document.getElementById("authkey");
navigator.clipboard.writeText(text.value);
alert("Copied the authentication key!");
}
</script>
</html>
|