refactor(import): 移除旧预设兼容层
This commit is contained in:
1 file changed
-23
@@ -102,26 +102,3 @@ export function isProviderPresetID(value: unknown): value is ProviderPresetID {
|
||||
export function findProviderPreset(id: ProviderPresetID): RegisteredProviderPreset | undefined {
|
||||
return providerPresetRegistry.find((preset) => preset.id === id)
|
||||
}
|
||||
|
||||
// Temporary compatibility for the legacy stepped components removed by Task 6.
|
||||
export interface ChannelPreset {
|
||||
id: ProviderPresetID
|
||||
labelKey: string
|
||||
upstream_url: string
|
||||
protocols: readonly GroupProtocol[]
|
||||
}
|
||||
|
||||
export const channelPresets: readonly ChannelPreset[] = [
|
||||
...providerPresetRegistry.map((preset) => ({
|
||||
id: preset.id,
|
||||
labelKey: preset.nameKey,
|
||||
upstream_url: preset.upstream_url,
|
||||
protocols: preset.protocols,
|
||||
})),
|
||||
{
|
||||
id: 'custom',
|
||||
labelKey: 'import.presets.custom.name',
|
||||
upstream_url: '',
|
||||
protocols: [],
|
||||
},
|
||||
]
|
||||
Reference in new issue
Block a user