frontend: cleanup

* dummy commit

* cleanup workflows

* setup and run eslint

* add linter to CI

* use eslint for formatting

* reorder rules

* drop editor config
This commit is contained in:
Hayden 2022-09-09 14:46:53 -08:00 committed by GitHub
parent 78fa714297
commit 75c633dcb5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 2048 additions and 641 deletions

View file

@ -1,5 +1,5 @@
<script lang="ts" setup>
import { useAuthStore } from '~~/stores/auth';
import { useAuthStore } from "~~/stores/auth";
const authStore = useAuthStore();
const api = useUserApi();
@ -10,16 +10,16 @@
return;
}
navigateTo('/');
navigateTo("/");
}
const links = [
{
name: 'Home',
href: '/home',
name: "Home",
href: "/home",
},
{
name: 'Logout',
name: "Logout",
action: logout,
last: true,
},
@ -33,19 +33,19 @@
const dropdown = [
{
name: 'Item / Asset',
name: "Item / Asset",
action: () => {
modals.item = true;
},
},
{
name: 'Location',
name: "Location",
action: () => {
modals.location = true;
},
},
{
name: 'Label',
name: "Label",
action: () => {
modals.label = true;
},
@ -66,7 +66,7 @@
<div class="bg-neutral absolute shadow-xl top-0 h-[50vh] max-h-96 sm:h-[28vh] -z-10 w-full"></div>
<BaseContainer is="header" class="py-6 max-w-none">
<BaseContainer cmp="header" class="py-6 max-w-none">
<BaseContainer>
<h2 class="mt-1 text-4xl font-bold tracking-tight text-neutral-content sm:text-5xl lg:text-6xl flex">
HomeB
@ -77,20 +77,22 @@
<template v-for="link in links">
<NuxtLink
v-if="!link.action"
:key="link.name"
class="hover:text-base-content transition-color duration-200 italic"
:to="link.href"
>
{{ link.name }}
</NuxtLink>
<button
for="location-form-modal"
v-else
@click="link.action"
:key="link.name + 'link'"
for="location-form-modal"
class="hover:text-base-content transition-color duration-200 italic"
@click="link.action"
>
{{ link.name }}
</button>
<span v-if="!link.last"> / </span>
<span v-if="!link.last" :key="link.name"> / </span>
</template>
</div>
<div class="flex mt-6">
@ -102,7 +104,7 @@
Create
</label>
<ul tabindex="0" class="dropdown-content menu p-2 shadow bg-base-100 rounded-box w-52">
<li v-for="btn in dropdown">
<li v-for="btn in dropdown" :key="btn.name">
<button @click="btn.action">
{{ btn.name }}
</button>