Spaces:
Running
Running
Update src/templates/dashboard/chart_browser.html
Browse files
src/templates/dashboard/chart_browser.html
CHANGED
|
@@ -20,8 +20,9 @@
|
|
| 20 |
<section class="card cb-connect">
|
| 21 |
<h2 class="cb-connect-title">Connect Google Drive</h2>
|
| 22 |
<p class="cb-muted">
|
| 23 |
-
The Browser needs
|
| 24 |
-
|
|
|
|
| 25 |
</p>
|
| 26 |
<a href="{{ url_for('chart_browser.connect') }}" class="cb-btn cb-btn-primary cb-btn-block">CONNECT GOOGLE DRIVE</a>
|
| 27 |
</section>
|
|
@@ -61,6 +62,11 @@
|
|
| 61 |
</div>
|
| 62 |
</div>
|
| 63 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
<div class="cb-stage" id="cb-stage" tabindex="0">
|
| 65 |
<div class="cb-slide" id="cb-slide">
|
| 66 |
<img class="cb-img" id="cb-img" alt="" draggable="false">
|
|
@@ -121,6 +127,15 @@
|
|
| 121 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>
|
| 122 |
<span>Refresh</span>
|
| 123 |
</button>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
<button type="button" class="cb-tool" id="cb-clear" title="Delete temporary copies of images">
|
| 125 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6"></path><path d="M14 11v6"></path></svg>
|
| 126 |
<span>Clear cache</span>
|
|
@@ -135,12 +150,15 @@
|
|
| 135 |
<script>
|
| 136 |
window.CB = {
|
| 137 |
csrf: "{{ csrf_token() }}",
|
|
|
|
| 138 |
lastFolder: {{ last_folder|tojson }},
|
| 139 |
urls: {
|
| 140 |
folders: "{{ url_for('chart_browser.api_folders') }}",
|
| 141 |
images: "{{ url_for('chart_browser.api_images') }}",
|
| 142 |
image: "{{ url_for('chart_browser.api_image', file_id='FILE_ID') }}",
|
| 143 |
clearCache: "{{ url_for('chart_browser.api_clear_cache') }}",
|
|
|
|
|
|
|
| 144 |
connect: "{{ url_for('chart_browser.connect') }}"
|
| 145 |
}
|
| 146 |
};
|
|
|
|
| 20 |
<section class="card cb-connect">
|
| 21 |
<h2 class="cb-connect-title">Connect Google Drive</h2>
|
| 22 |
<p class="cb-muted">
|
| 23 |
+
The Browser needs access to your Drive to list your folders, show the images inside them, and let you
|
| 24 |
+
<strong>upload</strong> new charts or <strong>delete</strong> ones you no longer need (deleted images go to your Drive trash).
|
| 25 |
+
It only changes anything when you press Upload or Delete. This is separate from the Trading Journal connection.
|
| 26 |
</p>
|
| 27 |
<a href="{{ url_for('chart_browser.connect') }}" class="cb-btn cb-btn-primary cb-btn-block">CONNECT GOOGLE DRIVE</a>
|
| 28 |
</section>
|
|
|
|
| 62 |
</div>
|
| 63 |
</div>
|
| 64 |
|
| 65 |
+
<div class="cb-banner" id="cb-write-banner" hidden>
|
| 66 |
+
<span>Reconnect Google Drive to enable upload & delete.</span>
|
| 67 |
+
<a href="{{ url_for('chart_browser.connect') }}" class="cb-btn cb-btn-primary">RECONNECT</a>
|
| 68 |
+
</div>
|
| 69 |
+
|
| 70 |
<div class="cb-stage" id="cb-stage" tabindex="0">
|
| 71 |
<div class="cb-slide" id="cb-slide">
|
| 72 |
<img class="cb-img" id="cb-img" alt="" draggable="false">
|
|
|
|
| 127 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"></polyline><path d="M20.49 15a9 9 0 1 1-2.12-9.36L23 10"></path></svg>
|
| 128 |
<span>Refresh</span>
|
| 129 |
</button>
|
| 130 |
+
<button type="button" class="cb-tool" id="cb-upload" title="Upload images to this folder" hidden>
|
| 131 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>
|
| 132 |
+
<span id="cb-upload-label">Upload</span>
|
| 133 |
+
</button>
|
| 134 |
+
<input type="file" id="cb-upload-input" accept="image/png,image/jpeg,image/webp,image/gif,image/bmp,image/avif" multiple hidden>
|
| 135 |
+
<button type="button" class="cb-tool cb-tool-danger" id="cb-delete" title="Move this image to the Drive trash" hidden>
|
| 136 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"></path></svg>
|
| 137 |
+
<span>Delete</span>
|
| 138 |
+
</button>
|
| 139 |
<button type="button" class="cb-tool" id="cb-clear" title="Delete temporary copies of images">
|
| 140 |
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"></path><path d="M10 11v6"></path><path d="M14 11v6"></path></svg>
|
| 141 |
<span>Clear cache</span>
|
|
|
|
| 150 |
<script>
|
| 151 |
window.CB = {
|
| 152 |
csrf: "{{ csrf_token() }}",
|
| 153 |
+
canWrite: {{ can_write|tojson }},
|
| 154 |
lastFolder: {{ last_folder|tojson }},
|
| 155 |
urls: {
|
| 156 |
folders: "{{ url_for('chart_browser.api_folders') }}",
|
| 157 |
images: "{{ url_for('chart_browser.api_images') }}",
|
| 158 |
image: "{{ url_for('chart_browser.api_image', file_id='FILE_ID') }}",
|
| 159 |
clearCache: "{{ url_for('chart_browser.api_clear_cache') }}",
|
| 160 |
+
upload: "{{ url_for('chart_browser.api_upload') }}",
|
| 161 |
+
remove: "{{ url_for('chart_browser.api_delete_image', file_id='FILE_ID') }}",
|
| 162 |
connect: "{{ url_for('chart_browser.connect') }}"
|
| 163 |
}
|
| 164 |
};
|