home.module.scss 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449
  1. @import "./window.scss";
  2. @import "../styles/animation.scss";
  3. @mixin container {
  4. background-color: var(--white);
  5. border: var(--border-in-light);
  6. border-radius: 20px;
  7. box-shadow: var(--shadow);
  8. color: var(--black);
  9. background-color: var(--white);
  10. min-width: 600px;
  11. min-height: 480px;
  12. max-width: 900px;
  13. display: flex;
  14. overflow: hidden;
  15. box-sizing: border-box;
  16. width: var(--window-width);
  17. height: var(--window-height);
  18. }
  19. .container {
  20. @include container();
  21. }
  22. @media only screen and (min-width: 600px) {
  23. .tight-container {
  24. --window-width: 100vw;
  25. --window-height: var(--full-height);
  26. --window-content-width: calc(100% - var(--sidebar-width));
  27. @include container();
  28. max-width: 100vw;
  29. max-height: var(--full-height);
  30. border-radius: 0;
  31. }
  32. }
  33. .sidebar {
  34. top: 0;
  35. width: var(--sidebar-width);
  36. box-sizing: border-box;
  37. padding: 20px;
  38. background-color: var(--second);
  39. display: flex;
  40. flex-direction: column;
  41. box-shadow: inset -2px 0px 2px 0px rgb(0, 0, 0, 0.05);
  42. }
  43. .window-content {
  44. width: var(--window-content-width);
  45. height: 100%;
  46. display: flex;
  47. flex-direction: column;
  48. }
  49. .mobile {
  50. display: none;
  51. }
  52. @media only screen and (max-width: 600px) {
  53. .container {
  54. min-height: unset;
  55. min-width: unset;
  56. max-height: unset;
  57. min-width: unset;
  58. border: 0;
  59. border-radius: 0;
  60. }
  61. .sidebar {
  62. position: absolute;
  63. left: -100%;
  64. z-index: 1000;
  65. height: var(--full-height);
  66. transition: all ease 0.3s;
  67. box-shadow: none;
  68. }
  69. .sidebar-show {
  70. left: 0;
  71. }
  72. .mobile {
  73. display: block;
  74. }
  75. }
  76. .sidebar-header {
  77. position: relative;
  78. padding-top: 20px;
  79. padding-bottom: 20px;
  80. }
  81. .sidebar-logo {
  82. position: absolute;
  83. right: 0;
  84. bottom: 18px;
  85. }
  86. .sidebar-title {
  87. font-size: 20px;
  88. font-weight: bold;
  89. }
  90. .sidebar-sub-title {
  91. font-size: 12px;
  92. font-weight: 400px;
  93. }
  94. .sidebar-body {
  95. flex: 1;
  96. overflow: auto;
  97. }
  98. .chat-list {
  99. }
  100. .chat-item {
  101. padding: 10px 14px;
  102. background-color: var(--white);
  103. border-radius: 10px;
  104. margin-bottom: 10px;
  105. box-shadow: var(--card-shadow);
  106. transition: background-color 0.3s ease;
  107. cursor: pointer;
  108. user-select: none;
  109. border: 2px solid transparent;
  110. position: relative;
  111. overflow: hidden;
  112. }
  113. .chat-item:hover {
  114. background-color: var(--hover-color);
  115. }
  116. .chat-item-selected {
  117. border-color: var(--primary);
  118. }
  119. .chat-item-title {
  120. font-size: 14px;
  121. font-weight: bolder;
  122. display: block;
  123. width: 200px;
  124. overflow: hidden;
  125. text-overflow: ellipsis;
  126. white-space: nowrap;
  127. }
  128. .chat-item-delete {
  129. position: absolute;
  130. top: 10px;
  131. right: -20px;
  132. transition: all ease 0.3s;
  133. opacity: 0;
  134. cursor: pointer;
  135. }
  136. .chat-item:hover > .chat-item-delete {
  137. opacity: 0.5;
  138. right: 10px;
  139. }
  140. .chat-item:hover > .chat-item-delete:hover {
  141. opacity: 1;
  142. }
  143. .chat-item-info {
  144. display: flex;
  145. justify-content: space-between;
  146. color: rgb(166, 166, 166);
  147. font-size: 12px;
  148. margin-top: 8px;
  149. }
  150. .chat-item-count {
  151. }
  152. .chat-item-date {
  153. }
  154. .sidebar-tail {
  155. display: flex;
  156. justify-content: space-between;
  157. padding-top: 20px;
  158. }
  159. .sidebar-actions {
  160. display: inline-flex;
  161. }
  162. .sidebar-action:not(:last-child) {
  163. margin-right: 15px;
  164. }
  165. .chat {
  166. display: flex;
  167. flex-direction: column;
  168. position: relative;
  169. height: 100%;
  170. }
  171. .chat-body {
  172. flex: 1;
  173. overflow: auto;
  174. padding: 20px;
  175. position: relative;
  176. }
  177. .chat-body-title {
  178. cursor: pointer;
  179. &:hover {
  180. text-decoration: underline;
  181. }
  182. }
  183. .chat-message {
  184. display: flex;
  185. flex-direction: row;
  186. }
  187. .chat-message-user {
  188. display: flex;
  189. flex-direction: row-reverse;
  190. }
  191. .chat-message-container {
  192. max-width: var(--message-max-width);
  193. display: flex;
  194. flex-direction: column;
  195. align-items: flex-start;
  196. animation: slide-in ease 0.3s;
  197. &:hover {
  198. .chat-message-top-actions {
  199. opacity: 1;
  200. right: 10px;
  201. pointer-events: all;
  202. }
  203. }
  204. }
  205. .chat-message-user > .chat-message-container {
  206. align-items: flex-end;
  207. }
  208. .chat-message-avatar {
  209. margin-top: 20px;
  210. }
  211. .chat-message-status {
  212. font-size: 12px;
  213. color: #aaa;
  214. line-height: 1.5;
  215. margin-top: 5px;
  216. }
  217. .user-avtar {
  218. height: 30px;
  219. width: 30px;
  220. display: flex;
  221. align-items: center;
  222. justify-content: center;
  223. border: var(--border-in-light);
  224. box-shadow: var(--card-shadow);
  225. border-radius: 10px;
  226. }
  227. .chat-message-item {
  228. box-sizing: border-box;
  229. max-width: 100%;
  230. margin-top: 10px;
  231. border-radius: 10px;
  232. background-color: rgba(0, 0, 0, 0.05);
  233. padding: 10px;
  234. font-size: 14px;
  235. user-select: text;
  236. word-break: break-word;
  237. border: var(--border-in-light);
  238. position: relative;
  239. }
  240. .chat-message-top-actions {
  241. font-size: 12px;
  242. position: absolute;
  243. right: 20px;
  244. top: -26px;
  245. left: 100px;
  246. transition: all ease 0.3s;
  247. opacity: 0;
  248. pointer-events: none;
  249. display: flex;
  250. flex-direction: row-reverse;
  251. .chat-message-top-action {
  252. opacity: 0.5;
  253. color: var(--black);
  254. white-space: nowrap;
  255. cursor: pointer;
  256. &:hover {
  257. opacity: 1;
  258. }
  259. &:not(:first-child) {
  260. margin-right: 10px;
  261. }
  262. }
  263. }
  264. .chat-message-user > .chat-message-container > .chat-message-item {
  265. background-color: var(--second);
  266. }
  267. .chat-message-actions {
  268. display: flex;
  269. flex-direction: row-reverse;
  270. width: 100%;
  271. padding-top: 5px;
  272. box-sizing: border-box;
  273. font-size: 12px;
  274. }
  275. .chat-message-action-date {
  276. color: #aaa;
  277. }
  278. .chat-input-panel {
  279. width: 100%;
  280. padding: 20px;
  281. padding-top: 5px;
  282. box-sizing: border-box;
  283. flex-direction: column;
  284. }
  285. @mixin single-line {
  286. white-space: nowrap;
  287. overflow: hidden;
  288. text-overflow: ellipsis;
  289. }
  290. .prompt-hints {
  291. min-height: 20px;
  292. width: 100%;
  293. max-height: 50vh;
  294. overflow: auto;
  295. display: flex;
  296. flex-direction: column-reverse;
  297. background-color: var(--white);
  298. border: var(--border-in-light);
  299. border-radius: 10px;
  300. margin-bottom: 10px;
  301. box-shadow: var(--shadow);
  302. .prompt-hint {
  303. color: var(--black);
  304. padding: 6px 10px;
  305. animation: slide-in ease 0.3s;
  306. cursor: pointer;
  307. transition: all ease 0.3s;
  308. border: transparent 1px solid;
  309. margin: 4px;
  310. border-radius: 8px;
  311. &:not(:last-child) {
  312. margin-top: 0;
  313. }
  314. .hint-title {
  315. font-size: 12px;
  316. font-weight: bolder;
  317. @include single-line();
  318. }
  319. .hint-content {
  320. font-size: 12px;
  321. @include single-line();
  322. }
  323. &-selected,
  324. &:hover {
  325. border-color: var(--primary);
  326. }
  327. }
  328. }
  329. .chat-input-panel-inner {
  330. display: flex;
  331. flex: 1;
  332. }
  333. .chat-input {
  334. height: 100%;
  335. width: 100%;
  336. border-radius: 10px;
  337. border: var(--border-in-light);
  338. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  339. background-color: var(--white);
  340. color: var(--black);
  341. font-family: inherit;
  342. padding: 10px 90px 10px 14px;
  343. resize: none;
  344. outline: none;
  345. }
  346. .chat-input:focus {
  347. border: 1px solid var(--primary);
  348. }
  349. .chat-input-send {
  350. background-color: var(--primary);
  351. color: white;
  352. position: absolute;
  353. right: 30px;
  354. bottom: 32px;
  355. }
  356. @media only screen and (max-width: 600px) {
  357. .chat-input {
  358. font-size: 16px;
  359. }
  360. .chat-input-send {
  361. bottom: 30px;
  362. }
  363. }
  364. .export-content {
  365. white-space: break-spaces;
  366. padding: 10px !important;
  367. }
  368. .loading-content {
  369. display: flex;
  370. flex-direction: column;
  371. justify-content: center;
  372. align-items: center;
  373. height: 100%;
  374. width: 100%;
  375. }