feat: compact mode for team component
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<SmartModal
|
<SmartModal
|
||||||
v-if="show"
|
v-if="show"
|
||||||
:title="$t('team.title')"
|
:title="$t('team.select_a_team')"
|
||||||
@close="$emit('hide-modal')"
|
@close="$emit('hide-modal')"
|
||||||
>
|
>
|
||||||
<template #body>
|
<template #body>
|
||||||
|
|||||||
@@ -1,8 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="border border-dividerLight rounded flex flex-col flex-1">
|
<div class="border border-divider rounded flex flex-col flex-1">
|
||||||
<div class="flex flex-1 items-start">
|
<div
|
||||||
|
class="flex flex-1 items-start"
|
||||||
|
:class="{
|
||||||
|
'cursor-pointer hover:bg-primaryDark transition hover:border-dividerDark focus-visible:border-dividerDark':
|
||||||
|
compact && team.myRole === 'OWNER',
|
||||||
|
}"
|
||||||
|
@click="compact && team.myRole === 'OWNER' ? $emit('invite-team') : ''"
|
||||||
|
>
|
||||||
<div class="p-4">
|
<div class="p-4">
|
||||||
<label class="font-semibold text-secondaryDark">
|
<label
|
||||||
|
class="font-semibold text-secondaryDark"
|
||||||
|
:class="{ 'cursor-pointer': compact && team.myRole === 'OWNER' }"
|
||||||
|
>
|
||||||
{{ team.name || $t("state.nothing_found") }}
|
{{ team.name || $t("state.nothing_found") }}
|
||||||
</label>
|
</label>
|
||||||
<div class="flex -space-x-1 mt-2 overflow-hidden">
|
<div class="flex -space-x-1 mt-2 overflow-hidden">
|
||||||
@@ -18,11 +28,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex items-center justify-between">
|
<div v-if="!compact" class="flex items-center justify-between">
|
||||||
<span>
|
<span>
|
||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-if="team.myRole === 'OWNER'"
|
v-if="team.myRole === 'OWNER'"
|
||||||
svg="edit"
|
svg="edit"
|
||||||
|
class="rounded-none"
|
||||||
:label="$t('action.edit').toString()"
|
:label="$t('action.edit').toString()"
|
||||||
@click.native="
|
@click.native="
|
||||||
() => {
|
() => {
|
||||||
@@ -33,6 +44,7 @@
|
|||||||
<ButtonSecondary
|
<ButtonSecondary
|
||||||
v-if="team.myRole === 'OWNER'"
|
v-if="team.myRole === 'OWNER'"
|
||||||
svg="user-plus"
|
svg="user-plus"
|
||||||
|
class="rounded-none"
|
||||||
:label="$t('team.invite')"
|
:label="$t('team.invite')"
|
||||||
@click.native="
|
@click.native="
|
||||||
() => {
|
() => {
|
||||||
@@ -113,6 +125,7 @@ const props = defineProps<{
|
|||||||
}>
|
}>
|
||||||
}
|
}
|
||||||
teamID: string
|
teamID: string
|
||||||
|
compact: boolean
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|||||||
@@ -42,6 +42,7 @@
|
|||||||
:key="`team-${String(index)}`"
|
:key="`team-${String(index)}`"
|
||||||
:team-i-d="team.id"
|
:team-i-d="team.id"
|
||||||
:team="team"
|
:team="team"
|
||||||
|
:compact="modal"
|
||||||
@edit-team="editTeam(team, team.id)"
|
@edit-team="editTeam(team, team.id)"
|
||||||
@invite-team="inviteTeam(team, team.id)"
|
@invite-team="inviteTeam(team, team.id)"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -474,6 +474,7 @@
|
|||||||
"invalid_email_format": "Email format is invalid",
|
"invalid_email_format": "Email format is invalid",
|
||||||
"invalid_member_permission": "Please provide a valid permission to the team member",
|
"invalid_member_permission": "Please provide a valid permission to the team member",
|
||||||
"invite": "Invite",
|
"invite": "Invite",
|
||||||
|
"select_a_team": "Select a team",
|
||||||
"invite_tooltip": "Invite people to this workspace",
|
"invite_tooltip": "Invite people to this workspace",
|
||||||
"invited_to_team": "{owner} invited you to join {team}",
|
"invited_to_team": "{owner} invited you to join {team}",
|
||||||
"join_beta": "Join the beta program to access teams.",
|
"join_beta": "Join the beta program to access teams.",
|
||||||
|
|||||||
Reference in New Issue
Block a user