style.css 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. body {
  2. font-family: Arial, sans-serif;
  3. margin: 0;
  4. padding: 0;
  5. display: flex;
  6. height: 100vh;
  7. }
  8. .sidebar {
  9. width: 200px;
  10. background-color: #f0f0f0;
  11. padding: 20px;
  12. border-right: 1px solid #ddd;
  13. }
  14. .sidebar button {
  15. display: block;
  16. width: 100%;
  17. padding: 10px;
  18. margin-bottom: 10px;
  19. background-color: #007bff;
  20. color: white;
  21. border: none;
  22. border-radius: 4px;
  23. cursor: pointer;
  24. }
  25. .sidebar button:hover {
  26. background-color: #0056b3;
  27. }
  28. .sidebar button.active {
  29. background-color: #0056b3;
  30. font-weight: bold;
  31. }
  32. .main-content {
  33. flex: 1;
  34. padding: 20px;
  35. position: relative;
  36. }
  37. .section {
  38. display: none;
  39. height: 100%;
  40. }
  41. .section.active {
  42. display: flex;
  43. flex-direction: column;
  44. }
  45. /* 聊天界面样式 */
  46. .chat-messages {
  47. flex: 1;
  48. overflow-y: auto;
  49. border: 1px solid #ddd;
  50. padding: 10px;
  51. margin-bottom: 10px;
  52. background-color: #f9f9f9;
  53. }
  54. .message {
  55. margin-bottom: 10px;
  56. padding: 8px;
  57. border-radius: 4px;
  58. }
  59. .message-content {
  60. white-space: pre-wrap; /* 保留空白和换行 */
  61. word-wrap: break-word; /* 长单词换行 */
  62. line-height: 1.4;
  63. }
  64. .user-message {
  65. background-color: #e3f2fd;
  66. text-align: right;
  67. }
  68. .agent-message {
  69. background-color: #f5f5f5;
  70. text-align: left;
  71. }
  72. .chat-input {
  73. display: flex;
  74. gap: 10px;
  75. }
  76. .chat-input textarea {
  77. flex: 1;
  78. padding: 10px;
  79. border: 1px solid #ddd;
  80. border-radius: 4px;
  81. resize: vertical;
  82. min-height: 60px;
  83. }
  84. .chat-input button {
  85. padding: 10px 20px;
  86. background-color: #007bff;
  87. color: white;
  88. border: none;
  89. border-radius: 4px;
  90. cursor: pointer;
  91. }
  92. #loading {
  93. display: none;
  94. color: #007bff;
  95. font-style: italic;
  96. }
  97. /* 日志和文件扫描界面样式 */
  98. .scan-section {
  99. height: 100%;
  100. display: flex;
  101. flex-direction: column;
  102. }
  103. .scan-controls {
  104. margin-bottom: 20px;
  105. padding: 15px;
  106. background-color: #f5f5f5;
  107. border-radius: 4px;
  108. }
  109. .scan-controls input {
  110. padding: 8px;
  111. margin-right: 10px;
  112. border: 1px solid #ddd;
  113. border-radius: 4px;
  114. width: 300px;
  115. }
  116. .scan-controls button {
  117. padding: 8px 16px;
  118. background-color: #28a745;
  119. color: white;
  120. border: none;
  121. border-radius: 4px;
  122. cursor: pointer;
  123. }
  124. .scan-results {
  125. flex: 1;
  126. overflow-y: auto;
  127. border: 1px solid #ddd;
  128. padding: 15px;
  129. background-color: #f9f9f9;
  130. }
  131. .log-file {
  132. border: 1px solid #ddd;
  133. margin: 10px 0;
  134. padding: 10px;
  135. border-radius: 5px;
  136. }
  137. /* 完成文件的特殊样式 */
  138. .log-file.completion-file {
  139. border: 2px solid #28a745;
  140. background-color: #f0fff4;
  141. }
  142. .file-name {
  143. font-weight: bold;
  144. margin-bottom: 5px;
  145. color: #333;
  146. }
  147. .completion-file .file-name {
  148. color: #28a745;
  149. }
  150. .file-content {
  151. white-space: pre-wrap;
  152. background: #f5f5f5;
  153. padding: 8px;
  154. border-radius: 3px;
  155. }
  156. .completion-file {
  157. border-left: 4px solid #4CAF50;
  158. background-color: #f9fff9;
  159. }
  160. button {
  161. margin: 10px 0;
  162. padding: 8px 16px;
  163. background: #007bff;
  164. color: white;
  165. border: none;
  166. border-radius: 4px;
  167. cursor: pointer;
  168. }
  169. button:hover {
  170. background: #0056b3;
  171. }
  172. /* 文件扫描样式 */
  173. .file-item {
  174. margin: 5px 0;
  175. padding: 8px;
  176. border-radius: 4px;
  177. }
  178. .file-item.directory {
  179. background-color: #f0f8ff;
  180. border-left: 3px solid #007bff;
  181. }
  182. .file-item.file {
  183. background-color: #f9f9f9;
  184. border-left: 3px solid #28a745;
  185. }
  186. .file-item.error {
  187. background-color: #fff0f0;
  188. border-left: 3px solid #dc3545;
  189. }
  190. .file-name {
  191. font-weight: bold;
  192. margin-bottom: 5px;
  193. color: #333;
  194. }
  195. .file-content {
  196. white-space: pre-wrap;
  197. background: #fff;
  198. padding: 8px;
  199. border-radius: 3px;
  200. border: 1px solid #ddd;
  201. margin-top: 5px;
  202. font-family: monospace;
  203. font-size: 0.9em;
  204. max-height: 300px;
  205. overflow-y: auto;
  206. }