home.module.scss 7.1 KB

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