mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 20:10:40 +03:00
Fix for mobility
This commit is contained in:
parent
a1af3f2d4e
commit
5a05737f8b
3 changed files with 7 additions and 9 deletions
|
@ -48,7 +48,7 @@ Akf-forum has got an API for AJAX (fetch), other clients etc. And, you can learn
|
||||||
| categories page is need a update, thread count in category | ⚪ |
|
| categories page is need a update, thread count in category | ⚪ |
|
||||||
| preview for send messages in markdown format | ⚪ |
|
| preview for send messages in markdown format | ⚪ |
|
||||||
| DC auth will store code for taking tokens, and create secret model setting | ⚪ |
|
| DC auth will store code for taking tokens, and create secret model setting | ⚪ |
|
||||||
|
- max lengths for html :/
|
||||||
## Major Version History
|
## Major Version History
|
||||||
- V4: Caching
|
- V4: Caching
|
||||||
- V3: New Theme
|
- V3: New Theme
|
||||||
|
|
10
index.js
10
index.js
|
@ -42,6 +42,9 @@ app.use(express.static("public"), express.json(), IP(),
|
||||||
}, BP({ extended: true })
|
}, BP({ extended: true })
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (discord_auth)
|
||||||
|
app.set("discord_auth", `https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT}&redirect_uri=${host}%2Fdiscord_auth%2Fhash&response_type=token&scope=identify`);
|
||||||
|
|
||||||
if (RLS.enabled)
|
if (RLS.enabled)
|
||||||
app.use(RL({ ...RLS, handler: (req, res, next, opts) => !req.user?.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next() }));
|
app.use(RL({ ...RLS, handler: (req, res, next, opts) => !req.user?.admin ? res.error(opts.statusCode, "You are begin ratelimited") : next() }));
|
||||||
|
|
||||||
|
@ -50,9 +53,4 @@ for (const file of fs.readdirSync("./routes"))
|
||||||
|
|
||||||
app.all("*", (req, res) => res.error(404, "We have not got this page."));
|
app.all("*", (req, res) => res.error(404, "We have not got this page."));
|
||||||
|
|
||||||
const server = app.listen(port, () => console.log(`${forum_name}-forum on port:`, port));
|
app.listen(port, () => console.log(`${forum_name}-forum on port:`, port));
|
||||||
|
|
||||||
if (discord_auth) {
|
|
||||||
const { address } = server.address();
|
|
||||||
app.set("discord_auth", `https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_CLIENT}&redirect_uri=${host}%2Fdiscord_auth%2Fhash&response_type=token&scope=identify`);
|
|
||||||
}
|
|
|
@ -30,9 +30,9 @@
|
||||||
<h1 class="title" style="text-align:center;">Edit <a class="see" href="/users/<%= member.id %>"><%= member.name %></a></h1>
|
<h1 class="title" style="text-align:center;">Edit <a class="see" href="/users/<%= member.id %>"><%= member.name %></a></h1>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<form id="form" class="see" style="box-shadow:none">
|
<form id="form" class="see" style="box-shadow:none">
|
||||||
<input type="text" name="name" minlength="3" maxlength="25" placeholder="<%=member.name%>" class="input" required>
|
<input type="text" name="name" maxlength="25" placeholder="<%=member.name%>" class="input" >
|
||||||
|
|
||||||
<textarea class="input" name="about" maxlength="256" required rows="4" cols="60" name="content" placeholder="<%=member.about%>"></textarea>
|
<textarea class="input" name="about" maxlength="256" rows="4" cols="60" name="content" placeholder="<%=member.about%>"></textarea>
|
||||||
<% if (user?.admin){ %>
|
<% if (user?.admin){ %>
|
||||||
Is Admin? <input id='admin' type='checkbox' value='true' name='admin' <%=member.admin ? "checked": ""%>>
|
Is Admin? <input id='admin' type='checkbox' value='true' name='admin' <%=member.admin ? "checked": ""%>>
|
||||||
<input id='adminHidden' type='hidden' value='false' name='admin'>
|
<input id='adminHidden' type='hidden' value='false' name='admin'>
|
||||||
|
|
Loading…
Reference in a new issue