2018-07-10 09:16:24 +00:00
|
|
|
<template>
|
|
|
|
<table class="ban-list">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="hostmask">Banned</th>
|
|
|
|
<th class="banned_by">Banned By</th>
|
|
|
|
<th class="banned_at">Banned At</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2019-07-17 09:33:59 +00:00
|
|
|
<tr v-for="ban in channel.data" :key="ban.hostmask">
|
2021-05-22 17:42:57 +00:00
|
|
|
<td class="hostmask"><ParsedMessage :network="network" :text="ban.hostmask" /></td>
|
2018-07-12 08:41:40 +00:00
|
|
|
<td class="banned_by">{{ ban.banned_by }}</td>
|
2020-01-08 09:11:44 +00:00
|
|
|
<td class="banned_at">{{ localetime(ban.banned_at) }}</td>
|
2018-07-10 09:16:24 +00:00
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</template>
|
|
|
|
|
2022-06-19 00:25:21 +00:00
|
|
|
<script lang="ts">
|
2021-05-22 17:42:57 +00:00
|
|
|
import ParsedMessage from "../ParsedMessage.vue";
|
2022-06-19 00:25:21 +00:00
|
|
|
import localeTime from "../../js/helpers/localetime";
|
|
|
|
import {defineComponent, PropType} from "vue";
|
|
|
|
import type {ClientNetwork, ClientChan} from "../../js/types";
|
2020-01-08 09:11:44 +00:00
|
|
|
|
2022-06-19 00:25:21 +00:00
|
|
|
export default defineComponent({
|
2018-07-10 09:16:24 +00:00
|
|
|
name: "ListBans",
|
2021-05-22 17:42:57 +00:00
|
|
|
components: {
|
|
|
|
ParsedMessage,
|
|
|
|
},
|
2018-07-10 09:16:24 +00:00
|
|
|
props: {
|
2022-06-19 00:25:21 +00:00
|
|
|
network: {type: Object as PropType<ClientNetwork>, required: true},
|
|
|
|
channel: {type: Object as PropType<ClientChan>, required: true},
|
2018-07-10 09:16:24 +00:00
|
|
|
},
|
2022-06-19 00:25:21 +00:00
|
|
|
setup() {
|
|
|
|
const localetime = (date: number | Date) => {
|
|
|
|
return localeTime(date);
|
|
|
|
};
|
|
|
|
|
|
|
|
return {
|
|
|
|
localetime,
|
|
|
|
};
|
2020-01-08 09:11:44 +00:00
|
|
|
},
|
2022-06-19 00:25:21 +00:00
|
|
|
});
|
2018-07-10 09:16:24 +00:00
|
|
|
</script>
|