home.module.scss 9.4 KB

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