Misc additions and changes

Clickable create dropdown links
Readd search setting accent
Staff/authors avatars
This commit is contained in:
Nassim Jahnke 2022-03-29 18:44:01 +02:00
parent 52f57498bd
commit b9bc2db595
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B
5 changed files with 7 additions and 8 deletions

View File

@ -136,8 +136,8 @@ authLog("render with user " + authStore.user?.name);
<div class="flex items-center gap-2">
<div v-if="authStore.user" class="flex items-center">
<DropdownButton name="Create">
<DropdownItem>{{ t("nav.new.project") }}</DropdownItem>
<DropdownItem>{{ t("nav.new.organization") }}</DropdownItem>
<DropdownItem to="/new">{{ t("nav.new.project") }}</DropdownItem>
<DropdownItem to="/organizations/new">{{ t("nav.new.organization") }}</DropdownItem>
</DropdownButton>
</div>
<button class="flex rounded-md p-2" hover="text-primary-100 bg-primary-50" @click="theme.toggleDarkMode()">

View File

@ -6,6 +6,7 @@ import { useAuthors } from "~/composables/useApiHelper";
import { handleRequestError } from "~/composables/useErrorHandling";
import SortableTable, { Header } from "~/components/SortableTable.vue";
import PageTitle from "~/components/design/PageTitle.vue";
import UserAvatar from "~/components/UserAvatar.vue";
import { useHead } from "@vueuse/head";
import { useSeo } from "~/composables/useSeo";
@ -26,8 +27,7 @@ useHead(useSeo(i18n.t("pages.authorsTitle"), null, route, null));
<template>
<PageTitle>Authors</PageTitle>
<SortableTable :headers="headers" :items="authors?.result">
<!-- todo avatar -->
<template #item_pic="{ item }">pic {{ item.name }}</template>
<template #item_pic="{ item }"><UserAvatar :username="item.name" size="xs"></UserAvatar></template>
<template #item_joinDate="{ item }">{{ i18n.d(item?.joinDate, "date") }}</template>
</SortableTable>
</template>

View File

@ -117,7 +117,7 @@ useHead(meta);
<ProjectList :projects="projects" />
</div>
<!-- Sidebar -->
<Card class="min-w-300px min-h-800px flex flex-col gap-4">
<Card accent class="min-w-300px min-h-800px flex flex-col gap-4">
<div class="versions">
<h3 class="font-bold">Minecraft versions</h3>
<div class="flex flex-col gap-2 max-h-30 overflow-auto">

View File

@ -65,7 +65,6 @@ function convertBBCode() {
}
function createProject() {
console.log(form);
projectCreationErrors.value = [];
useInternalApi<string>("projects/create", true, "post", form)
.then((url) => {

View File

@ -8,6 +8,7 @@ import SortableTable, { Header } from "~/components/SortableTable.vue";
import PageTitle from "~/components/design/PageTitle.vue";
import { useSeo } from "~/composables/useSeo";
import { useHead } from "@vueuse/head";
import UserAvatar from "~/components/UserAvatar.vue";
const ctx = useContext();
const i18n = useI18n();
@ -25,8 +26,7 @@ useHead(useSeo(i18n.t("pages.staffTitle"), null, route, null));
<template>
<PageTitle>Staff</PageTitle>
<SortableTable :headers="headers" :items="staff?.result">
<!-- todo avatar -->
<template #item_pic="{ item }">pic {{ item.name }}</template>
<template #item_pic="{ item }"><UserAvatar :username="item.name" size="xs"></UserAvatar></template>
<template #item_joinDate="{ item }">{{ i18n.d(item.joinDate, "date") }}</template>
</SortableTable>
</template>