some minor things

This commit is contained in:
MiniDigger | Martin 2022-04-08 19:49:55 +02:00
parent 3db8c9e847
commit 3c86526f30
6 changed files with 10 additions and 6 deletions

View File

@ -20,7 +20,7 @@ const paddingClass = computed(() => {
switch (props.size) {
default:
case "small": {
return "p-1 space-x-0.7";
return "p-1 px-2 space-x-0.7";
}
case "medium": {
return "p-2 space-x-0.7";

View File

@ -9,7 +9,7 @@ const props = withDefaults(
name?: string;
buttonSize?: "small" | "medium" | "large";
buttonType?: "primary" | "gray" | "red" | "transparent";
buttonArrow: boolean;
buttonArrow?: boolean;
}>(),
{
name: "Dropdown",

View File

@ -61,7 +61,7 @@ const publicHost = import.meta.env.HANGAR_PUBLIC_HOST;
</table>
</template>
<template #footer>
<DropdownButton v-if="hasPerms(NamedPermission.IS_STAFF)" :name="i18n.t('project.actions.adminActions')">
<DropdownButton v-if="hasPerms(NamedPermission.IS_STAFF)" :name="i18n.t('project.actions.adminActions')" class="mb-2">
<DropdownItem :to="`/${slug}/flags`">
{{ i18n.t("project.actions.flagHistory", [project.info.flagCount]) }}
</DropdownItem>

View File

@ -326,7 +326,7 @@ useHead(
</template>
</Tabs>
</Card>
<MemberList :model-value="project.members" :author="project.owner.name" :slug="project.name" class="basis-full md:basis-3/12" />
<MemberList :model-value="project.members" :author="project.owner.name" :slug="project.name" class="basis-full md:basis-3/12 h-max" />
</div>
</template>

View File

@ -28,6 +28,7 @@ const name = ref<string>("");
const members = ref<JoinableMember[]>([]);
const nameErrorMessages = ref<string[]>([]);
// TODO validation
/*const canCreate = computed<boolean>(
() =>
this.validForm &&
@ -68,9 +69,9 @@ async function create() {
<template v-if="currentUser.headerData.organizationCount < backendData.validations.maxOrgCount">
<InputText v-model="name" class="mt-2" :label="i18n.t('organization.new.name')" :error-messages="nameErrorMessages" />
<MemberList v-model="members" organization disable-saving class="mt-2"></MemberList>
<MemberList v-model="members" :author="name" organization disable-saving class="mt-4 shadow-0"></MemberList>
<Button class="mt-2" @click="create">
<Button class="mt-4" @click="create">
<IconMdiCheck class="float-left" />
{{ i18n.t("form.memberList.create") }}
</Button>

View File

@ -96,6 +96,9 @@ public class OrganizationController extends HangarComponent {
@PostMapping(path = "/org/{name}/members/add", consumes = MediaType.APPLICATION_JSON_VALUE)
public void addProjectMember(@PathVariable String name, @Valid @RequestBody EditMembersForm.Member<OrganizationRole> member) {
OrganizationTable organizationTable = organizationService.getOrganizationTable(name);
if (organizationTable == null) {
throw new HangarApiException("Org " + name + " doesn't exist");
}
inviteService.sendInvite(member, organizationTable);
}