home.module.scss 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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. .tight-container {
  22. --window-width: 100vw;
  23. --window-height: 100vh;
  24. --window-content-width: calc(100% - var(--sidebar-width));
  25. @include container();
  26. max-width: 100vw;
  27. max-height: 100vh;
  28. border-radius: 0;
  29. }
  30. .sidebar {
  31. top: 0;
  32. width: var(--sidebar-width);
  33. box-sizing: border-box;
  34. padding: 20px;
  35. background-color: var(--second);
  36. display: flex;
  37. flex-direction: column;
  38. box-shadow: inset -2px 0px 2px 0px rgb(0, 0, 0, 0.05);
  39. }
  40. .window-content {
  41. width: var(--window-content-width);
  42. height: 100%;
  43. }
  44. .mobile {
  45. display: none;
  46. }
  47. @media only screen and (max-width: 600px) {
  48. .container {
  49. min-height: unset;
  50. min-width: unset;
  51. max-height: unset;
  52. min-width: unset;
  53. border: 0;
  54. border-radius: 0;
  55. }
  56. .sidebar {
  57. position: absolute;
  58. left: -100%;
  59. z-index: 999;
  60. height: 100vh;
  61. transition: all ease 0.3s;
  62. box-shadow: none;
  63. }
  64. .sidebar-show {
  65. left: 0;
  66. }
  67. .mobile {
  68. display: block;
  69. }
  70. }
  71. .sidebar-header {
  72. position: relative;
  73. padding-top: 20px;
  74. padding-bottom: 20px;
  75. }
  76. .sidebar-logo {
  77. position: absolute;
  78. right: 0;
  79. bottom: 18px;
  80. }
  81. .sidebar-title {
  82. font-size: 20px;
  83. font-weight: bold;
  84. }
  85. .sidebar-sub-title {
  86. font-size: 12px;
  87. font-weight: 400px;
  88. }
  89. .sidebar-body {
  90. flex: 1;
  91. overflow: auto;
  92. }
  93. .chat-list {}
  94. .chat-item {
  95. padding: 10px 14px;
  96. background-color: var(--white);
  97. border-radius: 10px;
  98. margin-bottom: 10px;
  99. box-shadow: var(--card-shadow);
  100. transition: all 0.3s ease;
  101. cursor: pointer;
  102. user-select: none;
  103. border: 2px solid transparent;
  104. position: relative;
  105. overflow: hidden;
  106. }
  107. @keyframes slide-in {
  108. from {
  109. opacity: 0;
  110. transform: translateY(20px);
  111. }
  112. to {
  113. opacity: 1;
  114. transform: translateY(0px);
  115. }
  116. }
  117. .chat-item:hover {
  118. background-color: var(--hover-color);
  119. }
  120. .chat-item-selected {
  121. border-color: var(--primary);
  122. }
  123. .chat-item-title {
  124. font-size: 14px;
  125. font-weight: bolder;
  126. display: block;
  127. width: 200px;
  128. overflow: hidden;
  129. text-overflow: ellipsis;
  130. white-space: nowrap;
  131. }
  132. .chat-item-delete {
  133. position: absolute;
  134. top: 10px;
  135. right: -20px;
  136. transition: all ease 0.3s;
  137. opacity: 0;
  138. }
  139. .chat-item:hover>.chat-item-delete {
  140. opacity: 0.5;
  141. right: 10px;
  142. }
  143. .chat-item:hover>.chat-item-delete:hover {
  144. opacity: 1;
  145. }
  146. .chat-item-info {
  147. display: flex;
  148. justify-content: space-between;
  149. color: rgb(166, 166, 166);
  150. font-size: 12px;
  151. margin-top: 8px;
  152. }
  153. .chat-item-count {}
  154. .chat-item-date {}
  155. .sidebar-tail {
  156. display: flex;
  157. justify-content: space-between;
  158. padding-top: 20px;
  159. }
  160. .sidebar-actions {
  161. display: inline-flex;
  162. }
  163. .sidebar-action:not(:last-child) {
  164. margin-right: 15px;
  165. }
  166. .chat {
  167. display: flex;
  168. flex-direction: column;
  169. position: relative;
  170. height: 100%;
  171. }
  172. .chat-body {
  173. flex: 1;
  174. overflow: auto;
  175. padding: 20px;
  176. margin-bottom: 100px;
  177. }
  178. .chat-message {
  179. display: flex;
  180. flex-direction: row;
  181. }
  182. .chat-message-user {
  183. display: flex;
  184. flex-direction: row-reverse;
  185. }
  186. .chat-message-container {
  187. max-width: var(--message-max-width);
  188. display: flex;
  189. flex-direction: column;
  190. align-items: flex-start;
  191. animation: slide-in ease 0.3s;
  192. }
  193. .chat-message-user>.chat-message-container {
  194. align-items: flex-end;
  195. }
  196. .chat-message-avatar {
  197. margin-top: 20px;
  198. }
  199. .chat-message-status {
  200. font-size: 12px;
  201. color: #aaa;
  202. line-height: 1.5;
  203. margin-top: 5px;
  204. }
  205. .user-avtar {
  206. height: 30px;
  207. width: 30px;
  208. display: flex;
  209. align-items: center;
  210. justify-content: center;
  211. border: var(--border-in-light);
  212. box-shadow: var(--card-shadow);
  213. border-radius: 10px;
  214. }
  215. .chat-message-item {
  216. box-sizing: border-box;
  217. max-width: 100%;
  218. margin-top: 10px;
  219. border-radius: 10px;
  220. background-color: rgba(0, 0, 0, 0.05);
  221. padding: 10px;
  222. font-size: 14px;
  223. user-select: text;
  224. word-break: break-word;
  225. border: var(--border-in-light);
  226. }
  227. .chat-message-user>.chat-message-container>.chat-message-item {
  228. background-color: var(--second);
  229. }
  230. .chat-message-actions {
  231. display: flex;
  232. flex-direction: row-reverse;
  233. width: 100%;
  234. padding-top: 5px;
  235. box-sizing: border-box;
  236. }
  237. .chat-message-action-date {
  238. font-size: 12px;
  239. color: #aaa;
  240. }
  241. .chat-input-panel {
  242. position: absolute;
  243. bottom: 20px;
  244. display: flex;
  245. width: 100%;
  246. padding: 20px;
  247. box-sizing: border-box;
  248. }
  249. .chat-input-panel-inner {
  250. display: flex;
  251. flex: 1;
  252. }
  253. .chat-input {
  254. height: 100%;
  255. width: 100%;
  256. border-radius: 10px;
  257. border: var(--border-in-light);
  258. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  259. background-color: var(--white);
  260. color: var(--black);
  261. font-family: inherit;
  262. padding: 10px 14px;
  263. resize: none;
  264. outline: none;
  265. }
  266. @media only screen and (max-width: 600px) {
  267. .chat-input {
  268. font-size: 16px;
  269. }
  270. }
  271. .chat-input:focus {
  272. border: 1px solid var(--primary);
  273. }
  274. .chat-input-send {
  275. background-color: var(--primary);
  276. color: white;
  277. position: absolute;
  278. right: 30px;
  279. bottom: 10px;
  280. }
  281. .export-content {
  282. white-space: break-spaces;
  283. }
  284. .loading-content {
  285. display: flex;
  286. flex-direction: column;
  287. justify-content: center;
  288. align-items: center;
  289. height: 100%;
  290. width: 100%;
  291. }