revert unnecessary linting changes

This commit is contained in:
Almeida 2021-05-07 21:26:35 +01:00 committed by almeidx
parent 5b1a2ca7a3
commit f1330ad062
No known key found for this signature in database
GPG key ID: 8558FBFF849BD664

View file

@ -5,14 +5,17 @@
<!-- Top bar --> <!-- Top bar -->
<nav class="flex items-stretch pl-4 pr-2 py-1 border border-gray-700 rounded bg-gray-800 shadow-xl"> <nav class="flex items-stretch pl-4 pr-2 py-1 border border-gray-700 rounded bg-gray-800 shadow-xl">
<div class="flex-initial flex items-center"> <div class="flex-initial flex items-center">
<img class="flex-auto w-10 mr-5" src="../../img/logo.png" alt="" aria-hidden="true" /> <img class="flex-auto w-10 mr-5" src="../../img/logo.png" alt="" aria-hidden="true">
<router-link to="/docs"> <router-link to="/docs">
<h1 class="flex-auto font-semibold">Zeppelin Documentation</h1> <h1 class="flex-auto font-semibold">Zeppelin Documentation</h1>
</router-link> </router-link>
</div> </div>
<div class="flex-1 flex items-center justify-end"> <div class="flex-1 flex items-center justify-end">
<router-link to="/dashboard" role="menuitem" class="py-1 px-2 rounded hover:bg-gray-700 hidden lg:block"> <router-link
to="/dashboard"
role="menuitem"
class="py-1 px-2 rounded hover:bg-gray-700 hidden lg:block">
Go to dashboard Go to dashboard
</router-link> </router-link>
<button class="link-button text-2xl leading-zero lg:hidden" v-on:click="toggleMobileMenu()" aria-hidden="true"> <button class="link-button text-2xl leading-zero lg:hidden" v-on:click="toggleMobileMenu()" aria-hidden="true">
@ -26,23 +29,12 @@
<!-- Content wrapper --> <!-- Content wrapper -->
<div class="flex flex-wrap items-start mt-8"> <div class="flex flex-wrap items-start mt-8">
<!-- Sidebar --> <!-- Sidebar -->
<nav <nav class="docs-sidebar px-4 pt-2 pb-3 mr-8 mb-4 border border-gray-700 rounded bg-gray-800 shadow-md flex-full lg:flex-none lg:block" v-bind:class="{ closed: !mobileMenuOpen }">
class="docs-sidebar px-4 pt-2 pb-3 mr-8 mb-4 border border-gray-700 rounded bg-gray-800 shadow-md flex-full lg:flex-none lg:block"
v-bind:class="{ closed: !mobileMenuOpen }"
>
<div role="none" v-for="(group, index) in menu"> <div role="none" v-for="(group, index) in menu">
<h1 class="font-bold" :aria-owns="'menu-group-' + index" :class="{ 'mt-4': index !== 0 }"> <h1 class="font-bold" :aria-owns="'menu-group-' + index" :class="{'mt-4': index !== 0}">{{ group.label }}</h1>
{{ group.label }}
</h1>
<ul v-bind:id="'menu-group-' + index" role="group" class="list-none pl-2"> <ul v-bind:id="'menu-group-' + index" role="group" class="list-none pl-2">
<li role="none" v-for="item in group.items"> <li role="none" v-for="item in group.items">
<router-link <router-link role="menuitem" :to="item.to" class="text-gray-300 hover:text-gray-500" v-on:click.native="onChooseMenuItem()">{{ item.label }}</router-link>
role="menuitem"
:to="item.to"
class="text-gray-300 hover:text-gray-500"
v-on:click.native="onChooseMenuItem()"
>{{ item.label }}</router-link
>
</li> </li>
</ul> </ul>
</div> </div>
@ -60,7 +52,7 @@
<script lang="ts"> <script lang="ts">
import Vue from "vue"; import Vue from "vue";
import {mapState} from "vuex"; import {mapState} from "vuex";
import Menu from "vue-material-design-icons/Menu.vue"; import Menu from 'vue-material-design-icons/Menu.vue';
import Title from "../Title.vue"; import Title from "../Title.vue";
type TMenuItem = { type TMenuItem = {
@ -75,57 +67,57 @@ type TMenu = TMenuGroup[];
const menu: TMenu = [ const menu: TMenu = [
{ {
label: "General", label: 'General',
items: [ items: [
{ {
to: "/docs/introduction", to: '/docs/introduction',
label: "Introduction", label: 'Introduction',
}, },
], ],
}, },
{ {
label: "Configuration", label: 'Configuration',
items: [ items: [
{ {
to: "/docs/configuration/configuration-format", to: '/docs/configuration/configuration-format',
label: "Configuration format", label: 'Configuration format',
}, },
{ {
to: "/docs/configuration/plugin-configuration", to: '/docs/configuration/plugin-configuration',
label: "Plugin configuration", label: 'Plugin configuration',
}, },
{ {
to: "/docs/configuration/permissions", to: '/docs/configuration/permissions',
label: "Permissions", label: 'Permissions',
}, },
], ],
}, },
{ {
label: "Reference", label: 'Reference',
items: [ items: [
{ {
to: "/docs/reference/argument-types", to: '/docs/reference/argument-types',
label: "Argument types", label: 'Argument types',
}, },
], ],
}, },
{ {
label: "Setup guides", label: 'Setup guides',
items: [ items: [
{ {
to: "/docs/setup-guides/logs", to: '/docs/setup-guides/logs',
label: "Logs", label: 'Logs',
}, },
{ {
to: "/docs/setup-guides/moderation", to: '/docs/setup-guides/moderation',
label: "Moderation", label: 'Moderation',
}, },
{ {
to: "/docs/setup-guides/counters", to: '/docs/setup-guides/counters',
label: "Counters", label: 'Counters',
}, },
], ],
}, },
@ -139,7 +131,7 @@ export default {
data() { data() {
return { return {
mobileMenuOpen: false, mobileMenuOpen: false
}; };
}, },
@ -150,37 +142,31 @@ export default {
onChooseMenuItem() { onChooseMenuItem() {
this.mobileMenuOpen = false; this.mobileMenuOpen = false;
this.$refs["main-anchor"].focus(); this.$refs['main-anchor'].focus();
}, },
}, },
computed: { computed: {
...mapState("docs", { ...mapState('docs', {
plugins: "allPlugins", plugins: 'allPlugins',
}), }),
menu() { menu() {
console.log(this.plugins);
return [ return [
...menu, ...menu,
{ {
label: "Plugins", label: 'Plugins',
items: this.plugins items: this.plugins.filter(plugin => !plugin.info.legacy).map(plugin => ({
.filter(plugin => !plugin.info.legacy)
.map(plugin => ({
label: plugin.info.prettyName || plugin.name, label: plugin.info.prettyName || plugin.name,
to: `/docs/plugins/${plugin.name}`, to: `/docs/plugins/${plugin.name}`,
})), })),
}, },
{ {
label: "Legacy Plugins", label: "Legacy Plugins",
items: this.plugins items: this.plugins.filter(plugin => plugin.info.legacy).map(plugin => ({
.filter(plugin => plugin.info.legacy)
.map(plugin => ({
label: plugin.info.prettyName || plugin.name, label: plugin.info.prettyName || plugin.name,
to: `/docs/plugins/${plugin.name}`, to: `/docs/plugins/${plugin.name}`,
})), })),
}, }
]; ];
}, },
}, },