mirror of
https://github.com/OpenSquawk/OpenSquawk
synced 2026-08-04 16:22:48 +08:00
Add premium API roadmap item and sort roadmap by votes
This commit is contained in:
@@ -41,6 +41,17 @@ export default defineEventHandler(async () => {
|
||||
scorePercent,
|
||||
lastVoteAt: stat?.lastVoteAt ? stat.lastVoteAt.toISOString() : null,
|
||||
}
|
||||
}).sort((a, b) => {
|
||||
const voteDelta = (b.votes ?? 0) - (a.votes ?? 0)
|
||||
if (voteDelta !== 0) {
|
||||
return voteDelta
|
||||
}
|
||||
const avgA = a.averageImportance ?? 0
|
||||
const avgB = b.averageImportance ?? 0
|
||||
if (avgB !== avgA) {
|
||||
return avgB - avgA
|
||||
}
|
||||
return a.title.localeCompare(b.title)
|
||||
})
|
||||
|
||||
const totalVotes = items.reduce((acc, item) => acc + item.votes, 0)
|
||||
|
||||
@@ -63,6 +63,14 @@ export const ROADMAP_ITEMS: RoadmapItemDefinition[] = [
|
||||
category: 'Infra',
|
||||
icon: 'mdi-server',
|
||||
},
|
||||
{
|
||||
key: 'premium-api-access',
|
||||
title: 'Premium-Zugriff auf schnelle APIs',
|
||||
description:
|
||||
'Optionale Monatsabos für performantere Speech- & Sim-APIs mit priorisierten Kontingenten zu niedrigen Beträgen.',
|
||||
category: 'Business',
|
||||
icon: 'mdi-credit-card-clock',
|
||||
},
|
||||
{
|
||||
key: 'multi-voice',
|
||||
title: 'Mehrere ATC-Stimmen',
|
||||
|
||||
Reference in New Issue
Block a user