home.module.scss 9.0 KB

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