home.module.scss 5.2 KB

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