some things only displayed optionally

This commit is contained in:
Chris Amow 2026-08-16 21:38:26 -05:00
parent baf2048867
commit 7f452703d3
2 changed files with 10 additions and 4 deletions

View file

@ -146,6 +146,7 @@ createApp({
const alertEarlyPoints = ref(null); const alertEarlyPoints = ref(null);
const animateCurrentPrice = ref(localStorage.getItem('chart-animate-current-price') !== 'false'); const animateCurrentPrice = ref(localStorage.getItem('chart-animate-current-price') !== 'false');
const autoScrollLivePrice = ref(localStorage.getItem('chart-auto-scroll-live-price') !== 'false'); const autoScrollLivePrice = ref(localStorage.getItem('chart-auto-scroll-live-price') !== 'false');
const extraDetail = ref(localStorage.getItem('chart-extra-detail') === 'true');
const optionPrefs = (() => { const optionPrefs = (() => {
try { return JSON.parse(localStorage.getItem('chart-es-options')) || {}; } try { return JSON.parse(localStorage.getItem('chart-es-options')) || {}; }
catch { return {}; } catch { return {}; }
@ -1206,6 +1207,10 @@ createApp({
if (chartApi) chartApi.setAutoScrollLivePrice(value); if (chartApi) chartApi.setAutoScrollLivePrice(value);
}); });
watch(extraDetail, value => {
localStorage.setItem('chart-extra-detail', String(value));
});
onMounted(async () => { onMounted(async () => {
chartApi = new ConfluenceChart(); chartApi = new ConfluenceChart();
// Deliberate debug handle. Chart geometry bugs are invisible from the // Deliberate debug handle. Chart geometry bugs are invisible from the
@ -1248,6 +1253,6 @@ createApp({
window.removeEventListener('keydown', handleKeydown); window.removeEventListener('keydown', handleKeydown);
}); });
return { status, price, sessionOpen, quoteChange, animateCurrentPrice, autoScrollLivePrice, barAge, dataUpdatedAt, buildStamp, timeframe, timeframes, drawingColors, drawingColorRows, drawingColorName, colorRowLabels, symbolChoices, selectedSymbol, symbolColor, symbolScale, symbolScales, symbolPanelOpen, prefs, clusters, clustersByPrice, events, diagnosticMode, captureBusy, captureDiagnostic, armedTool, drawName, drawColor, drawWidth, drawSide, snap, selectedDrawing, selectedDrawings, drawingList, startDrawingListResize, manualLines, hasDrawingSelection, allShownSelected, selectedAreHidden, alertPrice, alertNote, alertEarlyPoints, levelColor, levelWidth, addPriceAlert, armTool, selectTimeframe, allEnabled, toggleGroup, maAlertOn, toggleMaAlert, deleteSelected, deleteLine, toggleDrawingSelection, toggleSelectAll, toggleSelectedVisibility, renameLine, updateLineStyle, updateLevelNumber, setArmed, commentText, commentFloat, comments, drawings, filteredDrawings, drawingFilter, drawingKind, drawingTf, deleteDrawing, toggleComment, togglePinned, chooseSymbol, toggleSymbolPanel, startSymbolDrag, dropSymbol, optionExpirations, optionExpiryId, optionSide, optionMode, optionMin, optionMax, optionContracts, optionUnderlying, optionBusy, optionError, optionSearched, optionCopied, onOptionsToggle, searchOptions, copyOption }; return { status, price, sessionOpen, quoteChange, animateCurrentPrice, autoScrollLivePrice, extraDetail, barAge, dataUpdatedAt, buildStamp, timeframe, timeframes, drawingColors, drawingColorRows, drawingColorName, colorRowLabels, symbolChoices, selectedSymbol, symbolColor, symbolScale, symbolScales, symbolPanelOpen, prefs, clusters, clustersByPrice, events, diagnosticMode, captureBusy, captureDiagnostic, armedTool, drawName, drawColor, drawWidth, drawSide, snap, selectedDrawing, selectedDrawings, drawingList, startDrawingListResize, manualLines, hasDrawingSelection, allShownSelected, selectedAreHidden, alertPrice, alertNote, alertEarlyPoints, levelColor, levelWidth, addPriceAlert, armTool, selectTimeframe, allEnabled, toggleGroup, maAlertOn, toggleMaAlert, deleteSelected, deleteLine, toggleDrawingSelection, toggleSelectAll, toggleSelectedVisibility, renameLine, updateLineStyle, updateLevelNumber, setArmed, commentText, commentFloat, comments, drawings, filteredDrawings, drawingFilter, drawingKind, drawingTf, deleteDrawing, toggleComment, togglePinned, chooseSymbol, toggleSymbolPanel, startSymbolDrag, dropSymbol, optionExpirations, optionExpiryId, optionSide, optionMode, optionMin, optionMax, optionContracts, optionUnderlying, optionBusy, optionError, optionSearched, optionCopied, onOptionsToggle, searchOptions, copyOption };
}, },
}).mount('#app'); }).mount('#app');

View file

@ -26,9 +26,9 @@
</div> </div>
<div id="chart" @dragover.prevent @drop.prevent="dropSymbol"></div> <div id="chart" @dragover.prevent @drop.prevent="dropSymbol"></div>
<div class="statusbar"> <div class="statusbar">
<span>FEED <b>{{ status.stream }}</b></span> <span v-if="extraDetail">FEED <b>{{ status.stream }}</b></span>
<span>LAST BAR <b>{{ barAge }}</b></span> <span v-if="extraDetail">LAST BAR <b>{{ barAge }}</b></span>
<span>HELD <b>{{ status.bars_held?.[timeframe] || 0 }} {{ timeframe }}</b></span> <span v-if="extraDetail">HELD <b>{{ status.bars_held?.[timeframe] || 0 }} {{ timeframe }}</b></span>
<span v-if="armedTool === 'trendline'" class="arm-hint">Drag on the chart from one point to the other</span> <span v-if="armedTool === 'trendline'" class="arm-hint">Drag on the chart from one point to the other</span>
<span v-else-if="armedTool === 'level'" class="arm-hint">Click or drag on the chart to set the price</span> <span v-else-if="armedTool === 'level'" class="arm-hint">Click or drag on the chart to set the price</span>
<span v-else-if="selectedDrawing" class="arm-hint">Drawing selected — Delete removes it</span> <span v-else-if="selectedDrawing" class="arm-hint">Drawing selected — Delete removes it</span>
@ -59,6 +59,7 @@
<summary>Config</summary> <summary>Config</summary>
<label><input type="checkbox" v-model="animateCurrentPrice"> Animate current price</label> <label><input type="checkbox" v-model="animateCurrentPrice"> Animate current price</label>
<label><input type="checkbox" v-model="autoScrollLivePrice"> Autoscroll to live price</label> <label><input type="checkbox" v-model="autoScrollLivePrice"> Autoscroll to live price</label>
<label><input type="checkbox" v-model="extraDetail"> Extra detail</label>
</details> </details>
<details class="sidebar-section tools-section" open> <details class="sidebar-section tools-section" open>
<summary>Tools</summary> <summary>Tools</summary>