fix: ui/ux issues (#34)

* fix select first bug for creation

* add link to header

* fix date and display errors

* drop group name requirement
This commit is contained in:
Hayden 2022-10-09 05:03:24 -08:00 committed by GitHub
parent 79f7ad40cb
commit a6e3989aee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 33 additions and 46 deletions

View file

@ -68,11 +68,13 @@
<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
<AppLogo class="w-12 -mb-4" />
x
</h2>
<NuxtLink to="/home">
<h2 class="mt-1 text-4xl font-bold tracking-tight text-neutral-content sm:text-5xl lg:text-6xl flex">
HomeB
<AppLogo class="w-12 -mb-4" />
x
</h2>
</NuxtLink>
<div class="ml-1 mt-2 text-lg text-neutral-content/75 space-x-2">
<template v-for="link in links">
<NuxtLink

View file

@ -37,13 +37,22 @@
},
});
const api = useUserApi();
const toast = useNotifier();
const locationsStore = useLocationStore();
const locations = computed(() => locationsStore.locations);
const labelStore = useLabelStore();
const labels = computed(() => labelStore.labels);
const submitBtn = ref(null);
const modal = useVModel(props, "modelValue");
const loading = ref(false);
const focused = ref(false);
const form = reactive({
location: {} as LocationOut,
location: locations.value && locations.value.length > 0 ? locations.value[0] : ({} as LocationOut),
name: "",
description: "",
color: "", // Future!
@ -65,14 +74,6 @@
focused.value = true;
}
);
const api = useUserApi();
const toast = useNotifier();
const locationsStore = useLocationStore();
const locations = computed(() => locationsStore.locations);
const labelStore = useLabelStore();
const labels = computed(() => labelStore.labels);
async function create() {
if (!form.location) {
@ -88,7 +89,7 @@
const { error } = await api.items.create(out);
if (error) {
toast.error("Couldn't create label");
toast.error("Couldn't create item");
return;
}

View file

@ -19,7 +19,7 @@
return "";
}
if (nullDate(dt)) {
if (!validDate(dt)) {
return "";
}
@ -35,10 +35,6 @@
}
});
function nullDate(dt: Date) {
return dt.getFullYear() === 1;
}
const props = defineProps({
date: {
type: [Date, String],