home.module.scss 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  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. }
  287. .chat-body-title {
  288. cursor: pointer;
  289. &:hover {
  290. text-decoration: underline;
  291. }
  292. }
  293. .chat-message {
  294. display: flex;
  295. flex-direction: row;
  296. &:last-child {
  297. animation: slide-in ease 0.3s;
  298. }
  299. }
  300. .chat-message-user {
  301. display: flex;
  302. flex-direction: row-reverse;
  303. }
  304. .chat-message-container {
  305. max-width: var(--message-max-width);
  306. display: flex;
  307. flex-direction: column;
  308. align-items: flex-start;
  309. &:hover {
  310. .chat-message-top-actions {
  311. opacity: 1;
  312. right: 10px;
  313. pointer-events: all;
  314. }
  315. }
  316. }
  317. .chat-message-user > .chat-message-container {
  318. align-items: flex-end;
  319. }
  320. .chat-message-avatar {
  321. margin-top: 20px;
  322. }
  323. .chat-message-status {
  324. font-size: 12px;
  325. color: #aaa;
  326. line-height: 1.5;
  327. margin-top: 5px;
  328. }
  329. .chat-message-item {
  330. box-sizing: border-box;
  331. max-width: 100%;
  332. margin-top: 10px;
  333. border-radius: 10px;
  334. background-color: rgba(0, 0, 0, 0.05);
  335. padding: 10px;
  336. font-size: 14px;
  337. user-select: text;
  338. word-break: break-word;
  339. border: var(--border-in-light);
  340. position: relative;
  341. }
  342. .chat-message-top-actions {
  343. font-size: 12px;
  344. position: absolute;
  345. right: 20px;
  346. top: -26px;
  347. left: 100px;
  348. transition: all ease 0.3s;
  349. opacity: 0;
  350. pointer-events: none;
  351. display: flex;
  352. flex-direction: row-reverse;
  353. .chat-message-top-action {
  354. opacity: 0.5;
  355. color: var(--black);
  356. white-space: nowrap;
  357. cursor: pointer;
  358. &:hover {
  359. opacity: 1;
  360. }
  361. &:not(:first-child) {
  362. margin-right: 10px;
  363. }
  364. }
  365. }
  366. .chat-message-user > .chat-message-container > .chat-message-item {
  367. background-color: var(--second);
  368. }
  369. .chat-message-actions {
  370. display: flex;
  371. flex-direction: row-reverse;
  372. width: 100%;
  373. padding-top: 5px;
  374. box-sizing: border-box;
  375. font-size: 12px;
  376. }
  377. .chat-message-action-date {
  378. color: #aaa;
  379. }
  380. .chat-input-panel {
  381. position: relative;
  382. width: 100%;
  383. padding: 20px;
  384. padding-top: 10px;
  385. box-sizing: border-box;
  386. flex-direction: column;
  387. border-top-left-radius: 10px;
  388. border-top-right-radius: 10px;
  389. border-top: var(--border-in-light);
  390. box-shadow: var(--card-shadow);
  391. }
  392. @mixin single-line {
  393. white-space: nowrap;
  394. overflow: hidden;
  395. text-overflow: ellipsis;
  396. }
  397. .prompt-hints {
  398. min-height: 20px;
  399. width: 100%;
  400. max-height: 50vh;
  401. overflow: auto;
  402. display: flex;
  403. flex-direction: column-reverse;
  404. background-color: var(--white);
  405. border: var(--border-in-light);
  406. border-radius: 10px;
  407. margin-bottom: 10px;
  408. box-shadow: var(--shadow);
  409. .prompt-hint {
  410. color: var(--black);
  411. padding: 6px 10px;
  412. animation: slide-in ease 0.3s;
  413. cursor: pointer;
  414. transition: all ease 0.3s;
  415. border: transparent 1px solid;
  416. margin: 4px;
  417. border-radius: 8px;
  418. &:not(:last-child) {
  419. margin-top: 0;
  420. }
  421. .hint-title {
  422. font-size: 12px;
  423. font-weight: bolder;
  424. @include single-line();
  425. }
  426. .hint-content {
  427. font-size: 12px;
  428. @include single-line();
  429. }
  430. &-selected,
  431. &:hover {
  432. border-color: var(--primary);
  433. }
  434. }
  435. }
  436. .chat-input-panel-inner {
  437. display: flex;
  438. flex: 1;
  439. }
  440. .chat-input {
  441. height: 100%;
  442. width: 100%;
  443. border-radius: 10px;
  444. border: var(--border-in-light);
  445. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  446. background-color: var(--white);
  447. color: var(--black);
  448. font-family: inherit;
  449. padding: 10px 90px 10px 14px;
  450. resize: none;
  451. outline: none;
  452. }
  453. .chat-input:focus {
  454. border: 1px solid var(--primary);
  455. }
  456. .chat-input-send {
  457. background-color: var(--primary);
  458. color: white;
  459. position: absolute;
  460. right: 30px;
  461. bottom: 32px;
  462. }
  463. @media only screen and (max-width: 600px) {
  464. .chat-input {
  465. font-size: 16px;
  466. }
  467. .chat-input-send {
  468. bottom: 30px;
  469. }
  470. }
  471. .export-content {
  472. white-space: break-spaces;
  473. padding: 10px !important;
  474. }
  475. .loading-content {
  476. display: flex;
  477. flex-direction: column;
  478. justify-content: center;
  479. align-items: center;
  480. height: 100%;
  481. width: 100%;
  482. }