feat(web): license UI (#11182)
This commit is contained in:
@@ -7,11 +7,11 @@ export const load = (({ url }) => {
|
||||
HOME = 'home',
|
||||
UNSUBSCRIBE = 'unsubscribe',
|
||||
VIEW_ASSET = 'view_asset',
|
||||
ACTIVATE_LICENSE = 'activate_license',
|
||||
}
|
||||
|
||||
const queryParams = url.searchParams;
|
||||
const target = queryParams.get('target') as LinkTarget;
|
||||
|
||||
switch (target) {
|
||||
case LinkTarget.HOME: {
|
||||
return redirect(302, AppRoute.PHOTOS);
|
||||
@@ -28,6 +28,26 @@ export const load = (({ url }) => {
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case LinkTarget.ACTIVATE_LICENSE: {
|
||||
// https://my.immich.app/link?target=activate_license&licenseKey=IMCL-76S5-B4KG-4HXA-KRQF-C1G1-7PJ6-9V9V-7WQH
|
||||
// https://my.immich.app/link?target=activate_license&licenseKey=IMCL-9XC3-T4S3-37BU-GGJ5-8MWP-F2Y1-BGEX-AQTF
|
||||
const licenseKey = queryParams.get('licenseKey');
|
||||
const activationKey = queryParams.get('activationKey');
|
||||
const redirectUrl = new URL(AppRoute.BUY, url.origin);
|
||||
|
||||
if (licenseKey) {
|
||||
redirectUrl.searchParams.append('licenseKey', licenseKey);
|
||||
|
||||
if (activationKey) {
|
||||
redirectUrl.searchParams.append('activationKey', activationKey);
|
||||
}
|
||||
|
||||
return redirect(302, redirectUrl);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return redirect(302, AppRoute.PHOTOS);
|
||||
|
||||
Reference in New Issue
Block a user