mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-15 05:41:51 +00:00
Config schema and docs text changes. Fix clickable tab area in dashboard/docs.
This commit is contained in:
parent
f41d280fab
commit
0bbe9433c1
5 changed files with 35 additions and 8 deletions
|
@ -1,9 +1,36 @@
|
||||||
<template>
|
<template>
|
||||||
<li class="py-2 px-4 hover:text-gray-200" :class="{'pb-1 border-b border-gray-400 text-gray-200': active, 'text-gray-500': !active}">
|
<li style="padding-bottom: 1px" :class="{active: active}">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</li>
|
</li>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
li {
|
||||||
|
padding-bottom: 1px;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
padding-bottom: 0;
|
||||||
|
@apply border-b;
|
||||||
|
@apply border-gray-400;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@apply block;
|
||||||
|
@apply py-2;
|
||||||
|
@apply px-4;
|
||||||
|
@apply text-gray-500;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
@apply text-gray-200;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.active a {
|
||||||
|
@apply text-gray-200;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
export default {
|
export default {
|
||||||
props: ["active"],
|
props: ["active"],
|
||||||
|
|
|
@ -98,9 +98,7 @@
|
||||||
<div class="configuration" v-if="tab === 'configuration'">
|
<div class="configuration" v-if="tab === 'configuration'">
|
||||||
<!-- Basic config info -->
|
<!-- Basic config info -->
|
||||||
<p>
|
<p>
|
||||||
Name in config: <code>{{ data.name }}</code>
|
<strong>Name in config:</strong> <code>{{ data.name }}</code><br>
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
To enable this plugin with default configuration, add <code>{{ data.name }}: {}</code> to the <code>plugins</code> list in config
|
To enable this plugin with default configuration, add <code>{{ data.name }}: {}</code> to the <code>plugins</code> list in config
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
|
@ -90,7 +90,9 @@ let config = {
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
require('postcss-nesting')(),
|
require('postcss-nesting')(),
|
||||||
require('tailwindcss')(),
|
require('tailwindcss')({
|
||||||
|
important: true,
|
||||||
|
}),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "production") {
|
if (process.env.NODE_ENV === "production") {
|
||||||
|
|
|
@ -353,7 +353,7 @@ export class AutomodPlugin extends ZeppelinPlugin<TConfigSchema> {
|
||||||
public static pluginInfo: PluginInfo = {
|
public static pluginInfo: PluginInfo = {
|
||||||
prettyName: "Automod",
|
prettyName: "Automod",
|
||||||
description: trimPluginDescription(`
|
description: trimPluginDescription(`
|
||||||
This plugin allows you to specify automated actions in response to triggers. Example use cases include word filtering and spam prevention.
|
Allows specifying automated actions in response to triggers. Example use cases include word filtering and spam prevention.
|
||||||
`),
|
`),
|
||||||
configurationGuide: trimPluginDescription(`
|
configurationGuide: trimPluginDescription(`
|
||||||
The automod plugin is very customizable. For a full list of available triggers, actions, and their options, see Config schema at the bottom of this page.
|
The automod plugin is very customizable. For a full list of available triggers, actions, and their options, see Config schema at the bottom of this page.
|
||||||
|
|
|
@ -2,14 +2,14 @@ import { ZeppelinPlugin } from "./ZeppelinPlugin";
|
||||||
import { decorators as d, IPluginOptions } from "knub";
|
import { decorators as d, IPluginOptions } from "knub";
|
||||||
import { Member, TextChannel } from "eris";
|
import { Member, TextChannel } from "eris";
|
||||||
import { renderTemplate } from "../templateFormatter";
|
import { renderTemplate } from "../templateFormatter";
|
||||||
import { createChunkedMessage, stripObjectToScalars } from "../utils";
|
import { createChunkedMessage, stripObjectToScalars, tNullable } from "../utils";
|
||||||
import { LogType } from "../data/LogType";
|
import { LogType } from "../data/LogType";
|
||||||
import { GuildLogs } from "../data/GuildLogs";
|
import { GuildLogs } from "../data/GuildLogs";
|
||||||
import * as t from "io-ts";
|
import * as t from "io-ts";
|
||||||
|
|
||||||
const ConfigSchema = t.type({
|
const ConfigSchema = t.type({
|
||||||
send_dm: t.boolean,
|
send_dm: t.boolean,
|
||||||
send_to_channel: t.string,
|
send_to_channel: tNullable(t.string),
|
||||||
message: t.string,
|
message: t.string,
|
||||||
});
|
});
|
||||||
type TConfigSchema = t.TypeOf<typeof ConfigSchema>;
|
type TConfigSchema = t.TypeOf<typeof ConfigSchema>;
|
||||||
|
|
Loading…
Add table
Reference in a new issue