위젯 기능 추가
This commit is contained in:
@@ -0,0 +1,420 @@
|
||||
/* ── 플로팅 위젯 (always-on-top 팝업) ── */
|
||||
.fw-layer {
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
z-index: 13000;
|
||||
}
|
||||
|
||||
.fw-window {
|
||||
/* body 포털 — .se-page 테마 토큰 미상속 보정 */
|
||||
--se-bg: var(--bg);
|
||||
--se-bg-elevated: var(--bg2);
|
||||
--se-bg-muted: var(--bg3);
|
||||
--se-text: var(--text);
|
||||
--se-text-muted: var(--text2);
|
||||
--se-text-dim: var(--text3);
|
||||
--se-border: var(--border);
|
||||
--se-accent: var(--accent);
|
||||
--se-accent-hover: var(--accent-h);
|
||||
--se-up: var(--up);
|
||||
--se-down: var(--down);
|
||||
--se-buy: var(--gc-trade-buy, #ef5350);
|
||||
--se-sell: var(--gc-trade-sell, #4dabf7);
|
||||
--se-panel-card-bg: var(--bg2);
|
||||
--se-panel-card-border: var(--border);
|
||||
--se-center-bg: var(--bg2);
|
||||
--wd-slot-border: color-mix(in srgb, var(--border) 85%, transparent);
|
||||
--wd-slot-bg: color-mix(in srgb, var(--bg2) 92%, transparent);
|
||||
color: var(--text);
|
||||
|
||||
pointer-events: auto;
|
||||
position: fixed;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
border-radius: 10px;
|
||||
border: 1px solid color-mix(in srgb, var(--se-accent, #7aa2f7) 52%, transparent);
|
||||
background: var(--se-panel-card-bg, var(--bg2));
|
||||
box-shadow:
|
||||
0 0 0 1px color-mix(in srgb, var(--se-accent, #7aa2f7) 18%, transparent),
|
||||
0 16px 48px rgba(0, 0, 0, 0.55);
|
||||
overflow: hidden;
|
||||
min-width: 200px;
|
||||
min-height: 160px;
|
||||
max-width: calc(100vw - 12px);
|
||||
max-height: calc(100vh - 12px);
|
||||
}
|
||||
|
||||
.fw-window--focused {
|
||||
border-color: color-mix(in srgb, var(--se-accent, #7aa2f7) 68%, transparent);
|
||||
box-shadow:
|
||||
0 0 0 1px color-mix(in srgb, var(--se-accent, #7aa2f7) 28%, transparent),
|
||||
0 20px 56px rgba(0, 0, 0, 0.62);
|
||||
}
|
||||
|
||||
.fw-window-head {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 8px 6px 12px;
|
||||
border-bottom: 1px solid color-mix(in srgb, var(--se-border, var(--border)) 75%, transparent);
|
||||
background: linear-gradient(
|
||||
180deg,
|
||||
color-mix(in srgb, var(--se-accent, #3f7ef5) 16%, var(--bg2, #1e222d)) 0%,
|
||||
color-mix(in srgb, var(--se-accent, #3f7ef5) 5%, var(--bg2, #1e222d)) 55%,
|
||||
color-mix(in srgb, var(--bg2, #1e222d) 98%, var(--se-accent, #3f7ef5)) 100%
|
||||
);
|
||||
cursor: grab;
|
||||
user-select: none;
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.fw-window-head:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.fw-window-title {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: 0.72rem;
|
||||
font-weight: 700;
|
||||
color: var(--se-text, var(--text));
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.fw-window-close {
|
||||
flex-shrink: 0;
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
border: 1px solid color-mix(in srgb, var(--se-border) 80%, transparent);
|
||||
border-radius: 6px;
|
||||
background: color-mix(in srgb, var(--bg2) 90%, transparent);
|
||||
color: var(--se-text-muted, var(--text2));
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.fw-window-close:hover {
|
||||
border-color: #e74c3c;
|
||||
color: #e74c3c;
|
||||
background: color-mix(in srgb, #e74c3c 12%, transparent);
|
||||
}
|
||||
|
||||
.fw-window-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: grid;
|
||||
gap: 1px;
|
||||
padding: 0;
|
||||
background: color-mix(in srgb, var(--se-border) 40%, transparent);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fw-window-cell {
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--se-center-bg, var(--bg2));
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-slot {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-slot-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 리사이즈 핸들 — 좌·우 하단 (차트 툴바 위에 표시) */
|
||||
.fw-window-resize-layer {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 100;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.fw-window-resize-handle {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
touch-action: none;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.fw-window-resize-handle--se {
|
||||
right: 0;
|
||||
cursor: nwse-resize;
|
||||
background: radial-gradient(
|
||||
circle at 100% 100%,
|
||||
color-mix(in srgb, var(--bg2) 92%, transparent) 0%,
|
||||
transparent 72%
|
||||
);
|
||||
}
|
||||
|
||||
.fw-window-resize-handle--sw {
|
||||
left: 0;
|
||||
cursor: nesw-resize;
|
||||
background: radial-gradient(
|
||||
circle at 0% 100%,
|
||||
color-mix(in srgb, var(--bg2) 92%, transparent) 0%,
|
||||
transparent 72%
|
||||
);
|
||||
}
|
||||
|
||||
.fw-window-resize-handle::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
bottom: 4px;
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.fw-window-resize-handle--se::after {
|
||||
right: 4px;
|
||||
border-right: 2px solid color-mix(in srgb, var(--se-text-muted) 70%, transparent);
|
||||
border-bottom: 2px solid color-mix(in srgb, var(--se-text-muted) 70%, transparent);
|
||||
border-radius: 0 0 2px 0;
|
||||
}
|
||||
|
||||
.fw-window-resize-handle--sw::after {
|
||||
left: 4px;
|
||||
border-left: 2px solid color-mix(in srgb, var(--se-text-muted) 70%, transparent);
|
||||
border-bottom: 2px solid color-mix(in srgb, var(--se-text-muted) 70%, transparent);
|
||||
border-radius: 0 0 0 2px;
|
||||
}
|
||||
|
||||
.fw-window-resize-handle:hover::after,
|
||||
.fw-window--focused .fw-window-resize-handle::after {
|
||||
border-color: var(--se-accent, var(--accent));
|
||||
}
|
||||
|
||||
/* ── 내부 위젯 fit (리사이즈 시 영역 채움) ── */
|
||||
.fw-window-cell .wd-slot--filled {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host > *:only-child {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--panel > .wd-panel-header,
|
||||
.fw-window-cell .wd-widget-host--panel > .wd-panel-subline {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--panel > .wd-panel-body,
|
||||
.fw-window-cell .wd-widget-host--panel > .wd-mini-chart-wrap {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--chart,
|
||||
.fw-window-cell .wd-candle-chart {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fw-window-cell .vtd-card-chart-canvas,
|
||||
.fw-window-cell .slot-chart-wrap,
|
||||
.fw-window-cell .wd-candle-chart-canvas {
|
||||
flex: 1;
|
||||
min-height: 0 !important;
|
||||
height: auto !important;
|
||||
max-height: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-candle-chart-main {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--market .market-panel {
|
||||
height: 100% !important;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--market .mp-body,
|
||||
.fw-window-cell .wd-widget-host--market .mp-list {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--trade,
|
||||
.fw-window-cell .wd-widget-host--orderbook {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--trade > *,
|
||||
.fw-window-cell .wd-widget-host--orderbook > * {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--mini-chart .ptd-chart-wrap {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--mini-chart .ptd-chart-canvas {
|
||||
flex: 1;
|
||||
min-height: 0 !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
|
||||
.fw-window-cell .ptd-analysis-chart {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.fw-window-cell .ptd-analysis-chart .ptd-chart-canvas {
|
||||
max-height: none;
|
||||
min-height: 0;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-panel-body {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.fw-window-cell .wd-widget-host--history .ptd-trade-history-scroll {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* 레이아웃 선택 팝업 */
|
||||
.fw-layout-picker-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.fw-layout-picker-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
.fw-layout-option {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 12px 10px;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 10px;
|
||||
background: var(--bg3);
|
||||
cursor: pointer;
|
||||
color: var(--text);
|
||||
transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
|
||||
}
|
||||
|
||||
.fw-layout-option:hover {
|
||||
border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
|
||||
background: color-mix(in srgb, var(--bg3) 80%, var(--accent) 20%);
|
||||
box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 15%, transparent);
|
||||
}
|
||||
|
||||
.fw-layout-preview {
|
||||
display: grid;
|
||||
gap: 3px;
|
||||
width: 100%;
|
||||
max-width: 88px;
|
||||
aspect-ratio: 4 / 3;
|
||||
}
|
||||
|
||||
.fw-layout-preview-cell {
|
||||
border-radius: 3px;
|
||||
background: color-mix(in srgb, var(--accent) 22%, var(--bg2));
|
||||
border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
|
||||
}
|
||||
|
||||
.fw-layout-label {
|
||||
font-size: 0.78rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.fw-layout-desc {
|
||||
font-size: 0.62rem;
|
||||
color: var(--text3, var(--text2));
|
||||
}
|
||||
|
||||
/* 메뉴바 위젯 실행 버튼 */
|
||||
.tmb-floating-widget-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
padding: 0;
|
||||
border: 1px solid color-mix(in srgb, var(--se-border) 80%, transparent);
|
||||
border-radius: 8px;
|
||||
background: color-mix(in srgb, var(--se-accent, #3f7ef5) 10%, transparent);
|
||||
color: var(--se-accent, var(--accent));
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tmb-floating-widget-btn:hover {
|
||||
background: color-mix(in srgb, var(--se-accent, #3f7ef5) 20%, transparent);
|
||||
border-color: var(--se-accent, var(--accent));
|
||||
}
|
||||
|
||||
.tmb-floating-widget-btn--active {
|
||||
background: color-mix(in srgb, var(--se-accent, #3f7ef5) 28%, transparent);
|
||||
border-color: var(--se-accent, var(--accent));
|
||||
}
|
||||
|
||||
.tmb-floating-widget-count {
|
||||
position: absolute;
|
||||
top: -4px;
|
||||
right: -4px;
|
||||
min-width: 14px;
|
||||
height: 14px;
|
||||
padding: 0 3px;
|
||||
border-radius: 7px;
|
||||
background: var(--se-accent, #3f7ef5);
|
||||
color: #fff;
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
line-height: 14px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tmb-floating-widget-wrap {
|
||||
position: relative;
|
||||
display: inline-flex;
|
||||
}
|
||||
Reference in New Issue
Block a user