+
Громкость:
50%
-
+
- Профиль звука:
+ Профиль:
-
@@ -59,6 +61,7 @@
const soundVolumeSlider = document.getElementById("soundVolumeSlider");
const soundVolumeValue = document.getElementById("soundVolumeValue");
const soundProfileSelect = document.getElementById("soundProfileSelect");
+ const minTradeSizeInput = document.getElementById("minTradeSizeInput");
const notificationContainer = document.getElementById("notificationContainer");
let isSoundEnabled = localStorage.getItem("realtime_sound_enabled") !== "false";
@@ -74,10 +77,15 @@
// Load sound profile with fallback to 'chime'
let soundProfile = localStorage.getItem("realtime_sound_profile") || "chime";
+ // Load minimum trade size threshold in USDT (default 0)
+ let minTradeSize = parseFloat(localStorage.getItem("realtime_min_trade_size") || "0");
+ if (isNaN(minTradeSize) || minTradeSize < 0) minTradeSize = 0;
+
// Sync UI controls with values
soundVolumeSlider.value = soundVolume;
soundVolumeValue.textContent = Math.round(soundVolume * 100) + "%";
soundProfileSelect.value = soundProfile;
+ if (minTradeSizeInput) minTradeSizeInput.value = minTradeSize;
updateSoundButtonUI();
@@ -206,6 +214,16 @@
playNotificationSound();
});
+ // Min trade size threshold input handling
+ if (minTradeSizeInput) {
+ minTradeSizeInput.addEventListener("input", function () {
+ let val = parseFloat(minTradeSizeInput.value);
+ if (isNaN(val) || val < 0) val = 0;
+ minTradeSize = val;
+ localStorage.setItem("realtime_min_trade_size", minTradeSize);
+ });
+ }
+
// Sound profile select handling
soundProfileSelect.addEventListener("change", function () {
soundProfile = soundProfileSelect.value;
@@ -332,8 +350,11 @@
knownTrades.add(tradeId);
if (!isFirstLoad) {
- hasNewTrade = true;
- showToastNotification(trade);
+ const tradeValue = (parseFloat(trade.Amount) || 0) * (parseFloat(trade.SellPrice) || parseFloat(trade.AveragePrice) || 0);
+ if (minTradeSize === 0 || tradeValue >= minTradeSize) {
+ hasNewTrade = true;
+ showToastNotification(trade);
+ }
}
}
});
diff --git a/IntelliTrader.Web/Views/Home/Settings.cshtml b/IntelliTrader.Web/Views/Home/Settings.cshtml
index 88c654d..26fd1a3 100644
--- a/IntelliTrader.Web/Views/Home/Settings.cshtml
+++ b/IntelliTrader.Web/Views/Home/Settings.cshtml
@@ -49,6 +49,39 @@