home.module.scss 4.6 KB

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