Skip to content

Commit

Permalink
fix expired conditions and message
Browse files Browse the repository at this point in the history
  • Loading branch information
notshivansh committed Feb 16, 2024
1 parent 375c761 commit 3365b88
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function EmptyScreensLayout({iconSrc,headingText,description, buttonText, redire
return (
<VerticalStack gap={5}>
<Card padding={5}>
<Box paddingBlockStart={5}>
<Box paddingBlockStart={5} paddingBlockEnd={16}>
<HorizontalStack align="center">
<Box width='400px'>
<VerticalStack gap={8}>
Expand All @@ -22,13 +22,13 @@ function EmptyScreensLayout({iconSrc,headingText,description, buttonText, redire
</HorizontalStack>
<VerticalStack gap={4}>
<HorizontalStack align='center'>
<Text variant="headingLg">{headingText}</Text>
<Text variant="headingLg" alignment={"center"}>{headingText}</Text>
</HorizontalStack>

<Text color="subdued" variant="bodyMd" alignment="center">{description}</Text>

<HorizontalStack align='center'>
{redirectUrl ? <Box paddingBlockStart={2} paddingBlockEnd={16}>
{redirectUrl ? <Box paddingBlockStart={2}>
<Button primary onClick={() => navigate(redirectUrl)}>{buttonText}</Button>
</Box> : null}
{bodyComponent}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "react-router-dom";

function ExpiredApp() {
const message = <Text>Please upgrade to the latest version to continue using akto. For any queries contact <Link url="mailto:support@akto.io">support@akto.io</Link>.</Text>
const message = <Text>Please upgrade to the latest version to continue using Akto, <Link url="https://docs.akto.io/support">learn more</Link>. For any queries contact <Link url="mailto:support@akto.io">support@akto.io</Link>.</Text>
const router = createBrowserRouter([
{
path: "*",
Expand All @@ -15,7 +15,7 @@ function ExpiredApp() {
}}>
<EmptyScreensLayout key={"emptyScreen"}
iconSrc={"/public/upgrade.svg"}
headingText={"Upgrade to latest version"}
headingText={"Hey! we noticed you're on an unsupported version"}
description={message}
/>
</div>
Expand Down
3 changes: 1 addition & 2 deletions apps/dashboard/web/polaris_web/web/src/apps/main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ let expired = false;

if (window.DASHBOARD_MODE == 'ON_PREM' && (
!window.STIGG_CUSTOMER_ID ||
!window.EXPIRED ||
window.EXPIRED == 'true')) {
(window.EXPIRED && window.EXPIRED == 'true') )) {

expired = true;

Expand Down
2 changes: 1 addition & 1 deletion apps/dashboard/web/src/apps/main/ExpiredApp.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-app>
<div id="centered-div">
Please upgrade to the latest version to continue using akto. For any queries contact support@akto.io.
Hey! we noticed you're on an unsupported version. Please upgrade to the latest version to continue using Akto. For any queries contact support@akto.io
</div>
</v-app>
</template>
Expand Down
3 changes: 1 addition & 2 deletions apps/dashboard/web/src/apps/main/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ let expired = false;

if (window.DASHBOARD_MODE == 'ON_PREM' && (
!window.STIGG_CUSTOMER_ID ||
!window.EXPIRED ||
window.EXPIRED == 'true')) {
(window.EXPIRED && window.EXPIRED == 'true'))) {

expired = true;
}
Expand Down

0 comments on commit 3365b88

Please sign in to comment.