mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
add org creation page
This commit is contained in:
parent
98aa4a358e
commit
9c88658f11
@ -19,5 +19,6 @@ module.exports = {
|
||||
allowModifiers: true,
|
||||
},
|
||||
],
|
||||
'vue/valid-template-root': 'off', // dum false positive
|
||||
},
|
||||
};
|
||||
|
@ -60,4 +60,8 @@ export default class UserAvatar extends Vue {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.user-avatar-xs {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
}
|
||||
</style>
|
||||
|
35
frontend/components/UserSelectionForm.vue
Normal file
35
frontend/components/UserSelectionForm.vue
Normal file
@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-list>
|
||||
<v-list-item v-for="user in users" :key="user.id">
|
||||
<UserAvatar :username="user.name" :avatar-url="$util.avatarUrl(user.name)" clazz="user-avatar-xs" />
|
||||
{{ user.name }}
|
||||
ROLE HERE
|
||||
<!-- todo role -->
|
||||
</v-list-item>
|
||||
<v-divider />
|
||||
<v-list-item>
|
||||
<!-- todo auto suggest users here -->
|
||||
<v-text-field :label="$t('form.userSelection.addUser')"></v-text-field>
|
||||
</v-list-item>
|
||||
<v-divider />
|
||||
</v-list>
|
||||
<v-btn>{{ $t('form.userSelection.create') }}</v-btn>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'nuxt-property-decorator';
|
||||
import { User } from 'hangar-api';
|
||||
import UserAvatar from '~/components/UserAvatar.vue';
|
||||
|
||||
// TODO v-model for users
|
||||
@Component({
|
||||
components: { UserAvatar },
|
||||
})
|
||||
export default class UserSelectionForm extends Vue {
|
||||
users: Array<User> = [{ id: 1, name: 'Test' }];
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
@ -120,6 +120,19 @@ const msgs: LocaleMessageObject = {
|
||||
},
|
||||
sendForApproval: 'Send for approval',
|
||||
},
|
||||
organization: {
|
||||
new: {
|
||||
title: 'Create a new Organization',
|
||||
text: 'Organizations allow you group users provide closer collaboration between them within your projects on Hangar.',
|
||||
name: 'Organization Name',
|
||||
},
|
||||
},
|
||||
form: {
|
||||
userSelection: {
|
||||
addUser: 'Add User...',
|
||||
create: 'Create',
|
||||
},
|
||||
},
|
||||
visibility: {
|
||||
notice: {
|
||||
needsChanges: 'This project requires changes: {0}',
|
||||
|
@ -1,13 +1,21 @@
|
||||
<template>
|
||||
<div>{{ $nuxt.$route.name }}</div>
|
||||
<v-card>
|
||||
<v-card-title v-text="$t('organization.new.title')" />
|
||||
<v-card-text v-text="$t('organization.new.text')" />
|
||||
<v-text-field type="text" :label="$t('organization.new.name')"></v-text-field>
|
||||
<v-divider />
|
||||
<UserSelectionForm />
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from 'nuxt-property-decorator';
|
||||
import UserSelectionForm from '~/components/UserSelectionForm.vue';
|
||||
|
||||
// TODO implement OrganizationsNewPage
|
||||
|
||||
@Component
|
||||
@Component({
|
||||
components: { UserSelectionForm },
|
||||
})
|
||||
export default class OrganizationsNewPage extends Vue {}
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user