home.module.scss 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  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. position: relative;
  184. }
  185. .chat-body-title {
  186. cursor: pointer;
  187. &:hover {
  188. text-decoration: underline;
  189. }
  190. }
  191. .chat-message {
  192. display: flex;
  193. flex-direction: row;
  194. }
  195. .chat-message-user {
  196. display: flex;
  197. flex-direction: row-reverse;
  198. }
  199. .chat-message-container {
  200. max-width: var(--message-max-width);
  201. display: flex;
  202. flex-direction: column;
  203. align-items: flex-start;
  204. animation: slide-in ease 0.3s;
  205. &:hover {
  206. .chat-message-top-actions {
  207. opacity: 1;
  208. right: 10px;
  209. pointer-events: all;
  210. }
  211. }
  212. }
  213. .chat-message-user > .chat-message-container {
  214. align-items: flex-end;
  215. }
  216. .chat-message-avatar {
  217. margin-top: 20px;
  218. }
  219. .chat-message-status {
  220. font-size: 12px;
  221. color: #aaa;
  222. line-height: 1.5;
  223. margin-top: 5px;
  224. }
  225. .user-avtar {
  226. height: 30px;
  227. width: 30px;
  228. display: flex;
  229. align-items: center;
  230. justify-content: center;
  231. border: var(--border-in-light);
  232. box-shadow: var(--card-shadow);
  233. border-radius: 10px;
  234. }
  235. .chat-message-item {
  236. box-sizing: border-box;
  237. max-width: 100%;
  238. margin-top: 10px;
  239. border-radius: 10px;
  240. background-color: rgba(0, 0, 0, 0.05);
  241. padding: 10px;
  242. font-size: 14px;
  243. user-select: text;
  244. word-break: break-word;
  245. border: var(--border-in-light);
  246. position: relative;
  247. }
  248. .chat-message-top-actions {
  249. font-size: 12px;
  250. position: absolute;
  251. right: 20px;
  252. top: -26px;
  253. left: 100px;
  254. transition: all ease 0.3s;
  255. opacity: 0;
  256. pointer-events: none;
  257. display: flex;
  258. flex-direction: row-reverse;
  259. .chat-message-top-action {
  260. opacity: 0.5;
  261. color: var(--black);
  262. white-space: nowrap;
  263. cursor: pointer;
  264. &:hover {
  265. opacity: 1;
  266. }
  267. &:not(:first-child) {
  268. margin-right: 10px;
  269. }
  270. }
  271. }
  272. .chat-message-user > .chat-message-container > .chat-message-item {
  273. background-color: var(--second);
  274. }
  275. .chat-message-actions {
  276. display: flex;
  277. flex-direction: row-reverse;
  278. width: 100%;
  279. padding-top: 5px;
  280. box-sizing: border-box;
  281. font-size: 12px;
  282. }
  283. .chat-message-action-date {
  284. color: #aaa;
  285. }
  286. .chat-input-panel {
  287. width: 100%;
  288. padding: 20px;
  289. box-sizing: border-box;
  290. flex-direction: column;
  291. }
  292. @mixin single-line {
  293. white-space: nowrap;
  294. overflow: hidden;
  295. text-overflow: ellipsis;
  296. }
  297. .prompt-hints {
  298. min-height: 20px;
  299. width: 100%;
  300. max-height: 50vh;
  301. overflow: auto;
  302. display: flex;
  303. flex-direction: column-reverse;
  304. background-color: var(--white);
  305. border: var(--border-in-light);
  306. border-radius: 10px;
  307. margin-bottom: 10px;
  308. box-shadow: var(--shadow);
  309. .prompt-hint {
  310. color: var(--black);
  311. padding: 6px 10px;
  312. animation: slide-in ease 0.3s;
  313. cursor: pointer;
  314. transition: all ease 0.3s;
  315. border: transparent 1px solid;
  316. margin: 4px;
  317. border-radius: 8px;
  318. &:not(:last-child) {
  319. margin-top: 0;
  320. }
  321. .hint-title {
  322. font-size: 12px;
  323. font-weight: bolder;
  324. @include single-line();
  325. }
  326. .hint-content {
  327. font-size: 12px;
  328. @include single-line();
  329. }
  330. &-selected,
  331. &:hover {
  332. border-color: var(--primary);
  333. }
  334. }
  335. }
  336. .chat-input-panel-inner {
  337. display: flex;
  338. flex: 1;
  339. }
  340. .chat-input {
  341. height: 100%;
  342. width: 100%;
  343. border-radius: 10px;
  344. border: var(--border-in-light);
  345. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  346. background-color: var(--white);
  347. color: var(--black);
  348. font-family: inherit;
  349. padding: 10px 14px 50px;
  350. resize: none;
  351. outline: none;
  352. }
  353. @media only screen and (max-width: 600px) {
  354. .chat-input {
  355. font-size: 16px;
  356. }
  357. }
  358. .chat-input:focus {
  359. border: 1px solid var(--primary);
  360. }
  361. .chat-input-send {
  362. background-color: var(--primary);
  363. color: white;
  364. position: absolute;
  365. right: 30px;
  366. bottom: 30px;
  367. }
  368. .export-content {
  369. white-space: break-spaces;
  370. }
  371. .loading-content {
  372. display: flex;
  373. flex-direction: column;
  374. justify-content: center;
  375. align-items: center;
  376. height: 100%;
  377. width: 100%;
  378. }