feat: add backup recommendations and update backup strategy UI

- Introduced new backup recommendations feature with interfaces for recommended storage providers.
- Updated i18n translations for backup strategy to reflect new terminology and improved descriptions.
- Enhanced types with optional private and public keys in user profiles.
- Redesigned backup-related styles for better layout and responsiveness.
- Updated TypeScript configuration to include shared modules.
- Configured Vite to resolve shared modules and allow filesystem access.
- Added cron triggers for periodic tasks in Wrangler configuration.
This commit is contained in:
shuaiplus
2026-03-15 03:34:16 +08:00
parent 51d0e60cf1
commit b1c6ec50da
29 changed files with 5662 additions and 951 deletions
+68
View File
@@ -0,0 +1,68 @@
export interface RecommendedStorageLink {
name: string;
capacity: string;
}
export interface RecommendedProviderBase {
id: 'infinicloud' | 'koofr' | 'pcloud';
name: string;
capacity: string;
protocol: 'webdav' | 's3';
signupUrl: string;
hasAffiliateLink?: boolean;
}
export interface InfinicloudProvider extends RecommendedProviderBase {
id: 'infinicloud';
referralCode: string;
}
export interface KoofrProvider extends RecommendedProviderBase {
id: 'koofr';
passwordUrl: string;
storageUrl: string;
linkedStorages: RecommendedStorageLink[];
}
export interface PcloudProvider extends RecommendedProviderBase {
id: 'pcloud';
}
export type RecommendedProvider = InfinicloudProvider | KoofrProvider | PcloudProvider;
export const RECOMMENDED_PROVIDERS: RecommendedProvider[] = [
{
id: 'infinicloud',
name: 'InfiniCLOUD',
capacity: '25G',
protocol: 'webdav',
signupUrl: 'https://infini-cloud.net/en/',
referralCode: '2HC5E',
},
{
id: 'koofr',
name: 'Koofr',
capacity: '10G',
protocol: 'webdav',
signupUrl: 'https://app.koofr.net/signup',
passwordUrl: 'https://app.koofr.net/app/admin/preferences/password',
storageUrl: 'https://app.koofr.net/app/storage/',
linkedStorages: [
{ name: 'Google Drive', capacity: '15G' },
{ name: 'OneDrive', capacity: '5G' },
{ name: 'Dropbox', capacity: '2G' },
],
},
{
id: 'pcloud',
name: 'pCloud',
capacity: '10G',
protocol: 'webdav',
signupUrl: 'https://u.pcloud.com/#/register?invite=GITx7ZvEU1N7',
hasAffiliateLink: true,
},
];
export function hasLinkedStorages(provider: RecommendedProvider): provider is KoofrProvider {
return provider.id === 'koofr';
}