home.module.scss 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  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: 100vh;
  25. --window-content-width: calc(100% - var(--sidebar-width));
  26. @include container();
  27. max-width: 100vw;
  28. max-height: 100vh;
  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: 100vh;
  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. margin-bottom: 100px;
  184. }
  185. .chat-message {
  186. display: flex;
  187. flex-direction: row;
  188. }
  189. .chat-message-user {
  190. display: flex;
  191. flex-direction: row-reverse;
  192. }
  193. .chat-message-container {
  194. max-width: var(--message-max-width);
  195. display: flex;
  196. flex-direction: column;
  197. align-items: flex-start;
  198. animation: slide-in ease 0.3s;
  199. }
  200. .chat-message-user > .chat-message-container {
  201. align-items: flex-end;
  202. }
  203. .chat-message-avatar {
  204. margin-top: 20px;
  205. }
  206. .chat-message-status {
  207. font-size: 12px;
  208. color: #aaa;
  209. line-height: 1.5;
  210. margin-top: 5px;
  211. }
  212. .user-avtar {
  213. height: 30px;
  214. width: 30px;
  215. display: flex;
  216. align-items: center;
  217. justify-content: center;
  218. border: var(--border-in-light);
  219. box-shadow: var(--card-shadow);
  220. border-radius: 10px;
  221. }
  222. .chat-message-item {
  223. box-sizing: border-box;
  224. max-width: 100%;
  225. margin-top: 10px;
  226. border-radius: 10px;
  227. background-color: rgba(0, 0, 0, 0.05);
  228. padding: 10px;
  229. font-size: 14px;
  230. user-select: text;
  231. word-break: break-word;
  232. border: var(--border-in-light);
  233. }
  234. .chat-message-user > .chat-message-container > .chat-message-item {
  235. background-color: var(--second);
  236. }
  237. .chat-message-actions {
  238. display: flex;
  239. flex-direction: row-reverse;
  240. width: 100%;
  241. padding-top: 5px;
  242. box-sizing: border-box;
  243. }
  244. .chat-message-action-date {
  245. font-size: 12px;
  246. color: #aaa;
  247. }
  248. .chat-input-panel {
  249. position: absolute;
  250. bottom: 20px;
  251. display: flex;
  252. width: 100%;
  253. padding: 20px;
  254. box-sizing: border-box;
  255. }
  256. .chat-input-panel-inner {
  257. display: flex;
  258. flex: 1;
  259. }
  260. .chat-input {
  261. height: 100%;
  262. width: 100%;
  263. border-radius: 10px;
  264. border: var(--border-in-light);
  265. box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
  266. background-color: var(--white);
  267. color: var(--black);
  268. font-family: inherit;
  269. padding: 10px 14px;
  270. resize: none;
  271. outline: none;
  272. }
  273. @media only screen and (max-width: 600px) {
  274. .chat-input {
  275. font-size: 16px;
  276. }
  277. }
  278. .chat-input:focus {
  279. border: 1px solid var(--primary);
  280. }
  281. .chat-input-send {
  282. background-color: var(--primary);
  283. color: white;
  284. position: absolute;
  285. right: 30px;
  286. bottom: 10px;
  287. }
  288. .export-content {
  289. white-space: break-spaces;
  290. }
  291. .loading-content {
  292. display: flex;
  293. flex-direction: column;
  294. justify-content: center;
  295. align-items: center;
  296. height: 100%;
  297. width: 100%;
  298. }