Adds logs button

This commit is contained in:
James
2022-02-28 05:46:01 +00:00
parent 654140f3bf
commit b3fc91a1f4
2 changed files with 37 additions and 13 deletions
+7
View File
@@ -291,6 +291,13 @@ GLOBAL_LIST_INIT(pp_limbs, list(
if (targetMob.client)
browse_messages(target_ckey = targetMob.ckey)
if ("logs")
var/source = LOGSRC_MOB
if (targetMob.client)
source = LOGSRC_CLIENT
show_individual_logging_panel(targetMob, source)
if ("job_ban")
if(targetMob.client)
process_banlist(params["selected_role"], params["is_category"], params["want_to_ban"])
+30 -13
View File
@@ -30,9 +30,6 @@ const PAGES = [
component: () => PunishmentActions,
color: "red",
icon: "gavel",
canAccess: data => {
return data.client_ckey;
},
},
{
title: 'Feature Bans',
@@ -564,21 +561,34 @@ const GeneralActions = (props, context) => {
const PunishmentActions = (props, context) => {
const { act, data } = useBackend(context);
const { mob_type, is_frozen, is_slept, glob_mute_bits,
const { client_ckey, mob_type, is_frozen, is_slept, glob_mute_bits,
client_muted, data_related_cid, data_related_ip, data_byond_version,
data_player_join_date, data_account_join_date, active_role_ban_count,
current_time } = data;
return (
<Section>
<Button
width="100%"
py=".5rem"
icon="clipboard-list"
color="orange"
content="Check Notes"
textAlign="center"
onClick={() => act("notes")}
/>
<Flex>
<Button
width="50%"
py=".5rem"
icon="clipboard-list"
color="orange"
content="Notes"
textAlign="center"
disabled={!client_ckey}
onClick={() => act("notes")}
/>
<Button
width="50%"
height="100%"
py=".5rem"
icon="clipboard-list"
color="orange"
content="Logs"
textAlign="center"
onClick={() => act("logs")}
/>
</Flex>
<Section title="Contain">
<Flex>
<Button
@@ -616,6 +626,7 @@ const PunishmentActions = (props, context) => {
icon="ban"
color="red"
content="Kick"
disabled={!client_ckey}
onClick={() => act("kick")}
/>
<Button
@@ -623,6 +634,7 @@ const PunishmentActions = (props, context) => {
icon="gavel"
color="red"
content="Ban"
disabled={!client_ckey}
onClick={() => act("ban")}
/>
<Button
@@ -631,6 +643,7 @@ const PunishmentActions = (props, context) => {
icon="gavel"
color="red"
content="Sticky Ban"
disabled={!client_ckey}
onClick={() => act("sticky_ban")}
/>
</Flex>
@@ -642,12 +655,14 @@ const PunishmentActions = (props, context) => {
icon="lock-open"
color="green"
content="Unmute All"
disabled={!client_ckey}
onClick={() => act("unmute_all")}
/>
<Button
icon="lock"
color="red"
content="Mute All"
disabled={!client_ckey}
onClick={() => act("mute_all")}
/>
</Fragment>
@@ -663,6 +678,7 @@ const PunishmentActions = (props, context) => {
icon={isMuted ? 'check-square-o' : 'square-o'}
color={isMuted? "bad" : ""}
content={bit.name}
disabled={!client_ckey}
onClick={() => act("mute", { "mute_flag": !isMuted? client_muted | bit.bitflag : client_muted & ~bit.bitflag })}
/>
);
@@ -699,6 +715,7 @@ const PunishmentActions = (props, context) => {
width="100%"
color="orange"
content="Details"
disabled={!client_ckey}
>
<LabeledList >
<LabeledList.Item label="NOW" color="label">{current_time}</LabeledList.Item>