home.module.scss 7.5 KB

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