license limit modal

This commit is contained in:
SPRINX0\prochazka
2025-05-28 17:37:55 +02:00
parent aff7125914
commit cb50d2838a
3 changed files with 72 additions and 3 deletions

View File

@@ -15,6 +15,7 @@ import { isAdminPage, isOneOfPage } from './pageDefs';
import { openWebLink } from './simpleTools';
import { serializeJsTypesReplacer } from 'dbgate-tools';
import { cloudSigninTokenHolder } from '../stores';
import LicenseLimitMessageModal from '../modals/LicenseLimitMessageModal.svelte';
export const strmid = uuidv1();
@@ -121,7 +122,13 @@ async function processApiResponse(route, args, resp) {
// missingCredentials: true,
// };
} else if (resp?.apiErrorMessage) {
showSnackbarError('API error:' + resp?.apiErrorMessage);
if (resp?.apiErrorIsLicenseLimit) {
showModal(LicenseLimitMessageModal, {
message: resp.apiErrorMessage,
});
} else {
showSnackbarError('API error:' + resp?.apiErrorMessage);
}
return {
errorMessage: resp.apiErrorMessage,
};