remove sign up prompts
This commit is contained in:
parent
77d33c185b
commit
70182d8bb7
10 changed files with 31 additions and 138 deletions
|
|
@ -28,18 +28,13 @@ export function isReady(provider: WeatherProvider): boolean {
|
|||
return provider.envKey === null || Boolean(process.env[provider.envKey]?.trim());
|
||||
}
|
||||
|
||||
/** Provider list for the browser — readiness and limits only, never the keys.
|
||||
* Ready sources lead so the picker starts with working options out of the box. */
|
||||
/** Configured providers available to the browser — never exposes keys or unconfigured sources. */
|
||||
export function listProviders(): ProviderInfo[] {
|
||||
const all = DISPLAY_ORDER.map((id) => {
|
||||
const provider = PROVIDERS[id];
|
||||
return {
|
||||
id,
|
||||
return DISPLAY_ORDER.map((id) => PROVIDERS[id])
|
||||
.filter(isReady)
|
||||
.map((provider) => ({
|
||||
id: provider.id,
|
||||
label: provider.label,
|
||||
ready: isReady(provider),
|
||||
signupUrl: provider.signupUrl,
|
||||
...provider.limits(),
|
||||
};
|
||||
});
|
||||
return [...all.filter((p) => p.ready), ...all.filter((p) => !p.ready)];
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue