mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-22 20:10:40 +03:00
Added user ips to user page
This commit is contained in:
parent
6c5f36836b
commit
16f72585a0
3 changed files with 14 additions and 9 deletions
12
README.md
12
README.md
|
@ -34,17 +34,13 @@ Akf-forum has got an API for AJAX (fetch), other clients etc. And, you can learn
|
||||||
## TO-DO list
|
## TO-DO list
|
||||||
| To do | Is done? | Priority |
|
| To do | Is done? | Priority |
|
||||||
| ----- | -------- | -------- |
|
| ----- | -------- | -------- |
|
||||||
| Profile Message | 🟡 | LOW |
|
| Profile Message | ⚪ | LOW |
|
||||||
| IPs of users will add UserModel with select- | 🟢 | MEDIUM |
|
|
||||||
| Better Auth | ⚪ | MEDIUM |
|
| Better Auth | ⚪ | MEDIUM |
|
||||||
|
| mod role, permissions | ⚪ | MEDIUM |
|
||||||
- mod role, permissions
|
| upload other photos, model for it | ⚪ | MEDIUM |
|
||||||
- Fix footer's location.
|
| categories page is need a update | ⚪ | LOW |
|
||||||
- upload other photos, model for it
|
|
||||||
- categories page is need a update.
|
|
||||||
- preview for send messages in markdown format.
|
- preview for send messages in markdown format.
|
||||||
- desp => description
|
- desp => description
|
||||||
- admin, view ips on user page.
|
|
||||||
|
|
||||||
## Major Version History
|
## Major Version History
|
||||||
- V4: Caching
|
- V4: Caching
|
||||||
|
|
|
@ -21,7 +21,7 @@ app.get("/:id/avatar", async (req, res) => {
|
||||||
app.get("/:id", async (req, res) => {
|
app.get("/:id", async (req, res) => {
|
||||||
const user = req.user
|
const user = req.user
|
||||||
const { id } = req.params;
|
const { id } = req.params;
|
||||||
const member = await UserModel.get(id, "+lastSeen");
|
const member = await UserModel.get(id, "+lastSeen +ips");
|
||||||
|
|
||||||
if (member && (user?.admin || !member.deleted)) {
|
if (member && (user?.admin || !member.deleted)) {
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,15 @@
|
||||||
<h2 class="box-value" style="align-self: center;">Admin</h2>
|
<h2 class="box-value" style="align-self: center;">Admin</h2>
|
||||||
<% } %>
|
<% } %>
|
||||||
|
|
||||||
|
<% if (user?.admin) {%>
|
||||||
|
<h3 style="text-align: center;"> IPS:</h3>
|
||||||
|
<select>
|
||||||
|
<% for(const ip of member.ips) { %>
|
||||||
|
<option><%= ip %></option>
|
||||||
|
<% } %>
|
||||||
|
</select>
|
||||||
|
<% } %>
|
||||||
|
|
||||||
<div class="box-value" id="about" style="
|
<div class="box-value" id="about" style="
|
||||||
margin: 10px auto;
|
margin: 10px auto;
|
||||||
box-shadow: 0 0 5px 0 var(--second);
|
box-shadow: 0 0 5px 0 var(--second);
|
||||||
|
|
Loading…
Reference in a new issue