mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 05:10:41 +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 | Is done? | Priority |
|
||||
| ----- | -------- | -------- |
|
||||
| Profile Message | 🟡 | LOW |
|
||||
| IPs of users will add UserModel with select- | 🟢 | MEDIUM |
|
||||
| Profile Message | ⚪ | LOW |
|
||||
| Better Auth | ⚪ | MEDIUM |
|
||||
|
||||
- mod role, permissions
|
||||
- Fix footer's location.
|
||||
- upload other photos, model for it
|
||||
- categories page is need a update.
|
||||
| mod role, permissions | ⚪ | MEDIUM |
|
||||
| upload other photos, model for it | ⚪ | MEDIUM |
|
||||
| categories page is need a update | ⚪ | LOW |
|
||||
- preview for send messages in markdown format.
|
||||
- desp => description
|
||||
- admin, view ips on user page.
|
||||
|
||||
## Major Version History
|
||||
- V4: Caching
|
||||
|
|
|
@ -21,7 +21,7 @@ app.get("/:id/avatar", async (req, res) => {
|
|||
app.get("/:id", async (req, res) => {
|
||||
const user = req.user
|
||||
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)) {
|
||||
|
||||
|
|
|
@ -94,6 +94,15 @@
|
|||
<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="
|
||||
margin: 10px auto;
|
||||
box-shadow: 0 0 5px 0 var(--second);
|
||||
|
|
Loading…
Reference in a new issue