Skip to content

Commit

Permalink
remove public tag when repo not private
Browse files Browse the repository at this point in the history
  • Loading branch information
youngbeom-shin committed Sep 24, 2024
1 parent 8f881ce commit 0281e64
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
</h3>
<div class="flex gap-2">
<span
v-if="getComputed.visibility"
class="px-[8px] py-[3px] flex items-center justify-center border rounded-md text-[#344054] text-[12px]"
>{{ getComputed.visibility }}</span
>
Expand Down Expand Up @@ -121,7 +122,7 @@
: props.repo.name
const path = props.repo.path.split('/')[0] + '/' + displayName
const visibility = props.repo.private ? t('all.private') : t('all.public')
const visibility = props.repo.private ? t('all.private') : ''
let taskTag = (props.repo.tags || []).find((tag) => tag.category === 'task')
if (locale.value === 'en') {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/endpoints/EndpointPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
{{ $t('endpoints.detail.parameters') }}
</p>
<p class="flex items-center gap-[8px] w-[390px] lg:w-[370px] mlg:w-full h-[35px] leading-[18px] text-[#909399] text-xs overflow-hidden text-ellipsis line-clamp-2 text-left">
<div class="border border-[#DCDFE6] px-3 py-[2px] text-center text-xs text-[#606266] font-medium rounded">
{{ private ? $t("all.private") : $t("all.public") }}
<div v-if="private" class="border border-[#DCDFE6] px-3 py-[2px] text-center text-xs text-[#606266] font-medium rounded">
{{ $t("all.private") }}
</div>
<div class="flex gap-[4px]">
<span>{{ $t('endpoints.detail.currentEndpointReplica')}}</span>
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/components/shared/RepoHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
nickname.trim() === '' ? name : nickname
}}</span>
<div
v-if="repoDetailStore.isPrivate"
class="border border-[#DCDFE6] px-3 py-[2px] text-center text-xs text-[#606266] font-medium rounded"
>
{{ repoDetailStore.isPrivate ? $t('all.private') : $t('all.public') }}
{{ $t('all.private') }}
</div>
<div
class="flex cursor-pointer gap-[4px] border border-[#DCDFE6] pl-3 pr-1 py-[2px] text-center text-xs text-[#606266] font-medium rounded hover:bg-gray-50 active:ring-4 active:ring-gray-400 active:ring-opacity-25 active:bg-white"
Expand Down Expand Up @@ -54,9 +55,10 @@
nickname.trim() === '' ? name : nickname
}}</span>
<div
v-if="repoDetailStore.isPrivate"
class="border border-[#DCDFE6] px-3 py-[2px] text-center text-xs text-[#606266] font-medium rounded"
>
{{ repoDetailStore.isPrivate ? $t('all.private') : $t('all.public') }}
{{ $t('all.private') }}
</div>
<AppStatus
v-if="appStatus"
Expand Down Expand Up @@ -100,9 +102,10 @@
nickname.trim() === '' ? name : nickname
}}</span>
<div
v-if="repoDetailStore.isPrivate"
class="border border-[#DCDFE6] px-3 py-[2px] text-center text-xs text-[#606266] font-medium rounded"
>
{{ repoDetailStore.isPrivate ? $t('all.private') : $t('all.public') }}
{{ $t('all.private') }}
</div>
<div
class="flex cursor-pointer gap-[4px] border border-[#DCDFE6] pl-3 pr-1 py-[2px] text-center text-xs text-[#606266] font-medium rounded hover:bg-gray-50 active:ring-4 active:ring-gray-400 active:ring-opacity-25 active:bg-white"
Expand Down
9 changes: 5 additions & 4 deletions frontend/src/components/shared/RepoItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,10 @@
{{$t('all.lastTime')}}:{{ repo.updated_at.substring(0, 10) }}
</div>

<span> <SvgIcon name="vertical_divider" /> </span>

<span class="whitespace-nowrap">{{ getComputed.visibility }}</span>
<template v-if="getComputed.visibility">
<span> <SvgIcon name="vertical_divider" /> </span>
<span class="visibility-label">{{ getComputed.visibility }}</span>
</template>

<span> <SvgIcon name="vertical_divider" /> </span>

Expand Down Expand Up @@ -121,7 +122,7 @@
const displayName = props.repo.nickname !== undefined && props.repo.nickname.trim().length > 0 ? props.repo.nickname : props.repo.name
const path = props.repo.path.split('/')[0] + '/' + displayName
const visibility = props.repo.private ? t('all.private') : t('all.public')
const visibility = props.repo.private ? t('all.private') : ''
const showDescription = props.cardType === 'index' || !!props.repo.description?.trim()
let taskTag = (props.repo.tags || []).find(tag => tag.category === "task")
Expand Down

0 comments on commit 0281e64

Please sign in to comment.