home.module.scss 7.1 KB

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