| 1 |
<?php |
| 2 |
if (!defined('ABSPATH')) |
| 3 |
exit; // Exit if accessed directly |
| 4 |
|
| 5 |
$jwt_token = get_option('aibui_jwt_token', ''); |
| 6 |
if (empty($jwt_token)) { |
| 7 |
echo '<div class="ai-auth-container"><div class="ai-message error">' . esc_html__('Please sign in to access the AI Builder settings.', 'ai-builder') . '</div></div>'; |
| 8 |
return; |
| 9 |
} |
| 10 |
?> |
| 11 |
<div class="wrap ai-builder-settings"> |
| 12 |
<h1>AI Builder – Settings</h1> |
| 13 |
|
| 14 |
<p>Configure your global design tokens for AI-generated pages.</p> |
| 15 |
|
| 16 |
<form id="aibui-settings-form"> |
| 17 |
<table class="form-table" role="presentation"> |
| 18 |
<tbody> |
| 19 |
<tr> |
| 20 |
<th scope="row"><label for="primaryColor">Primary color</label></th> |
| 21 |
<td> |
| 22 |
<input name="primaryColor" id="primaryColor" type="color" /> |
| 23 |
</td> |
| 24 |
</tr> |
| 25 |
<tr> |
| 26 |
<th scope="row"><label for="secondaryColor">Secondary color</label></th> |
| 27 |
<td> |
| 28 |
<input name="secondaryColor" id="secondaryColor" type="color" /> |
| 29 |
</td> |
| 30 |
</tr> |
| 31 |
<tr> |
| 32 |
<th scope="row"><label for="siteName">Site name</label></th> |
| 33 |
<td> |
| 34 |
<input name="siteName" id="siteName" type="text" class="regular-text" |
| 35 |
placeholder="My Company" /> |
| 36 |
</td> |
| 37 |
</tr> |
| 38 |
<!-- <tr> |
| 39 |
<th scope="row"><label for="siteTagline">Tagline</label></th> |
| 40 |
<td> |
| 41 |
<input name="siteTagline" id="siteTagline" type="text" class="regular-text" |
| 42 |
placeholder="We build awesome things" /> |
| 43 |
</td> |
| 44 |
</tr> --> |
| 45 |
<tr> |
| 46 |
<th scope="row"><label for="siteDescription">Site description</label></th> |
| 47 |
<td> |
| 48 |
<textarea name="siteDescription" id="siteDescription" class="large-text" rows="4" |
| 49 |
placeholder="Short description used by AI as context"></textarea> |
| 50 |
</td> |
| 51 |
</tr> |
| 52 |
<!-- <tr> |
| 53 |
<th scope="row"><label for="nativeFont">Font (native)</label></th> |
| 54 |
<td> |
| 55 |
<select name="nativeFont" id="nativeFont"> |
| 56 |
<option value="system-ui">System UI (auto)</option> |
| 57 |
<option value="-apple-system">Apple System (macOS/iOS)</option> |
| 58 |
<option value="'Segoe UI'">Segoe UI (Windows)</option> |
| 59 |
<option value="Roboto">Roboto (Android)</option> |
| 60 |
<option value="Arial">Arial</option> |
| 61 |
<option value="Helvetica">Helvetica</option> |
| 62 |
<option value="'Noto Sans'">Noto Sans</option> |
| 63 |
<option value="sans-serif">sans-serif</option> |
| 64 |
</select> |
| 65 |
<p class="description">Browsers map to native OS fonts and fallback to sans-serif.</p> |
| 66 |
</td> |
| 67 |
</tr> --> |
| 68 |
</tbody> |
| 69 |
</table> |
| 70 |
|
| 71 |
<p class="submit"> |
| 72 |
<button type="submit" class="button button-primary">Save Settings</button> |
| 73 |
</p> |
| 74 |
</form> |
| 75 |
|
| 76 |
<div id="aibui-settings-toast" style="display:none;"></div> |
| 77 |
</div> |