Skip to content

Commit 3e418c1

Browse files
committed
use bootstrap
1 parent dad4d2e commit 3e418c1

File tree

4 files changed

+59
-51
lines changed

4 files changed

+59
-51
lines changed

html/browser-message.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;">
2-
<h3>Phoenix AI Control Status</h3>
3-
<div style="background-color: #f9f9f9; border-left: 4px solid #007acc; padding: 16px; margin: 16px 0; border-radius: 4px;">
4-
<p><strong>Browser Version</strong></p>
1+
<div class="container-fluid">
2+
<h3 class="mb-3">Phoenix AI Control Status</h3>
3+
<div class="alert alert-info border-start border-info border-4 mb-4">
4+
<p class="fw-bold">Browser Version</p>
55
<p>Managed AI control is not yet supported in the browser version of Phoenix Code.</p>
66
</div>
77
<p>For more information on controlling AI in educational institutions, visit:
8-
<a href="https://docs.phcode.dev/docs/control-ai" target="_blank">https://docs.phcode.dev/docs/control-ai</a></p>
8+
<a href="https://docs.phcode.dev/docs/control-ai" target="_blank" class="link-primary">https://docs.phcode.dev/docs/control-ai</a></p>
99
</div>

html/error-template.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;">
2-
<h3>Error Checking AI Control Status</h3>
3-
<div style="background-color: #ffecec; border-left: 4px solid #f44336; padding: 16px; margin: 16px 0; border-radius: 4px;">
4-
<p>An error occurred while checking AI control configuration:</p>
5-
<p><code>{{errorMessage}}</code></p>
1+
<div class="container-fluid">
2+
<h3 class="mb-3">Error Checking AI Control Status</h3>
3+
<div class="alert alert-danger border-start border-danger border-4 mb-4">
4+
<p class="mb-2">An error occurred while checking AI control configuration:</p>
5+
<p class="mb-0"><code>{{errorMessage}}</code></p>
66
</div>
77
<p>For more information on controlling AI in educational institutions, visit:
8-
<a href="https://docs.phcode.dev/docs/control-ai" target="_blank">https://docs.phcode.dev/docs/control-ai</a></p>
8+
<a href="https://docs.phcode.dev/docs/control-ai" target="_blank" class="link-primary">https://docs.phcode.dev/docs/control-ai</a></p>
99
</div>

html/status-template.html

Lines changed: 48 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,59 @@
1-
<div style="font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;">
2-
<h3>Phoenix AI Control Status</h3>
1+
<div class="container-fluid">
2+
<h3 class="mb-3">Phoenix AI Control Status</h3>
33

4-
<div style="background-color: #f9f9f9; border-left: 4px solid {{statusColor}}; padding: 16px; margin: 16px 0; border-radius: 4px;">
5-
<p style="font-size: 16px;"><strong>AI Status:</strong> <span style="color: {{statusColor}};">{{statusIcon}} {{statusText}}</span></p>
6-
<p>{{status.message}}</p>
4+
{{#status.isEnabled}}
5+
<div class="alert alert-success border-start border-success border-4 mb-4">
6+
<p class="fs-5 mb-2"><strong>AI Status:</strong> <span class="text-success">✓ Enabled</span></p>
7+
<p class="mb-0">{{status.message}}</p>
78
</div>
9+
{{/status.isEnabled}}
10+
11+
{{^status.isEnabled}}
12+
<div class="alert alert-danger border-start border-danger border-4 mb-4">
13+
<p class="fs-5 mb-2"><strong>AI Status:</strong> <span class="text-danger">✗ Disabled</span></p>
14+
<p class="mb-0">{{status.message}}</p>
15+
</div>
16+
{{/status.isEnabled}}
817

918
{{#showConfigDetails}}
10-
<div style="margin: 16px 0;">
11-
<h4>Configuration Details</h4>
12-
<table style="width: 100%; border-collapse: collapse;">
13-
<tr>
14-
<td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Platform:</strong></td>
15-
<td style="padding: 8px; border-bottom: 1px solid #eee;">{{status.platform}}</td>
16-
</tr>
17-
<tr>
18-
<td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Configuration File:</strong></td>
19-
<td style="padding: 8px; border-bottom: 1px solid #eee; word-break: break-all;">{{status.configPath}}</td>
20-
</tr>
21-
<tr>
22-
<td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Current User:</strong></td>
23-
<td style="padding: 8px; border-bottom: 1px solid #eee;">{{status.currentUser}}</td>
24-
</tr>
25-
<tr>
26-
<td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Managed By:</strong></td>
27-
<td style="padding: 8px; border-bottom: 1px solid #eee;">{{status.managedBy}}</td>
28-
</tr>
29-
{{#hasAllowedUsers}}
30-
<tr>
31-
<td style="padding: 8px; border-bottom: 1px solid #eee;"><strong>Allowed Users:</strong></td>
32-
<td style="padding: 8px; border-bottom: 1px solid #eee;">{{allowedUsersList}}</td>
33-
</tr>
34-
{{/hasAllowedUsers}}
19+
<div class="mb-4">
20+
<h4 class="mb-3">Configuration Details</h4>
21+
<table class="table table-bordered table-striped">
22+
<tbody>
23+
<tr>
24+
<td class="fw-bold" width="30%">Platform</td>
25+
<td>{{status.platform}}</td>
26+
</tr>
27+
<tr>
28+
<td class="fw-bold">Configuration File</td>
29+
<td class="text-break">{{status.configPath}}</td>
30+
</tr>
31+
<tr>
32+
<td class="fw-bold">Current User</td>
33+
<td>{{status.currentUser}}</td>
34+
</tr>
35+
<tr>
36+
<td class="fw-bold">Managed By</td>
37+
<td>{{status.managedBy}}</td>
38+
</tr>
39+
{{#hasAllowedUsers}}
40+
<tr>
41+
<td class="fw-bold">Allowed Users</td>
42+
<td>{{allowedUsersList}}</td>
43+
</tr>
44+
{{/hasAllowedUsers}}
45+
</tbody>
3546
</table>
3647
</div>
3748
{{/showConfigDetails}}
3849

39-
<div style="margin-top: 24px;">
40-
<h4>Need to Control AI in Your Educational Institution?</h4>
41-
<p>Visit <a href="https://docs.phcode.dev/docs/control-ai" target="_blank">https://docs.phcode.dev/docs/control-ai</a> for documentation on how to:</p>
42-
<ul>
43-
<li>Disable AI features by default</li>
44-
<li>Allow specific users to access AI</li>
45-
<li>Set up managed AI deployments</li>
50+
<div class="mt-4">
51+
<h4 class="mb-3">Need to Control AI in Your Educational Institution?</h4>
52+
<p>Visit <a href="https://docs.phcode.dev/docs/control-ai" target="_blank" class="link-primary">https://docs.phcode.dev/docs/control-ai</a> for documentation on how to:</p>
53+
<ul class="list-group list-group-flush mb-3">
54+
<li class="list-group-item">Disable AI features by default</li>
55+
<li class="list-group-item">Allow specific users to access AI</li>
56+
<li class="list-group-item">Set up managed AI deployments</li>
4657
</ul>
4758
</div>
4859
</div>

main.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,6 @@ define(function (require, exports, module) {
4040

4141
// Prepare view model for Mustache
4242
const viewModel = {
43-
statusColor: status.isEnabled ? "#4caf50" : "#f44336", // Green if enabled, red if disabled
44-
statusIcon: status.isEnabled ? "✓" : "✗",
45-
statusText: status.isEnabled ? "Enabled" : "Disabled",
4643
status: status,
4744
showConfigDetails: status.exists && status.isConfigured,
4845
hasAllowedUsers: status.allowedUsers && status.allowedUsers.length > 0,

0 commit comments

Comments
 (0)