feat: новая функция

This commit is contained in:
2025-10-13 22:41:49 +03:00
parent 34666b44d8
commit 0e028bc722
83 changed files with 1595 additions and 6093 deletions

View File

@@ -73,7 +73,13 @@
<span class="feature"> Безопасно</span>
<span class="feature"> Для локальных и VPS</span>
</div>
<button class="btn-primary" @click="goToWebSsh">Подробнее</button>
<button
class="btn-primary"
@click="canManageSettings ? goToWebSsh() : null"
:disabled="!canManageSettings"
>
Подробнее
</button>
</div>
<!-- Модальное окно с формой WEB SSH -->
@@ -93,9 +99,23 @@ import { useRouter } from 'vue-router';
import { useAuthContext } from '@/composables/useAuth';
import { usePermissions } from '@/composables/usePermissions';
import NoAccessModal from '@/components/NoAccessModal.vue';
import { onMounted } from 'vue';
// Подписываемся на централизованные события очистки и обновления данных
onMounted(() => {
window.addEventListener('clear-application-data', () => {
console.log('[InterfaceSettingsView] Clearing interface data');
// Очищаем данные при выходе из системы
// InterfaceSettingsView не нуждается в очистке данных
});
window.addEventListener('refresh-application-data', () => {
console.log('[InterfaceSettingsView] Refreshing interface data');
// InterfaceSettingsView не нуждается в обновлении данных
});
});
import { ref } from 'vue';
const router = useRouter();
const { isAdmin } = useAuthContext();
const { canManageSettings } = usePermissions();
const goBack = () => router.push('/settings');

View File

@@ -28,7 +28,7 @@
</template>
<script setup>
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import { useRouter } from 'vue-router';
import WebSshForm from '@/components/WebSshForm.vue';
import Header from '@/components/Header.vue';
@@ -57,6 +57,20 @@ const toggleSidebar = () => {
const auth = useAuthContext();
const isAuthenticated = auth.isAuthenticated.value;
const identities = auth.identities?.value || [];
// Подписываемся на централизованные события очистки и обновления данных
onMounted(() => {
window.addEventListener('clear-application-data', () => {
console.log('[InterfaceWebSshView] Clearing WebSSH data');
// Очищаем данные при выходе из системы
// InterfaceWebSshView не нуждается в очистке данных
});
window.addEventListener('refresh-application-data', () => {
console.log('[InterfaceWebSshView] Refreshing WebSSH data');
// InterfaceWebSshView не нуждается в обновлении данных
});
});
const tokenBalances = auth.tokenBalances?.value || [];
const isLoadingTokens = false;
</script>