|
@ -91,8 +91,7 @@ |
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------/ |
|
|
//--------------------------------------------------------------------------------/ |
|
|
|
|
|
|
|
|
const blockUser = async (username : string) => { |
|
|
const blockUser = async (username: string) => {}; |
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------/ |
|
|
//--------------------------------------------------------------------------------/ |
|
|
|
|
|
|
|
@ -102,7 +101,6 @@ |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
|
// }); |
|
|
// }); |
|
|
// const data1 = await res1.json(); |
|
|
// const data1 = await res1.json(); |
|
|
|
|
|
|
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/ban", { |
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/ban", { |
|
|
// method: "POST", |
|
|
// method: "POST", |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
@ -123,7 +121,6 @@ |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
|
// }); |
|
|
// }); |
|
|
// const data1 = await res1.json(); |
|
|
// const data1 = await res1.json(); |
|
|
|
|
|
|
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/kick", { |
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/kick", { |
|
|
// method: "POST", |
|
|
// method: "POST", |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
@ -145,7 +142,6 @@ |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
|
// }); |
|
|
// }); |
|
|
// const data1 = await res1.json(); |
|
|
// const data1 = await res1.json(); |
|
|
|
|
|
|
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/mute", { |
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/mute", { |
|
|
// method: "POST", |
|
|
// method: "POST", |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
@ -165,7 +161,6 @@ |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
|
// }); |
|
|
// }); |
|
|
// const data1 = await res1.json(); |
|
|
// const data1 = await res1.json(); |
|
|
|
|
|
|
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/admin", { |
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/admin", { |
|
|
// method: "POST", |
|
|
// method: "POST", |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
@ -185,7 +180,6 @@ |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
|
// }); |
|
|
// }); |
|
|
// const data1 = await res1.json(); |
|
|
// const data1 = await res1.json(); |
|
|
|
|
|
|
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/admin", { |
|
|
// const res2 = await fetch(API_URL + "/chat/channels/" + data1.ftId + "/admin", { |
|
|
// method: "DELETE", |
|
|
// method: "DELETE", |
|
|
// mode: "cors", |
|
|
// mode: "cors", |
|
@ -246,9 +240,7 @@ |
|
|
</li> |
|
|
</li> |
|
|
<li> |
|
|
<li> |
|
|
<!-- block only if not blocked --> |
|
|
<!-- block only if not blocked --> |
|
|
<button on:click={() => blockUser(selectedUser)} |
|
|
<button on:click={() => blockUser(selectedUser)}>Block User</button> |
|
|
>Block User</button |
|
|
|
|
|
> |
|
|
|
|
|
</li> |
|
|
</li> |
|
|
<li><button on:click={closeProfileMenu}>Close</button></li> |
|
|
<li><button on:click={closeProfileMenu}>Close</button></li> |
|
|
</ul> |
|
|
</ul> |
|
@ -277,11 +269,22 @@ |
|
|
<p> |
|
|
<p> |
|
|
{member.username} |
|
|
{member.username} |
|
|
<button on:click={() => banUser(member.username)}>ban</button> |
|
|
<button on:click={() => banUser(member.username)}>ban</button> |
|
|
<button on:click={() => kickUser(member.username)}>kick</button> |
|
|
<button on:click={() => kickUser(member.username)} |
|
|
<button on:click={() => muteUser(member.username)}>mute</button> |
|
|
>kick</button |
|
|
<button on:click={() => adminUser(member.username)}>promote</button> |
|
|
> |
|
|
<button on:click={() => removeAdminUser(member.username)}>demote</button> |
|
|
<button on:click={() => muteUser(member.username)} |
|
|
<p> ----------------------------------------------------------------------------------- </p> |
|
|
>mute</button |
|
|
|
|
|
> |
|
|
|
|
|
<button on:click={() => adminUser(member.username)} |
|
|
|
|
|
>promote</button |
|
|
|
|
|
> |
|
|
|
|
|
<button on:click={() => removeAdminUser(member.username)} |
|
|
|
|
|
>demote</button |
|
|
|
|
|
> |
|
|
|
|
|
</p> |
|
|
|
|
|
<p> |
|
|
|
|
|
----------------------------------------------------------------------------------- |
|
|
|
|
|
</p> |
|
|
</li> |
|
|
</li> |
|
|
{/each} |
|
|
{/each} |
|
|
</ul> |
|
|
</ul> |
|
|