refactor: move spa to frontend folder

This commit is contained in:
2025-10-27 12:32:38 +03:00
committed by Nikita Kiselev
parent 5681ac592a
commit 0cccc7e3d7
40 changed files with 1566 additions and 35 deletions

View File

@@ -0,0 +1,18 @@
(function() {
function injectVueScript() {
const script = document.createElement('script');
script.type = 'module';
//if (window.vueIntegration && window.vueIntegration.developmentEnv) {
script.src = 'http://localhost:3000/src/main.js';
//} else {
// script.src = '/path/to/built/main.js';
//}
document.body.appendChild(script);
}
if (document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', injectVueScript);
} else { // Документ уже загружен
injectVueScript();
}
})();

View File

@@ -48,6 +48,11 @@
</a>
</li>
{% endfor %}
<li>
<a href="#banners" data-toggle="tab">
Баннеры
</a>
</li>
</ul>
<div class="tab-content">
@@ -442,6 +447,16 @@
{% endfor %}
</div>
{% endfor %}
<div id="banners" class="tab-pane">
<script>
window.TeleCart = {
user_token: '{{ user_token }}',
banners: '{{ banners }}',
};
</script>
<div id="app">App Loading...</div>
</div>
</div>
</form>
</div>