Skip to content
This repository was archived by the owner on Feb 12, 2026. It is now read-only.

Commit fa693ab

Browse files
committed
⬆️ version: 1.8.5-b changes w/ web release page
1 parent 0face4c commit fa693ab

File tree

6 files changed

+90
-6
lines changed

6 files changed

+90
-6
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "eres-main",
3-
"version": "1.8.2-b",
3+
"version": "1.8.5-b",
44
"description": "🍍 Eres; new Discord application with modern web dashboard and new features for your community.",
55
"main": "bot.js",
66
"scripts": {

routes/index.js

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,40 @@ router.get('/tos', async (req, res) => {
4343
});
4444
});
4545

46+
router.get('/release', async (req, res) => {
47+
// Set owner and repo variables
48+
const owner = 'skillzl';
49+
const repo = 'eres';
50+
51+
// Construct the URL for fetching the latest release
52+
const url = `https://api.github.com/repos/${owner}/${repo}/releases/latest`;
53+
54+
// Add headers for the fetch request
55+
const headers = {
56+
'Authorization': `token ${process.env.GITHUB_TOKEN}`,
57+
};
58+
59+
const response = await fetch(url, { headers });
60+
const data = await response.json();
61+
62+
// Extract only the necessary information
63+
const release = {
64+
tagName: data.tag_name,
65+
name: data.name,
66+
publishedAt: data.published_at,
67+
body: data.body,
68+
author: data.author.login,
69+
avatarUrl: data.author.avatar_url,
70+
};
71+
72+
res.render('release', {
73+
tag: (req.user ? req.user.tag : 'Login'),
74+
bot: req.client,
75+
user: req.user || null,
76+
release: release,
77+
});
78+
});
79+
4680
router.get('/admin/panel', checkAuth, async (req, res) => {
4781
// Check if the user is allowed
4882
if (req.user.id !== process.env.DEVELOPER_ID) {

views/admin/panel.ejs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,9 @@
205205
<div class="loader size-5"></div>
206206
</div>
207207
</div>
208-
</div>
209208
</div>
210209
</div>
211-
210+
</div>
212211
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
213212
<script>
214213
$('#logs-button').click(function() {

views/index.ejs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,15 @@
7979
</div>
8080
<% } else { %>
8181
<div class="px-4 py-16 mx-auto sm:max-w-xl md:max-w-full lg:max-w-screen-xl md:px-24 lg:px-8 lg:py-20">
82+
<div class="flex justify-center mb-10">
83+
<a href="/release">
84+
<button type="button" class="rounded-full px-4 mr-2 bg-[#aaaaaa10] border border-[#aaaaaa10] text-white p-2 leading-none flex items-center hover:-translate-y-0.5 duration-300">
85+
<%= eresName %>@<%= eresVersion %> is live! <span class="mx-3 text-gray-500"> | </span><span class="text-cyan-300">see what's new <i class="fa-solid fa-arrow-right text-gray-300"></i></span>
86+
</button>
87+
</a>
88+
</div>
8289
<div class="flex justify-center">
83-
<a href="/"><img src="/static/eres-crop.png" alt="eres.fun logo" class="navicon-fade" width="78" height="auto"></a>
90+
<a href="/"><img src="/static/eres-crop.png" alt="eres.fun logo" class="navicon-fade" width="78" height="auto"></a>
8491
</div>
8592
<div class="max-w-xl sm:mx-auto lg:max-w-2xl">
8693
<div class="flex flex-col mb-16 sm:text-center sm:mb-0">
@@ -230,7 +237,7 @@
230237
<h1 class="text-xl font-semibold text-white">What is the current version of the application?</h1>
231238
232239
<p class="mt-2 text-sm text-gray-300">
233-
At this moment you are running on <%= eresName %><%= eresVersion %>. The current version is stil in beta so, a lot of features are still in progress. Also you may encounter bugs so if you are trying to help, report them.
240+
At this moment you are running on <%= eresName %>@<%= eresVersion %>. The current version is stil in beta so, a lot of features are still in progress. Also you may encounter bugs so if you are trying to help, report them.
234241
</p>
235242
</div>
236243
</div>

views/release.ejs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<%- include("partials/header") %>
2+
3+
<title><%= bot.user.username.toLowerCase() %>.fun - release</title>
4+
5+
<body>
6+
<div class="container mx-auto">
7+
<div class="rounded-xl bg-[#aaaaaa10] border border-[#aaaaaa10] shadow-lg text-white p-6 mt-3">
8+
<div>
9+
<%
10+
const owner = 'skillzl';
11+
const repo = 'eres';
12+
%>
13+
14+
<a href="https://github.com/<%= owner %>/<%= repo %>/releases/tag/<%= release.tagName %>">
15+
<button type="button" class="rounded-full px-4 mr-2 bg-[#aaaaaa10] border border-[#aaaaaa10] text-white p-2 leading-none flex items-center hover:-translate-y-0.5 duration-300">
16+
<%= release.tagName %> release <span class="mx-3 text-gray-500"> | </span><span class="text-cyan-300">see on github <i class="fa-solid fa-arrow-right text-gray-300"></i></span>
17+
</button>
18+
</a>
19+
</div>
20+
<div class="text-white mt-3">
21+
<h1>release name: <%= release.name %></h1>
22+
<p>published at: <%= release.publishedAt %></p>
23+
<ul>
24+
<% release.body.split('\n').forEach(function(line) { %>
25+
<% if (line.startsWith('-')) { %>
26+
<li><span class="text-gray-400 mx-2"></span><%= line.slice(1).trim() %></li>
27+
<% } else { %>
28+
<p class="mt-2"><%= line %></p>
29+
<% } %>
30+
<% }); %>
31+
</ul>
32+
<div class="mt-3">
33+
<a href="https://github.com/<%= release.author %>">
34+
<button type="button" class="rounded-full px-10 mr-2 bg-[#aaaaaa10] border border-[#aaaaaa10] text-white p-2 leading-none flex items-center hover:-translate-y-0.5 duration-300">
35+
<img src="<%= release.avatarUrl %>" alt="Author's avatar" class="-ml-8 size-8 rounded-full"> <span class="pl-4"><%= release.author %></span>
36+
</button>
37+
</a>
38+
</div>
39+
</div>
40+
</div>
41+
</div>
42+
</body>
43+
44+
<%- include("partials/footer") %>

0 commit comments

Comments
 (0)