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
4 changes: 1 addition & 3 deletions app/components/PackageListToolbar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ const availableSortKeys = computed(() => {
return SORT_KEYS.filter(k => !k.searchOnly || k.key === 'relevance').map(k =>
Object.assign({}, k, {
disabled: k.key !== 'relevance',
disabledReason: k.key !== 'relevance' ? 'Coming soon' : undefined,
}),
)
}
Expand Down Expand Up @@ -162,8 +161,7 @@ function getSortKeyLabelKey(key: SortKey): string {
:value="keyConfig.key"
:disabled="keyConfig.disabled"
>
{{ $t(getSortKeyLabelKey(keyConfig.key))
}}{{ keyConfig.disabled ? ` (${$t('filters.columns.coming_soon')})` : '' }}
{{ $t(getSortKeyLabelKey(keyConfig.key)) }}
</option>
</select>
<div
Expand Down
16 changes: 0 additions & 16 deletions shared/types/preferences.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ export interface ColumnConfig {
width?: string
/** Whether the column is disabled (not yet available) */
disabled?: boolean
/** Reason for being disabled, shown in UI */
disabledReason?: string
}

// Default column configuration
Expand All @@ -55,7 +53,6 @@ export const DEFAULT_COLUMNS: ColumnConfig[] = [
sortable: true,
width: '100px',
disabled: true,
disabledReason: 'Coming soon',
},
{
id: 'popularityScore',
Expand All @@ -64,7 +61,6 @@ export const DEFAULT_COLUMNS: ColumnConfig[] = [
sortable: true,
width: '100px',
disabled: true,
disabledReason: 'Coming soon',
},
{
id: 'maintenanceScore',
Expand All @@ -73,7 +69,6 @@ export const DEFAULT_COLUMNS: ColumnConfig[] = [
sortable: true,
width: '100px',
disabled: true,
disabledReason: 'Coming soon',
},
{
id: 'combinedScore',
Expand All @@ -82,7 +77,6 @@ export const DEFAULT_COLUMNS: ColumnConfig[] = [
sortable: true,
width: '100px',
disabled: true,
disabledReason: 'Coming soon',
},
{
id: 'security',
Expand All @@ -91,7 +85,6 @@ export const DEFAULT_COLUMNS: ColumnConfig[] = [
sortable: false,
width: '80px',
disabled: true,
disabledReason: 'Coming soon',
},
]

Expand Down Expand Up @@ -143,8 +136,6 @@ export interface SortKeyConfig {
defaultDirection: SortDirection
/** Whether the sort option is disabled (not yet available) */
disabled?: boolean
/** Reason for being disabled, shown in UI */
disabledReason?: string
/** Only show this sort option in search context */
searchOnly?: boolean
}
Expand All @@ -157,21 +148,18 @@ export const SORT_KEYS: SortKeyConfig[] = [
label: 'Downloads/day',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
{
key: 'downloads-month',
label: 'Downloads/mo',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
{
key: 'downloads-year',
label: 'Downloads/yr',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
{ key: 'updated', label: 'Updated', defaultDirection: 'desc' },
{ key: 'name', label: 'Name', defaultDirection: 'asc' },
Expand All @@ -180,28 +168,24 @@ export const SORT_KEYS: SortKeyConfig[] = [
label: 'Quality',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
{
key: 'popularity',
label: 'Popularity',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
{
key: 'maintenance',
label: 'Maintenance',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
{
key: 'score',
label: 'Score',
defaultDirection: 'desc',
disabled: true,
disabledReason: 'Coming soon',
},
]

Expand Down
Loading