mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-12-15 06:41:46 +08:00
small fixes (#680)
This commit is contained in:
parent
1f44a94dcf
commit
4ff62c84a3
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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;
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user