PluginProbe
Tableberg – Simple Gutenberg Table Block / 1.1.5
Tableberg – Simple Gutenberg Table Block v1.1.5
1.1.5 1.1.4 1.1.3 1.1.2 1.1.1 1.1.0 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 trunk 0.0.2 0.2.1 0.3.2 0.3.3 0.4.1 0.5.0 0.5.1 0.5.2 0.5.3 0.5.4 0.5.5 0.5.6 0.5.7 All 42 releases
tableberg / admin / src / containers / SettingsContent.jsx

SettingsContent.jsx in Tableberg – Simple Gutenberg Table Block 1.1.5, at admin/src/containers/SettingsContent.jsx

54 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import React from "react";
2 import { __ } from "@wordpress/i18n";
3 import AITableSettings from "../components/AITableSettings";
4 import "../components/AITableSettings.css";
5
6 /* global tablebergAdminMenuData */
7
8 /**
9 * Settings content.
10 *
11 * @class
12 */
13 function SettingsContent() {
14 const aiSettings = tablebergAdminMenuData?.ai_settings;
15 const isPro = tablebergAdminMenuData?.is_pro;
16
17 return (
18 <div className="tableberg-settings-content">
19 {isPro ? (
20 <AITableSettings
21 apiKey={aiSettings?.api_key || ""}
22 onSettingsChange={newSettings => {
23 // Handle settings change if needed
24 // Settings updated
25 }}
26 />
27 ) : (
28 <div className="tableberg-pro-notice">
29 <h3>{__("AI Table Settings", "tableberg")}</h3>
30 <p>
31 {__(
32 "AI Table features are available in Tableberg Pro. Upgrade to unlock AI-powered table generation.",
33 "tableberg"
34 )}
35 </p>
36 <a
37 href="https://tableberg.com/pricing"
38 target="_blank"
39 rel="noopener noreferrer"
40 className="tableberg-button tableberg-button-primary"
41 >
42 {__("Upgrade to Pro", "tableberg")}
43 </a>
44 </div>
45 )}
46 </div>
47 );
48 }
49
50 /**
51 * @module SettingsContent
52 */
53 export default SettingsContent;
54