Skip to content

Commit 1d8942d

Browse files
committed
feat: add buttons to all pages
1 parent 2602109 commit 1d8942d

File tree

2 files changed

+42
-7
lines changed

2 files changed

+42
-7
lines changed

assets/apps/dashboard/src/Components/Content/Settings/GeneralTabContent.js

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import {
77
LucideMonitorDown,
88
LucideTags,
99
LucideType,
10+
LucideExternalLink,
1011
} from 'lucide-react';
1112
import useLicenseData from '../../../Hooks/useLicenseData';
1213
import { NEVE_HAS_VALID_PRO } from '../../../utils/constants';
@@ -16,6 +17,7 @@ import OptionGroup from './OptionGroup';
1617
import ControlWrap from '../../Controls/ControlWrap';
1718
import Toggle from '../../Common/Toggle';
1819
import Select from '../../Common/Select';
20+
import Button from '../../Common/Button';
1921

2022
const DUMMY_SETTINGS_ARGS = {
2123
enable_featured_image_taxonomy: {
@@ -185,9 +187,22 @@ export default () => {
185187

186188
return (
187189
<>
188-
<h1 className="text-lg font-semibold mb-6">
189-
{__('General Settings', 'neve')}
190-
</h1>
190+
<div className="flex items-center justify-between mb-6">
191+
<h1 className="text-lg font-semibold">
192+
{__('General Settings', 'neve')}
193+
</h1>
194+
195+
{!isLicenseValid && (
196+
<Button
197+
isPrimary
198+
href={neveDash.upgradeURLModules}
199+
target="_blank"
200+
>
201+
{__('Get Neve Pro', 'neve')}
202+
<LucideExternalLink size={16} className="shrink-0" />
203+
</Button>
204+
)}
205+
</div>
191206

192207
<div>
193208
{(isLicenseValid && <ProModuleSettings />) || <DummySettings />}

assets/apps/dashboard/src/Components/Content/Settings/PerformanceTabContent.js

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
/* global neveDash */
22
import { __ } from '@wordpress/i18n';
3-
import { LucideCode, LucideSmile, LucideText, LucideZap } from 'lucide-react';
3+
import {
4+
LucideCode,
5+
LucideSmile,
6+
LucideText,
7+
LucideZap,
8+
LucideExternalLink,
9+
} from 'lucide-react';
410
import ToggleControl from '../../Controls/ToggleControl';
11+
import Button from '../../Common/Button';
512
import useLicenseData from '../../../Hooks/useLicenseData';
613
import OptionGroup from './OptionGroup';
714

@@ -78,9 +85,22 @@ export default () => {
7885

7986
return (
8087
<>
81-
<h1 className="text-lg font-semibold mb-6">
82-
{__('Performance Settings', 'neve')}
83-
</h1>
88+
<div className="flex items-center justify-between mb-6">
89+
<h1 className="text-lg font-semibold">
90+
{__('Performance Settings', 'neve')}
91+
</h1>
92+
93+
{!isLicenseValid && (
94+
<Button
95+
isPrimary
96+
href={neveDash.upgradeURLModules}
97+
target="_blank"
98+
>
99+
{__('Get Neve Pro', 'neve')}
100+
<LucideExternalLink size={16} className="shrink-0" />
101+
</Button>
102+
)}
103+
</div>
84104

85105
<div>
86106
<ToggleControl

0 commit comments

Comments
 (0)