small fixes (#680)

This commit is contained in:
Jake Potrebic 2022-06-17 14:00:15 -07:00 committed by GitHub
parent 1f44a94dcf
commit 4ff62c84a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 7 deletions

View File

@ -8,14 +8,16 @@ const props = withDefaults(
defineProps<{
name?: string;
buttonSize?: "small" | "medium" | "large";
buttonType?: "primary" | "gray" | "red" | "transparent";
buttonType?: "primary" | "red" | "transparent";
buttonArrow?: boolean;
menuPosition?: string;
}>(),
{
name: "Dropdown",
buttonSize: "medium",
buttonType: "primary",
buttonArrow: true,
menuPosition: "",
}
);
</script>
@ -34,7 +36,7 @@ const props = withDefaults(
</template>
</Button>
</MenuButton>
<MenuItems class="absolute flex flex-col mt-1 z-10 py-1 rounded border-t-2 border-primary-400 background-default shadow-lg">
<MenuItems :class="`absolute flex flex-col mt-1 z-10 py-1 rounded border-t-2 border-primary-400 background-default shadow-lg ${props.menuPosition}`">
<slot></slot>
</MenuItems>
</div>

View File

@ -148,7 +148,7 @@ interface EditableMember {
<div v-if="canEdit" class="items-center inline-flex mt-3 w-full">
<!-- todo fancy search completion -->
<InputText v-model="search" :label="i18n.t('form.memberList.addUser')" :error-messages="addErrors" />
<DropdownButton :name="i18n.t('general.add')" class="ml-2">
<DropdownButton :name="i18n.t('general.add')" class="ml-2 relative" menu-position="right-0">
<template #button-label>
<IconMdiAccountPlus class="ml-1" />
</template>

View File

@ -45,7 +45,7 @@ const { v, errors, hasError } = useValidation(props.label, props.rules, internal
<template>
<InputWrapper v-slot="slotProps" :errors="errors" :has-error="hasError" :loading="loading || v.$pending" :label="label" :value="internalVal">
<select v-model="internalVal" :disabled="disabled" :class="slotProps.class" @blur="v.$touch()">
<select v-model="internalVal" :disabled="disabled" :class="slotProps.class" class="appearance-none" @blur="v.$touch()">
<option v-for="val in values" :key="val[itemValue] || val" :value="val[itemValue] || val" class="dark:bg-[#191e28]">
{{ val[itemText] || val }}
</option>

View File

@ -59,7 +59,7 @@ class Auth {
const response = await useAxios.get("/refresh", { headers });
if (import.meta.env.SSR) {
if (response.headers["set-cookie"]) {
useResponse()?.setHeader("set-cookie", response.headers["set-cookie"]!);
useResponse()?.setHeader("set-cookie", response.headers["set-cookie"]);
const token = new Cookies(response.headers["set-cookie"]?.join("; ")).get("HangarAuth");
if (token) {
authLog("got token");
@ -78,7 +78,7 @@ class Auth {
}
this.refreshPromise = null;
} catch (e) {
const { trace, ...err } = (e as AxiosError).response?.data as object;
const { trace, ...err } = (e as AxiosError).response?.data as { trace: any };
authLog("Refresh failed", err);
resolve(false);
this.refreshPromise = null;

View File

@ -92,7 +92,7 @@ useHead(useSeo(props.project.name, props.project.description, route, projectIcon
</ul>
</Card>
<ProjectPageList :project="project" :open="open" />
<MemberList :members="project.members" :author="project.owner.name" :slug="project.name" />
<MemberList :members="project.members" :author="project.owner.name" :slug="project.name" class="overflow-visible" />
</section>
</div>
</template>