global stocks frontend

This commit is contained in:
Justin 2023-09-25 17:43:59 +08:00 committed by GitHub
parent 1b8c948aaa
commit 5ee369e6ba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2067,6 +2067,7 @@
{%else%}
<li>Stocks</li>
<li>Global Stocks</li>
<li>Crypto</li>
<li>Forex</li>
<li>Commodities</li>
@ -2186,6 +2187,7 @@
<div class="col-auto">
<select id="drop" class="form-select">
<option value="1">Stocks</option>
<option value="27">Global Stocks</option>
<option value="2">Crypto</option>
<option value="3">Forex</option>
<option value="14">Commodities</option>
@ -2685,6 +2687,301 @@
</div>
<!-- Global Stocks -->
<div class="page" id="Page27" style="display: none">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-12">
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputScrollSpeedZ" class="col-form-label">Scroll Speed:</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeed27" class="form-select speed-select">
<option {%if globalstocks_settings.speed == 'medium' %} selected {% endif %}>Medium</option>
<option {%if globalstocks_settings.speed == 'slow' %} selected {% endif %}>Slow</option>
<option {%if globalstocks_settings.speed == 'fast' %} selected {% endif %}>Fast</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputScrollSpeedRowZ2" class="col-form-label">Scroll Speed (Row 2):</label>
</div>
<div class="col-auto">
<select id="inputScrollSpeedRow27" class="form-select speed-select">
<option {%if globalstocks_settings.speed2 == 'medium' %} selected {% endif %}>Medium</option>
<option {%if globalstocks_settings.speed2 == 'slow' %} selected {% endif %}>Slow</option>
<option {%if globalstocks_settings.speed2 == 'fast' %} selected {% endif %}>Fast</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Intro Transition:</label>
</div>
<div class="col-auto">
<select id="inputTransition27" class="form-select animation-select">
<option {%if globalstocks_settings.animation == 'down' %} selected {% endif %}>Down</option>
<option {%if globalstocks_settings.animation == 'up' %} selected {% endif %}>Up</option>
<option {%if globalstocks_settings.animation == 'continuous' %} selected {% endif %}>Continuous</option>
</select>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputTextZ" class="col-form-label">Stock Symbol:</label>
</div>
<div class="col-auto">
<input
oninput="this.value = this.value.toUpperCase()"
type="text"
id="globalstocks_symbol"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. 0001.HK"
/>
</div>
<div class="col-auto">
<button id="globalstocks_symbol_addbtn" class="btn set-btn">Add</button>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputText" class="col-form-label">Custom Logo:</label>
</div>
<div class="col-auto">
<input
type="file"
id="globalstocks-logo-upload-browse"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="Browse"
/>
</div>
<div class="col-auto">
<button id="globalstocks-logo-upload-btn" class="btn set-btn" onclick="uploadGlobalStockLogo()">
Add
</button>
</div>
<p id="globalstocklogoupload" style="color:red; display: none;">Global stock logo uploaded.</p>
</div>
<div id="limit-msg"></div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Percent Change</label>
</div>
<div class="col-auto">
<input
class="form-check-input percent-select"
type="checkbox"
value=""
id="globalstocks_percent"
{%if globalstocks_settings.percent%} checked {%endif%} />
</div>
</div>
<div class="row g-3 align-items-center left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Point Change</label>
</div>
<div class="col-auto">
<input
class="form-check-input point-select"
type="checkbox"
value=""
id="globalstocks_point"
{% if globalstocks_settings.point%} checked {%endif%} />
</div>
</div>
<div class="row g-3 align-items-center left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Day Lo, Hi, Vol</label>
</div>
<div class="col-auto">
<input
class="form-check-input lohivol-select"
type="checkbox"
value=""
id="globalstocks_lohivol"
{% if globalstocks_settings.lohivol%} checked {%endif%} />
</div>
</div>
<div class="row g-3 align-items-center left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Display Company Names</label>
</div>
<div class="col-auto">
<input
class="form-check-input name-select"
type="checkbox"
value=""
id="globalstocks_displayname"
{% if globalstocks_settings.display_name%} checked {%endif%}
/>
</div>
</div>
<div class="row g-3 align-items-center left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Display Company Logos</label>
</div>
<div class="col-auto">
<input
class="form-check-input logo-select"
type="checkbox"
value=""
id="globalstocks_displaylogos"
{% if globalstocks_settings.logos%} checked {%endif%} />
</div>
</div>
<div class="row g-3 align-items-center left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Display Feature Title</label>
</div>
<div class="col-auto">
<input
class="form-check-input title-select"
type="checkbox"
value=""
id="globalstocks_title"
{% if globalstocks_settings.title%} checked {%endif%}
/>
</div>
</div>
<div class="row g-3 align-items-center left-div">
<div class="col-auto">
<label for="inputTransitionZ" class="col-form-label">Display Portfolio</label>
</div>
<div class="col-auto">
<input
class="form-check-input portfolio-select"
type="checkbox"
value=""
id="globalstocks_portfolio"
{% if globalstocks_settings.chart%} checked {%endif%}
onclick="globalportfolioValidate()"
/>
</div>
</div>
<p id="demo-portfolio-globalstocks" style="display: none"></p>
<div id="globalstocks-portfolio" style="display: none;">
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputTextZ" class="col-form-label">Shares:</label>
</div>
<div class="col-auto">
<input
type="text"
id="globalstocks_port_shares"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. 200" />
</div>
<div class="col-auto">
<button id="update-globalstock-port-btn" class="btn set-btn" onclick="updateGlobalStockPorftolio()">Update Position</button>
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputTextZ" class="col-form-label">Avg Cost:</label>
</div>
<div class="col-auto">
<input
type="text"
id="globalstocks_port_cost"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. 152.45" />
</div>
</div>
<div class="row g-3 align-items-center mt-3 left-div">
<div class="col-auto">
<label for="inputTextZ" class="col-form-label">Date:</label>
</div>
<div class="col-auto">
<input
type="text"
id="globalstocks_port_date"
class="form-control"
aria-describedby="TextHelpInline"
placeholder="e.g. YYYY-MM-DD" />
</div>
<div class="col-auto">
<button id="remove-globalstock-port-btn" class="btn set-btn" onclick="removeGlobalStockPorftolio()">Remove Position</button>
</div>
<div id="updated-globalstock-p" style="display:none"><p id="globalstockupdated-p" style="color: red;">Global stock Position Updated!</p></div>
<div id="removed-globalstock-p" style="display:none"><p id="globalstockremoved-p" style="color: red;">Global stock Position Removed!</p></div>
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12">
<h6 class="mt-3">List:</h6>
<div class="features-div-two">
<ul
id="globalstocks-features"
class="display-features-list text-white symbol-list">
{% for f in globalstocks_settings.symbols %}
<li onclick="getGlobalStockSymbol(this.innerText)">{{f}}</li>
{% endfor%}
</ul>
</div>
</div>
<div class="col-lg-2 col-md-2 col-sm-12">
<div class="icons-list">
<i
id="globalstocks-increase-btn"
class="upbutton fa fa-chevron-up"
aria-hidden="true"
></i>
<br />
<br />
<i
id="globalstocks-decrease-btn"
class="downbutton fa fa-chevron-down"
aria-hidden="true"
></i>
<a style="position: relative; bottom: 30px; left: 10px">Sort Order</a>
<br />
<br />
<i id="globalstocks-remove-btn"
class="fa fa-minus"
aria-hidden="true"></i>
<span style="position: relative; bottom: 0; left: 10px" >Remove</span >
</div>
</div>
</div>
<div class="save-btn-div">
<a href="#" class="btn save-btn">Save</a>
</div>
</div>
<!-- Crypto -->