Skip to content

Commit 2c43cac

Browse files
youngbeom-shin申永范-UX
andauthored
feat(organization): add new creation options (#1398)
* feat(organization): add new creation options * feat(organization): add new creation options * feat(OrganizationDetail): add initiator prop to ProfileRepoList - Pass initiator prop to ProfileRepoList - Set initiator to "organization" --------- Co-authored-by: 申永范-UX <[email protected]>
1 parent e9bf99a commit 2c43cac

File tree

5 files changed

+58
-26
lines changed

5 files changed

+58
-26
lines changed

frontend/src/components/organizations/OrganizationDetail.vue

Lines changed: 28 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,41 +24,46 @@
2424
</div>
2525
</template>
2626
<div>
27-
<a :href="`/models/new?orgName=${organizationData.name}`" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-[9px] px-[10px]">
28-
29-
<div class="px-2 py-2 bg-gray-50">
30-
<SvgIcon name="models" />
31-
</div>
27+
<a :href="`/models/new?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
28+
<SvgIcon name="navbar-new" />
3229
<div class="text-sm leading-[20px] text-gray-700">
33-
<div>{{ $t('models.title') }}</div>
34-
<div class="font-light">{{ $t('models.tips') }}</div>
30+
<div>{{ $t('organization.new.model') }}</div>
3531
</div>
3632
</a>
37-
<a :href="`/datasets/new?orgName=${organizationData.name}`" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-[9px] px-[10px]">
38-
<div class="px-2 py-2 bg-gray-50">
39-
<SvgIcon name="datasets" />
33+
<a :href="`/datasets/new?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
34+
<SvgIcon name="navbar-new" />
35+
<div class="text-sm leading-[20px] text-gray-700">
36+
<div>{{ $t('organization.new.dataset') }}</div>
4037
</div>
38+
</a>
39+
<a :href="`/spaces/new?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
40+
<SvgIcon name="navbar-new" />
4141
<div class="text-sm leading-[20px] text-gray-700">
42-
<div>{{ $t('datasets.title') }}</div>
43-
<div class="font-light">{{ $t('datasets.tips') }}</div>
42+
<div>{{ $t('organization.new.space') }}</div>
4443
</div>
4544
</a>
46-
<a :href="`/spaces/new?orgName=${organizationData.name}`" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-[9px] px-[10px]">
47-
<div class="px-2 py-2 bg-gray-50">
48-
<SvgIcon name="spaces" />
45+
<a :href="`/codes/new?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
46+
<SvgIcon name="navbar-new" />
47+
<div class="text-sm leading-[20px] text-gray-700">
48+
<div>{{ $t('organization.new.code') }}</div>
4949
</div>
50+
</a>
51+
<a :href="`/collections/new?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
52+
<SvgIcon name="navbar-new" />
5053
<div class="text-sm leading-[20px] text-gray-700">
51-
<div>{{ $t('spaces.title') }}</div>
52-
<div class="font-light">{{ $t('spaces.tips') }}</div>
54+
<div>{{ $t('organization.new.collection') }}</div>
5355
</div>
5456
</a>
55-
<a :href="`/codes/new?orgName=${organizationData.name}`" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-[9px] px-[10px]">
56-
<div class="px-2 py-2 bg-gray-50">
57-
<SvgIcon name="codes" />
57+
<a :href="`/prompts/library?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
58+
<SvgIcon name="navbar-new" />
59+
<div class="text-sm leading-[20px] text-gray-700">
60+
<div>{{ $t('organization.new.prompt') }}</div>
5861
</div>
62+
</a>
63+
<a :href="`/mcp/servers/new?orgName=${organizationData.name}`" target="_blank" class="hover:bg-gray-50 cursor-pointer flex gap-2 items-center py-3 px-2 rounded-md">
64+
<SvgIcon name="navbar-new" />
5965
<div class="text-sm leading-[20px] text-gray-700">
60-
<div>{{ $t('codes.title') }}</div>
61-
<div class="font-light">{{ $t('codes.tips')}}</div>
66+
<div>{{ $t('organization.new.mcp') }}</div>
6267
</div>
6368
</a>
6469
</div>
@@ -98,7 +103,7 @@
98103
</div>
99104
</div>
100105
<div class="grow px-[20px] py-[36px] sm:py-0">
101-
<ProfileRepoList :name="name" />
106+
<ProfileRepoList :name="name" initiator="organization" />
102107
</div>
103108
</div>
104109
</div>

frontend/src/components/shared/ProfileRepoList.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
:label="`&nbsp;${$t('profile.tabs.codes')}&nbsp;`"
3535
></el-tab-pane>
3636
<el-tab-pane
37-
v-if="initiator === 'profile'"
37+
v-if="initiator === 'profile' || initiator === 'organization'"
3838
name="prompts"
3939
:label="`&nbsp;${$t('profile.tabs.prompts')}&nbsp;`"
4040
></el-tab-pane>
@@ -120,7 +120,7 @@
120120
</div>
121121

122122
<!-- prompts repo -->
123-
<div v-if="(activeTab === '' || activeTab === 'prompts') && initiator === 'profile'" class="mt-8">
123+
<div v-if="(activeTab === '' || activeTab === 'prompts') && (initiator === 'profile' || initiator === 'organization')" class="mt-8">
124124
<h3 class="text-[20px] text-[#344054] flex items-center gap-2">
125125
<SvgIcon name="codes" width="18" height="18" />
126126
<span>{{ $t("organization.prompt") }}</span>
@@ -320,7 +320,7 @@
320320
fetchData(codesUrl, codes, INITIAL_PER_PAGE, 1),
321321
fetchData(mcpsUrl, mcps, INITIAL_PER_PAGE, 1),
322322
]
323-
if (props.initiator === "profile") {
323+
if (props.initiator === "profile" || props.initiator === "organization") {
324324
promises.push(fetchData(promptsUrl, prompts, INITIAL_PER_PAGE, 1))
325325
}
326326
await Promise.all(promises)

frontend/src/locales/en_js/organization.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,13 @@ export const organization = {
5757
deleteOrganizationCancelButton: "Cancel",
5858
deleteOrganizationSuccess: "Organization deleted successfully",
5959
},
60+
new: {
61+
model: "New Model",
62+
dataset: "New Dataset",
63+
space: "New Space",
64+
code: "New Code",
65+
prompt: "New Prompt",
66+
collection: "New Collection",
67+
mcp: "New MCP",
68+
}
6069
}

frontend/src/locales/zh_hant_js/organization.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,13 @@ export const organization = {
7070
deleteOrganizationCancelButton: "取消",
7171
deleteOrganizationSuccess: "組織刪除成功",
7272
},
73+
new: {
74+
model: "新建模型",
75+
dataset: "新建數據集",
76+
space: "新建應用空間",
77+
code: "新建代碼倉庫",
78+
prompt: "新建提示詞庫",
79+
collection: "新建合集",
80+
mcp: "新建MCP",
81+
}
7382
}

frontend/src/locales/zh_js/organization.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,13 @@ export const organization = {
5757
deleteOrganizationCancelButton: "取消",
5858
deleteOrganizationSuccess: "组织删除成功",
5959
},
60+
new: {
61+
model: "新建模型",
62+
dataset: "新建数据集",
63+
space: "新建应用空间",
64+
code: "新建代码仓库",
65+
prompt: "新建提示词库",
66+
collection: "新建合集",
67+
mcp: "新建MCP",
68+
}
6069
}

0 commit comments

Comments
 (0)