|
|
@ -69,61 +69,74 @@ onMounted(() => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="min-w-2/4 flex-auto"> |
|
|
|
<div class="min-w-2/4 flex-auto"> |
|
|
|
<a-card :loading="isLoading" class="!rounded-lg shadow"> |
|
|
|
<a-card class="transition-all duration-300 ease-out !rounded-lg shadow"> |
|
|
|
<h1 class="text-center text-4xl p-2 nc-project-page-title flex items-center justify-center gap-2 text-gray-600"> |
|
|
|
<h1 class="flex items-center justify-center gap-2 leading-8 mb-8"> |
|
|
|
<!-- My Projects --> |
|
|
|
<!-- My Projects --> |
|
|
|
<b>{{ $t('title.myProject') }}</b> |
|
|
|
<span class="text-4xl">{{ $t('title.myProject') }}</span> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-tooltip title="Reload projects"> |
|
|
|
|
|
|
|
<span |
|
|
|
|
|
|
|
class="transition-all duration-200 h-full flex items-center group hover:ring active:(ring ring-pink-500) rounded-full mt-1" |
|
|
|
|
|
|
|
:class="isLoading ? 'animate-spin ring ring-gray-200' : ''" |
|
|
|
|
|
|
|
> |
|
|
|
<MdiRefresh |
|
|
|
<MdiRefresh |
|
|
|
v-t="['a:project:refresh']" |
|
|
|
v-t="['a:project:refresh']" |
|
|
|
class="text-sm text-gray-500 hover:text-primary mt-1 cursor-pointer" |
|
|
|
class="text-xl text-gray-500 group-hover:text-pink-500 cursor-pointer" |
|
|
|
|
|
|
|
:class="isLoading ? '!text-primary' : ''" |
|
|
|
@click="loadProjects" |
|
|
|
@click="loadProjects" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</a-tooltip> |
|
|
|
</h1> |
|
|
|
</h1> |
|
|
|
|
|
|
|
|
|
|
|
<div class="order-1 flex mb-6"> |
|
|
|
<div class="order-1 flex mb-6"> |
|
|
|
<a-input-search |
|
|
|
<a-input-search |
|
|
|
v-model:value="filterQuery" |
|
|
|
v-model:value="filterQuery" |
|
|
|
class="max-w-[200px] nc-project-page-search" |
|
|
|
class="max-w-[250px] nc-project-page-search rounded" |
|
|
|
:placeholder="$t('activity.searchProject')" |
|
|
|
:placeholder="$t('activity.searchProject')" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex-grow" /> |
|
|
|
<div class="flex-grow" /> |
|
|
|
|
|
|
|
|
|
|
|
<a-dropdown v-if="isUIAllowed('projectCreate', true)" @click.stop> |
|
|
|
<a-dropdown v-if="isUIAllowed('projectCreate', true)" :trigger="['click']"> |
|
|
|
<a-button class="nc-new-project-menu !shadow"> |
|
|
|
<button class="nc-new-project-menu"> |
|
|
|
<div class="flex align-center"> |
|
|
|
<div class="flex items-center w-full"> |
|
|
|
{{ $t('title.newProj') }} |
|
|
|
{{ $t('title.newProj') }} |
|
|
|
<MdiMenuDown class="menu-icon" /> |
|
|
|
<MdiMenuDown class="menu-icon" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-button> |
|
|
|
</button> |
|
|
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<a-menu> |
|
|
|
<a-menu> |
|
|
|
|
|
|
|
<a-menu-item> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-t="['c:project:create:xcdb']" |
|
|
|
v-t="['c:project:create:xcdb']" |
|
|
|
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2 nc-create-xc-db-project" |
|
|
|
class="nc-project-menu-item gap-4" |
|
|
|
@click="navigateTo('/project/create')" |
|
|
|
@click="navigateTo('/project/create')" |
|
|
|
> |
|
|
|
> |
|
|
|
<MdiPlus class="col-span-2 mr-1 mt-[1px] text-primary text-lg" /> |
|
|
|
<MdiPlusOutline class="text-lg" /> |
|
|
|
|
|
|
|
|
|
|
|
<div class="col-span-10 text-sm xl:text-md">{{ $t('activity.createProject') }}</div> |
|
|
|
<div>{{ $t('activity.createProject') }}</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</a-menu-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-menu-item> |
|
|
|
<div |
|
|
|
<div |
|
|
|
v-t="['c:project:create:extdb']" |
|
|
|
v-t="['c:project:create:extdb']" |
|
|
|
class="grid grid-cols-12 cursor-pointer hover:bg-gray-200 flex items-center p-2 nc-create-external-db-project" |
|
|
|
class="nc-project-menu-item gap-4" |
|
|
|
@click="navigateTo('/project/create-external')" |
|
|
|
@click="navigateTo('/project/create-external')" |
|
|
|
> |
|
|
|
> |
|
|
|
<MdiDatabaseOutline class="col-span-2 mr-1 mt-[1px] text-green-500 text-lg" /> |
|
|
|
<MdiDatabaseOutline class="text-lg" /> |
|
|
|
|
|
|
|
|
|
|
|
<div class="col-span-10 text-sm xl:text-md" v-html="$t('activity.createProjectExtended.extDB')" /> |
|
|
|
<div v-html="$t('activity.createProjectExtended.extDB')" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
</a-menu-item> |
|
|
|
</a-menu> |
|
|
|
</a-menu> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</a-dropdown> |
|
|
|
</a-dropdown> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<TransitionGroup name="layout" mode="out-in"> |
|
|
|
<div v-if="isLoading"> |
|
|
|
<div v-if="isLoading"> |
|
|
|
<a-skeleton /> |
|
|
|
<a-skeleton /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -136,6 +149,7 @@ onMounted(() => { |
|
|
|
$e('a:project:open') |
|
|
|
$e('a:project:open') |
|
|
|
navigateTo(`/nc/${record.id}`) |
|
|
|
navigateTo(`/nc/${record.id}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
class: ['group'], |
|
|
|
}) |
|
|
|
}) |
|
|
|
" |
|
|
|
" |
|
|
|
:data-source="filteredProjects" |
|
|
|
:data-source="filteredProjects" |
|
|
@ -145,27 +159,29 @@ onMounted(() => { |
|
|
|
<a-table-column key="title" :title="$t('general.title')" data-index="title"> |
|
|
|
<a-table-column key="title" :title="$t('general.title')" data-index="title"> |
|
|
|
<template #default="{ text }"> |
|
|
|
<template #default="{ text }"> |
|
|
|
<div |
|
|
|
<div |
|
|
|
class="capitalize !w-[400px] overflow-hidden overflow-ellipsis whitespace-nowrap nc-project-row" |
|
|
|
class="capitalize color-transition group-hover:text-pink-500 !w-[400px] overflow-hidden overflow-ellipsis whitespace-nowrap" |
|
|
|
:title="text" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
{{ text }} |
|
|
|
{{ text }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</a-table-column> |
|
|
|
</a-table-column> |
|
|
|
<!-- Actions --> |
|
|
|
<!-- Actions --> |
|
|
|
|
|
|
|
|
|
|
|
<a-table-column key="id" :title="$t('labels.actions')" data-index="id"> |
|
|
|
<a-table-column key="id" :title="$t('labels.actions')" data-index="id"> |
|
|
|
<template #default="{ text, record }"> |
|
|
|
<template #default="{ text, record }"> |
|
|
|
<div class="flex align-center"> |
|
|
|
<div class="flex items-center gap-2"> |
|
|
|
<MdiEditOutline |
|
|
|
<MdiEditOutline |
|
|
|
v-t="['c:project:edit:rename']" |
|
|
|
v-t="['c:project:edit:rename']" |
|
|
|
class="nc-action-btn" |
|
|
|
class="nc-action-btn" |
|
|
|
@click.stop="navigateTo(`/project/${text}`)" |
|
|
|
@click.stop="navigateTo(`/project/${text}`)" |
|
|
|
/> |
|
|
|
/> |
|
|
|
|
|
|
|
|
|
|
|
<MdiDeleteOutline class="nc-action-btn" @click.stop="deleteProject(record)" /> |
|
|
|
<MdiDeleteOutline class="nc-action-btn" @click.stop="deleteProject(record)" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</a-table-column> |
|
|
|
</a-table-column> |
|
|
|
</a-table> |
|
|
|
</a-table> |
|
|
|
|
|
|
|
</TransitionGroup> |
|
|
|
</a-card> |
|
|
|
</a-card> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -182,7 +198,25 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
|
|
|
<style scoped> |
|
|
|
<style scoped> |
|
|
|
.nc-action-btn { |
|
|
|
.nc-action-btn { |
|
|
|
@apply text-gray-500 hover:text-primary mr-2 cursor-pointer p-2 w-[30px] h-[30px] hover:bg-gray-300/50 rounded-full; |
|
|
|
@apply text-gray-500 hover:(text-pink-500 ring) active:(ring ring-pink-500) cursor-pointer p-2 w-[30px] h-[30px] hover:bg-gray-300/50 rounded-full; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.nc-new-project-menu { |
|
|
|
|
|
|
|
@apply cursor-pointer z-1 relative color-transition rounded-md px-3 py-2 text-white; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&::after { |
|
|
|
|
|
|
|
@apply rounded-md absolute top-0 left-0 right-0 bottom-0 transition-all duration-150 ease-in-out bg-primary; |
|
|
|
|
|
|
|
content: ''; |
|
|
|
|
|
|
|
z-index: -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&:hover::after { |
|
|
|
|
|
|
|
@apply transform scale-110 ring ring-pink-500; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
&:active::after { |
|
|
|
|
|
|
|
@apply ring ring-pink-500; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.ant-table-cell) { |
|
|
|
:deep(.ant-table-cell) { |
|
|
|