mirror of
https://github.com/Akif9748/akf-forum.git
synced 2024-11-26 05:10:41 +03:00
admin page to new theme
Co-authored-by: Zeynep <zeynepkotan50@gmail.com>
This commit is contained in:
parent
009888d3aa
commit
7aa459e402
2 changed files with 22 additions and 41 deletions
|
@ -2,12 +2,13 @@
|
|||
color: #4d18e6;
|
||||
font-weight: 700;
|
||||
}
|
||||
form{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.input {
|
||||
|
@ -19,4 +20,4 @@ margin: 0 auto;
|
|||
width: 500px;
|
||||
margin-bottom: 10px;
|
||||
border: 2px solid #d9d9d9;
|
||||
}
|
||||
}
|
|
@ -1,40 +1,20 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<%- include("extra/old_header", {title: "Admin panel!" }) %>
|
||||
|
||||
<body>
|
||||
|
||||
<%- include("extra/old_navbar", {user}) %>
|
||||
|
||||
<h1>Welcome to the admin panel of the forum, <%= user.name %>!</h1>
|
||||
|
||||
<form>
|
||||
<h2>Write an ID to give someone admin permissions:</h2>
|
||||
<input name="userid"></input>
|
||||
<hr>
|
||||
<button class="big" type="submit">Give admin permissions!</button>
|
||||
</form>
|
||||
|
||||
<script type="module">
|
||||
|
||||
import request from "../../js/request.js";
|
||||
|
||||
document.addEventListener("submit", async e => {
|
||||
e.preventDefault();
|
||||
|
||||
const response = await request("/api/users/" + e.target[0].value + "/admin");
|
||||
|
||||
if (response.admin)
|
||||
alert("Making admin of "+response.name+" is success!");
|
||||
|
||||
});
|
||||
<%- include("extra/meta", {title: "User list!" }) %>
|
||||
|
||||
|
||||
</script>
|
||||
<body style="text-align: center;">
|
||||
<%- include("extra/navbar") %>
|
||||
<b>SİLME LAN İT BEN SİLECEĞİM</b>
|
||||
<h1 style="color: #4d18e6;">Welcome to the admin panel of the forum, <%= user.name %>!</h1>
|
||||
<h2 style="color: #606060;">Write an ID to give someone admin permissions:</h2>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
<%- include("extra/old_footer") %>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
<!--tam olarak neresi, body içi de, sana komik bisey gostercektim kayybolmus.
|
||||
veritabanı sifrem sence neydi fdsajıgdsıgasd nereden bileyim oradan müneccime mi benziyorum
|
||||
neyse tamam sdapgdsjagsadp
|
||||
lşösdlkşsdklsklsdkl buradan da konuşmadık demeyiz
|
||||
evet benziyorsn cogu seyi tahmin ediyorsun. buradan konusalim artik zeynep goruldu yok burada, ney yazdiysan da gdiyior gdsagdsgdsh
|
||||
-->
|
Loading…
Reference in a new issue