mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Reformat all files with Prettier
This commit is contained in:
parent
0cde0d46d2
commit
ac79eb09f5
206 changed files with 727 additions and 888 deletions
|
@ -22,13 +22,13 @@ function buildQueryString(params: QueryParamObject) {
|
|||
return (
|
||||
"?" +
|
||||
Array.from(Object.entries(params))
|
||||
.map(pair => `${encodeURIComponent(pair[0])}=${encodeURIComponent(pair[1] || "")}`)
|
||||
.map((pair) => `${encodeURIComponent(pair[0])}=${encodeURIComponent(pair[1] || "")}`)
|
||||
.join("&")
|
||||
);
|
||||
}
|
||||
|
||||
export function request(resource, fetchOpts: RequestInit = {}) {
|
||||
return fetch(`${apiUrl}/${resource}`, fetchOpts).then(async res => {
|
||||
return fetch(`${apiUrl}/${resource}`, fetchOpts).then(async (res) => {
|
||||
if (!res.ok) {
|
||||
if (res.status === 401) {
|
||||
RootStore.dispatch("auth/expiredLogin");
|
||||
|
|
|
@ -19,7 +19,7 @@ Vue.directive("trim-indents", {
|
|||
|
||||
el.innerHTML = withoutStartEndWhitespace
|
||||
.split("\n")
|
||||
.map(line => line.slice(spacesToTrim))
|
||||
.map((line) => line.slice(spacesToTrim))
|
||||
.join("\n");
|
||||
},
|
||||
});
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Zeppelin - Moderation bot for Discord</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<h1>Zeppelin</h1>
|
||||
The Zeppelin website requires JavaScript to load.
|
||||
</noscript>
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"
|
||||
/>
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
||||
<title>Zeppelin - Moderation bot for Discord</title>
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<h1>Zeppelin</h1>
|
||||
The Zeppelin website requires JavaScript to load.
|
||||
</noscript>
|
||||
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
<div id="app"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<div id="error"></div>
|
||||
<div class="wrapper">
|
||||
<div class="logo-column">
|
||||
<img class="logo" src="./img/logo.png" alt="Zeppelin Logo">
|
||||
<img class="logo" src="./img/logo.png" alt="Zeppelin Logo" />
|
||||
</div>
|
||||
<div class="info-column">
|
||||
<h1>Zeppelin</h1>
|
||||
|
|
|
@ -90,7 +90,7 @@ export const GuildStore: Module<GuildState, RootState> = {
|
|||
Vue.set(
|
||||
state.guildPermissionAssignments,
|
||||
guildId,
|
||||
permissionAssignments.map(p => ({
|
||||
permissionAssignments.map((p) => ({
|
||||
...p,
|
||||
permissions: new Set(p.permissions),
|
||||
})),
|
||||
|
@ -102,12 +102,12 @@ export const GuildStore: Module<GuildState, RootState> = {
|
|||
if (permissions.length === 0) {
|
||||
// No permissions -> remove permission assignment
|
||||
guildPermissionAssignments.splice(
|
||||
guildPermissionAssignments.findIndex(p => p.target_id === targetId && p.type === type),
|
||||
guildPermissionAssignments.findIndex((p) => p.target_id === targetId && p.type === type),
|
||||
1,
|
||||
);
|
||||
} else {
|
||||
// Update/add permission assignment
|
||||
const itemToEdit = guildPermissionAssignments.find(p => p.target_id === targetId && p.type === type);
|
||||
const itemToEdit = guildPermissionAssignments.find((p) => p.target_id === targetId && p.type === type);
|
||||
if (itemToEdit) {
|
||||
itemToEdit.permissions = new Set(permissions);
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue