|
4 | 4 | <meta charset="UTF-8"> |
5 | 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
6 | 6 | <title>AI Code Review</title> |
| 7 | + <script src="https://cdn.tailwindcss.com"></script> |
| 8 | + <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css"> |
7 | 9 | <style> |
8 | | - body { font-family: sans-serif; margin: 20px; } |
9 | | - button { margin: 5px; padding: 8px 12px; cursor: pointer; } |
10 | | - textarea { width: 100%; height: 100px; margin: 5px 0; } |
11 | | - pre { border: 1px solid #ccc; padding: 10px; overflow-x: auto; } |
12 | | - .error { color: red; } |
13 | | - .success { color: green; } |
14 | | - .loading { opacity: 0.6; pointer-events: none; } |
15 | | - .form-group { margin-bottom: 10px; } |
16 | | - .form-group label { display: block; margin-bottom: 5px; } |
| 10 | + body { |
| 11 | + background-color: #0f172a; |
| 12 | + color: #ffffff; |
| 13 | + font-family: Arial, sans-serif; |
| 14 | + } |
| 15 | + .header { |
| 16 | + display: flex; |
| 17 | + justify-content: space-between; |
| 18 | + align-items: center; |
| 19 | + padding: 1rem; |
| 20 | + background-color: #1e293b; |
| 21 | + } |
| 22 | + .header a { |
| 23 | + color: #ffffff; |
| 24 | + text-decoration: none; |
| 25 | + font-size: 1.25rem; |
| 26 | + } |
| 27 | + .sidebar { |
| 28 | + width: 200px; |
| 29 | + background-color: #1e293b; |
| 30 | + padding: 1rem; |
| 31 | + position: fixed; |
| 32 | + top: 0; |
| 33 | + bottom: 0; |
| 34 | + left: 0; |
| 35 | + } |
| 36 | + .sidebar a { |
| 37 | + display: block; |
| 38 | + color: #ffffff; |
| 39 | + text-decoration: none; |
| 40 | + margin-bottom: 1rem; |
| 41 | + } |
| 42 | + .content { |
| 43 | + margin-left: 220px; |
| 44 | + padding: 1rem; |
| 45 | + } |
| 46 | + button { |
| 47 | + margin: 5px; |
| 48 | + padding: 8px 12px; |
| 49 | + cursor: pointer; |
| 50 | + } |
| 51 | + textarea { |
| 52 | + width: 100%; |
| 53 | + height: 100px; |
| 54 | + margin: 5px 0; |
| 55 | + } |
| 56 | + pre { |
| 57 | + border: 1px solid #ccc; |
| 58 | + padding: 10px; |
| 59 | + overflow-x: auto; |
| 60 | + } |
| 61 | + .error { |
| 62 | + color: red; |
| 63 | + } |
| 64 | + .success { |
| 65 | + color: green; |
| 66 | + } |
| 67 | + .loading { |
| 68 | + opacity: 0.6; |
| 69 | + pointer-events: none; |
| 70 | + } |
| 71 | + .form-group { |
| 72 | + margin-bottom: 10px; |
| 73 | + } |
| 74 | + .form-group label { |
| 75 | + display: block; |
| 76 | + margin-bottom: 5px; |
| 77 | + } |
17 | 78 | button.loading::after { |
18 | 79 | content: ""; |
19 | 80 | position: absolute; |
|
34 | 95 | </style> |
35 | 96 | </head> |
36 | 97 | <body> |
37 | | - <h1>AI Code Review</h1> |
38 | | - |
39 | | - <div class="form-group"> |
40 | | - <label for="apiKey">API Key:</label> |
41 | | - <input type="text" id="apiKey" placeholder="Enter API Key" required> |
42 | | - <button onclick="saveApiKey()">Save API Key</button> |
| 98 | + <div class="header"> |
| 99 | + <a href="index.html">Main Dashboard</a> |
| 100 | + <div> |
| 101 | + <i class="fas fa-share-alt text-white"></i> |
| 102 | + <i class="fas fa-ellipsis-v text-white"></i> |
| 103 | + </div> |
| 104 | + </div> |
| 105 | + <div class="sidebar"> |
| 106 | + <a href="admin_profile.html">Admin Profile</a> |
| 107 | + <a href="ai_chatbox_settings.html">AI Chatbox Settings</a> |
| 108 | + <a href="ai_code_review.html">AI Code Review</a> |
| 109 | + <a href="c2_panel.html">C2 Panel</a> |
| 110 | + <a href="chatbot_dashboard.html">Chatbot Dashboard</a> |
| 111 | + <a href="feature_pages.html">Feature Pages</a> |
| 112 | + <a href="settings.html">Settings</a> |
43 | 113 | </div> |
| 114 | + <div class="content"> |
| 115 | + <h1>AI Code Review</h1> |
44 | 116 |
|
45 | | - <h2>Upload Code for Review</h2> |
46 | | - <form id="uploadCodeForm"> |
47 | 117 | <div class="form-group"> |
48 | | - <label for="codeFile">Select Code File:</label> |
49 | | - <input type="file" id="codeFile" required> |
| 118 | + <label for="apiKey">API Key:</label> |
| 119 | + <input type="text" id="apiKey" placeholder="Enter API Key" required> |
| 120 | + <button onclick="saveApiKey()">Save API Key</button> |
50 | 121 | </div> |
51 | | - <button type="submit">Upload</button> |
52 | | - </form> |
53 | | - <pre id="uploadResult"></pre> |
54 | 122 |
|
55 | | - <h2>AI Code Review Results</h2> |
56 | | - <div id="reviewResults"></div> |
| 123 | + <h2>Upload Code for Review</h2> |
| 124 | + <form id="uploadCodeForm"> |
| 125 | + <div class="form-group"> |
| 126 | + <label for="codeFile">Select Code File:</label> |
| 127 | + <input type="file" id="codeFile" required> |
| 128 | + </div> |
| 129 | + <button type="submit">Upload</button> |
| 130 | + </form> |
| 131 | + <pre id="uploadResult"></pre> |
| 132 | + |
| 133 | + <h2>AI Code Review Results</h2> |
| 134 | + <div id="reviewResults"></div> |
| 135 | + </div> |
57 | 136 |
|
58 | 137 | <script> |
59 | 138 | const API_BASE_URL = '/api/ai_code_review'; // Backend API endpoint |
|
0 commit comments