ваше сообщение коммита

This commit is contained in:
2026-03-02 12:33:16 +03:00
parent e48cbfe7e0
commit 857ea60e55
43 changed files with 62 additions and 131 deletions

View File

@@ -56,9 +56,15 @@
<router-link to="/settings" class="nav-link-btn" active-class="active">
<span>Настройки</span>
</router-link>
<router-link to="/repos" class="nav-link-btn" active-class="active">
<a
:href="giteaUrl"
target="_blank"
rel="noopener noreferrer"
class="nav-link-btn"
@click="closeSidebar"
>
<span>Репозитории</span>
</router-link>
</a>
</div>
<!-- Блок информации о пользователе или формы подключения -->
@@ -160,7 +166,7 @@
</template>
<script setup>
import { defineProps, defineEmits, ref, onMounted, onBeforeUnmount, watch } from 'vue';
import { defineProps, defineEmits, ref, computed, onMounted, onBeforeUnmount, watch } from 'vue';
import { useRouter } from 'vue-router';
import eventBus from '../utils/eventBus';
import EmailConnect from './identity/EmailConnect.vue';
@@ -183,6 +189,19 @@ const emit = defineEmits(['update:modelValue', 'wallet-auth', 'disconnect-wallet
const { deleteIdentity } = useAuthContext();
// URL страницы репозитория Docs (readme): локально — порт 3001; на продакшене — /gitea/
const giteaUrl = computed(() => {
if (typeof window === 'undefined') return '#';
const { hostname, protocol } = window.location;
const path = 'VC-HB3-Accelerator/Docs#readme';
const isLocal = hostname === 'localhost' || hostname === '127.0.0.1';
if (isLocal) {
const port = import.meta.env.VITE_GITEA_PORT || '3001';
return `${protocol}//${hostname}:${port}/${path}`;
}
return `${protocol}//${hostname}/gitea/${path}`;
});
// Подписываемся на централизованные события очистки и обновления данных
onMounted(() => {
window.addEventListener('clear-application-data', () => {

View File

@@ -44,11 +44,6 @@ const routes = [
name: 'crm',
component: () => import('../views/CrmView.vue'),
},
{
path: '/repos',
name: 'repos',
component: () => import('../views/GiteaIframeView.vue'),
},
{
path: '/settings',
name: 'settings',

View File

@@ -1,83 +0,0 @@
<!--
Copyright (c) 2024-2026 Тарабанов Александр Викторович
All rights reserved.
This software is proprietary and confidential.
Unauthorized copying, modification, or distribution is prohibited.
For licensing inquiries: info@hb3-accelerator.com
Website: https://hb3-accelerator.com
GitHub: https://github.com/VC-HB3-Accelerator
-->
<template>
<BaseLayout
:is-authenticated="isAuthenticated"
:identities="identities"
:token-balances="tokenBalances"
:is-loading-tokens="isLoadingTokens"
@auth-action-completed="$emit('auth-action-completed')"
>
<div class="gitea-page">
<iframe
class="gitea-iframe"
:src="giteaUrl"
title="Gitea — репозитории"
/>
</div>
</BaseLayout>
</template>
<script setup>
import { computed, defineProps } from 'vue';
import BaseLayout from '../components/BaseLayout.vue';
defineProps({
isAuthenticated: Boolean,
identities: Array,
tokenBalances: Object,
isLoadingTokens: Boolean,
});
// URL Gitea: локально — порт 3001; на продакшене — путь /gitea/ (прокси в nginx, один домен — нет разрыва соединения).
const giteaUrl = computed(() => {
if (typeof window === 'undefined') return '';
const { hostname, protocol } = window.location;
const isLocal = hostname === 'localhost' || hostname === '127.0.0.1';
if (isLocal) {
const port = import.meta.env.VITE_GITEA_PORT || '3001';
return `${protocol}//${hostname}:${port}`;
}
return `${protocol}//${hostname}/gitea/`;
});
</script>
<style scoped>
.gitea-page {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
margin: 0 -20px -20px -20px; /* компенсация padding main-content */
padding: 0;
}
.gitea-iframe {
flex: 1;
width: 100%;
border: none;
min-height: 400px;
}
@media (max-width: 768px) {
.gitea-page {
margin: 0 -10px -10px -10px;
}
}
@media (max-width: 480px) {
.gitea-page {
margin: 0 -10px -5px -10px;
}
}
</style>