|
37 | 37 | {
|
38 | 38 | pair_supported = false
|
39 | 39 | selected_testcoin = left_ticker
|
| 40 | + console.log("no chart, testcoin", selected_testcoin) |
40 | 41 | return
|
41 | 42 | }
|
42 | 43 | if (General.is_testcoin(right_ticker))
|
43 | 44 | {
|
44 | 45 | pair_supported = false
|
45 | 46 | selected_testcoin = right_ticker
|
| 47 | + console.log("no chart, testcoin", selected_testcoin) |
46 | 48 | return
|
47 | 49 | }
|
48 | 50 |
|
|
52 | 54 | {
|
53 | 55 | pair_supported = true
|
54 | 56 | symbol = rel_ticker+"-"+base_ticker
|
| 57 | + console.log("symbol", symbol) |
| 58 | + console.log("loaded_symbol", loaded_symbol) |
| 59 | + |
55 | 60 | if (symbol === loaded_symbol && !force)
|
56 | 61 | {
|
57 | 62 | webEngineViewPlaceHolder.visible = true
|
| 63 | + console.log("symbol === loaded_symbol, ok") |
58 | 64 | return
|
59 | 65 | }
|
60 | 66 | chart_html = `
|
|
64 | 70 | transform: scale(${Math.min(scale_x, scale_y)});
|
65 | 71 | transform-origin: top left;
|
66 | 72 | }
|
| 73 | + a { pointer-events: none; } |
67 | 74 | </style>
|
68 | 75 | <script defer src="https://www.livecoinwatch.com/static/lcw-widget.js"></script>
|
69 | 76 | <div class="livecoinwatch-widget-1" lcw-coin="${rel_ticker}" lcw-base="${base_ticker}" lcw-secondary="USDC" lcw-period="w" lcw-color-tx="${Dex.CurrentTheme.foregroundColor}" lcw-color-pr="#58c7c5" lcw-color-bg="${Dex.CurrentTheme.comboBoxBackgroundColor}" lcw-border-w="0" lcw-digits="8" ></div>
|
70 | 77 | `
|
71 | 78 | }
|
72 | 79 | }
|
73 |
| - // console.log(chart_html) |
| 80 | + console.log(chart_html) |
74 | 81 |
|
75 | 82 | if (chart_html == "")
|
76 | 83 | {
|
|
84 | 91 | if (!symbol)
|
85 | 92 | {
|
86 | 93 | pair_supported = false
|
| 94 | + console.log("pair not supported", pair, pair_reversed) |
87 | 95 | return
|
88 | 96 | }
|
89 | 97 |
|
|
165 | 173 | DefaultText
|
166 | 174 | {
|
167 | 175 | visible: pair_supported
|
168 |
| - text_value: qsTr("Loading market data") + "..." |
| 176 | + text_value: qsTr("Loading pair chart data") + "..." |
169 | 177 | }
|
170 | 178 |
|
171 | 179 | DefaultText
|
|
190 | 198 | id: webEngineViewPlaceHolder
|
191 | 199 | anchors.fill: parent
|
192 | 200 | anchors.centerIn: parent
|
193 |
| - visible: false |
| 201 | + visible: true |
194 | 202 |
|
195 | 203 | Component.onCompleted:
|
196 | 204 | {
|
@@ -219,6 +227,16 @@ Item
|
219 | 227 | }
|
220 | 228 | }
|
221 | 229 |
|
| 230 | + MouseArea { |
| 231 | + id: chart_mousearea |
| 232 | + anchors.fill: webEngineViewPlaceHolder |
| 233 | + onClicked: { |
| 234 | + if (webEngineView.visible) { |
| 235 | + Qt.openUrlExternally("https://www.livecoinwatch.com") |
| 236 | + } |
| 237 | + } |
| 238 | + } |
| 239 | + |
222 | 240 | Connections
|
223 | 241 | {
|
224 | 242 | target: app
|
|
0 commit comments