trading-chart.scss 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. .trading-chart {
  2. display: flex;
  3. flex-direction: column;
  4. background: var(--bg-page);
  5. height: 100%;
  6. &.fullscreen {
  7. position: fixed;
  8. top: 0;
  9. left: 0;
  10. right: 0;
  11. bottom: 0;
  12. z-index: 9999;
  13. }
  14. .chart-toolbar {
  15. display: flex;
  16. align-items: center;
  17. padding: 6px 12px;
  18. border-bottom: 1px solid var(--bg-subtle);
  19. overflow-x: auto;
  20. flex-wrap: nowrap;
  21. gap: 8px;
  22. flex-shrink: 0;
  23. &::-webkit-scrollbar {
  24. height: 0;
  25. }
  26. .interval-buttons {
  27. display: flex;
  28. gap: 2px;
  29. overflow-x: auto;
  30. cursor: grab;
  31. touch-action: pan-y;
  32. &::-webkit-scrollbar {
  33. height: 0;
  34. }
  35. }
  36. .interval-btn {
  37. padding: 4px 10px;
  38. font-size: 0.75rem;
  39. font-weight: 500;
  40. color: var(--text-secondary);
  41. background: transparent;
  42. border: 1px solid transparent;
  43. border-radius: 3px;
  44. cursor: pointer;
  45. white-space: nowrap;
  46. transition: all 0.15s;
  47. &:hover {
  48. background: var(--bg-subtle);
  49. color: var(--text-primary);
  50. }
  51. &.active {
  52. background: var(--brand-orange);
  53. color: #fff;
  54. border-color: var(--brand-orange);
  55. }
  56. }
  57. .chart-toolbar-right {
  58. display: flex;
  59. align-items: center;
  60. gap: 8px;
  61. margin-left: auto;
  62. flex-shrink: 0;
  63. }
  64. .ma-buttons {
  65. display: flex;
  66. gap: 4px;
  67. flex-shrink: 0;
  68. }
  69. .ma-btn {
  70. padding: 3px 8px;
  71. font-size: 0.7rem;
  72. font-weight: 600;
  73. color: var(--text-muted);
  74. background: transparent;
  75. border: 1px solid var(--border-default);
  76. border-radius: 3px;
  77. cursor: pointer;
  78. white-space: nowrap;
  79. transition: all 0.15s;
  80. &:hover {
  81. border-color: #bbb;
  82. color: var(--text-secondary);
  83. }
  84. &.active {
  85. color: var(--ma-color);
  86. border-color: var(--ma-color);
  87. background: rgba(0, 0, 0, 0.03);
  88. }
  89. }
  90. .fullscreen-btn {
  91. display: flex;
  92. align-items: center;
  93. justify-content: center;
  94. width: 28px;
  95. height: 28px;
  96. border: 1px solid var(--border-default);
  97. border-radius: 3px;
  98. background: transparent;
  99. cursor: pointer;
  100. font-size: 1rem;
  101. color: var(--text-secondary);
  102. transition: all 0.15s;
  103. &:hover {
  104. border-color: #bbb;
  105. background: var(--bg-subtle);
  106. color: var(--text-primary);
  107. }
  108. }
  109. }
  110. .chart-container {
  111. position: relative;
  112. width: 100%;
  113. flex: 1;
  114. min-height: 0;
  115. .chart-loading {
  116. position: absolute;
  117. top: 50%;
  118. left: 50%;
  119. transform: translate(-50%, -50%);
  120. color: var(--text-muted);
  121. font-size: 0.875rem;
  122. z-index: 1;
  123. }
  124. }
  125. }