Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/components/community/modules/BaseModelGrid.vue
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,15 @@
}

:deep(.n-scrollbar-rail) {
position: fixed;
/* position: fixed; */
}

:deep(.n-scrollbar > .n-scrollbar-rail.n-scrollbar-rail--vertical--right),
:deep(.n-scrollbar + .n-scrollbar-rail.n-scrollbar-rail--vertical--right) {
right: 20px !important;
top: 120px !important;
bottom: 60px !important;
right: 0px !important;
top: 0px !important;
bottom: 0px !important;
z-index: 1000;
}

/* :deep(.v-vl:not(.v-vl--show-scrollbar)) {
Expand Down
61 changes: 60 additions & 1 deletion src/components/community/modules/ModelCard.vue

Large diffs are not rendered by default.

31 changes: 28 additions & 3 deletions src/components/community/modules/ModelFilterBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,19 @@
model_types: [],
base_models: [],
keyword: '',
sort: 'Recently',
sort: props.page === 'quickStart' ? 'Auto' : 'Recently',
is_user_cleared: false
}
}
store[props.page].filterState.sort = props.page === 'quickStart' ? 'Auto' : 'Recently'
// 如果状态已存在,但 quickStart 页仍是默认的 'Recently',将其调整为 'Auto'(不覆盖用户后续选择)
// if (
// props.page === 'quickStart' &&
// store[props.page].filterState &&
// store[props.page].filterState.sort === 'Recently'
// ) {
// store[props.page].filterState.sort = 'Auto'
// }
if (props.page === 'mainContent') {
if (store[props.page].filterState.selected_model_types.length === 0) {
store[props.page].filterState.model_types = store.modelTypes
Expand All @@ -137,6 +146,8 @@

const getSortLabel = (sort: SortValue) => {
switch (sort) {
case 'Auto':
return t('community.filter.sort.options.auto')
case 'Recently':
return t('community.filter.sort.options.recently')
case 'Most Forked':
Expand Down Expand Up @@ -234,6 +245,20 @@
<Command>
<CommandList>
<CommandGroup>
<CommandItem
v-if="props.page === 'quickStart'"
value="Auto"
:class="[
'px-2 py-1.5 text-[#F9FAFB] cursor-pointer',
'[&:hover]:!bg-[#8B5CF6] [&:hover]:!text-[#F9FAFB]',
store[props.page].filterState.sort === 'Auto'
? '!bg-[#6D28D9] !text-[#F9FAFB]'
: ''
]"
@click="handleSortChange('Auto')"
>
{{ t('community.filter.sort.options.auto') }}
</CommandItem>
<CommandItem
value="recently"
:class="[
Expand Down Expand Up @@ -399,8 +424,8 @@
? 'bg-[#6D28D9] hover:!bg-[#8B5CF6]'
: 'bg-[#4E4E4E] hover:!bg-[#5D5D5D]'
]"
@click="handleHasDraftChange(true)"
variant="secondary"
@click="handleHasDraftChange(true)"
>
{{ t('community.modelCard.tooltips.verified') }}
</Badge>
Expand All @@ -411,8 +436,8 @@
? 'bg-[#6D28D9] hover:!bg-[#8B5CF6]'
: 'bg-[#4E4E4E] hover:!bg-[#5D5D5D]'
]"
@click="handleHasDraftChange(false)"
variant="secondary"
@click="handleHasDraftChange(false)"
>
{{ t('community.modelCard.tooltips.unverified') }}
</Badge>
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
"downloads": "Downloads",
"most-used": "Most Used",
"most-liked": "Most Liked",
"most-forked": "Most Forked"
"most-forked": "Most Forked",
"auto": "Recommended"
}
},
"type": {
Expand Down
3 changes: 2 additions & 1 deletion src/locales/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@
"downloads": "最多下载",
"most-used": "最多使用",
"most-liked": "最多点赞",
"most-forked": "最多收藏"
"most-forked": "最多收藏",
"auto": "推荐"
}
},
"type": {
Expand Down
2 changes: 1 addition & 1 deletion src/types/model.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export type ModeType = 'my' | 'my_fork' | 'publicity' | 'official'

export type ModeTabType = 'community' | 'posts' | 'forked'

export type SortValue = 'Recently' | 'Most Forked' | 'Most Used' | 'Most Downloaded' | 'Most Liked'
export type SortValue = 'Recently' | 'Most Forked' | 'Most Used' | 'Most Downloaded' | 'Most Liked' | 'Auto'

export interface Model {
id: string
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.49
1.2.50