ваше сообщение коммита
This commit is contained in:
122
frontend/src/components/ContactTable.vue
Normal file
122
frontend/src/components/ContactTable.vue
Normal file
@@ -0,0 +1,122 @@
|
||||
<template>
|
||||
<div class="contact-table-modal">
|
||||
<div class="contact-table-header">
|
||||
<h2>Контакты</h2>
|
||||
<button class="close-btn" @click="$emit('close')">×</button>
|
||||
</div>
|
||||
<table class="contact-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Имя</th>
|
||||
<th>Email</th>
|
||||
<th>Telegram</th>
|
||||
<th>Кошелек</th>
|
||||
<th>Дата создания</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="contact in contacts" :key="contact.id">
|
||||
<td>{{ contact.name || '-' }}</td>
|
||||
<td>{{ contact.email || '-' }}</td>
|
||||
<td>{{ contact.telegram || '-' }}</td>
|
||||
<td>{{ contact.wallet || '-' }}</td>
|
||||
<td>{{ formatDate(contact.created_at) }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { defineProps } from 'vue';
|
||||
const props = defineProps({
|
||||
contacts: { type: Array, required: true }
|
||||
});
|
||||
function formatDate(date) {
|
||||
if (!date) return '-';
|
||||
return new Date(date).toLocaleString();
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.contact-table-modal {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 32px rgba(0,0,0,0.12);
|
||||
padding: 32px 24px 24px 24px;
|
||||
max-width: 950px;
|
||||
margin: 40px auto;
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.contact-table-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.close-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 2rem;
|
||||
cursor: pointer;
|
||||
color: #bbb;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.close-btn:hover {
|
||||
color: #333;
|
||||
}
|
||||
.contact-table {
|
||||
width: 100%;
|
||||
border-collapse: separate;
|
||||
border-spacing: 0;
|
||||
background: #fff;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.04);
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
.contact-table thead th {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
background: #f5f7fa;
|
||||
font-weight: 700;
|
||||
padding: 14px 12px;
|
||||
border-bottom: 2px solid #e5e7eb;
|
||||
z-index: 2;
|
||||
}
|
||||
.contact-table tbody tr {
|
||||
transition: background 0.18s;
|
||||
}
|
||||
.contact-table tbody tr:nth-child(even) {
|
||||
background: #f8fafc;
|
||||
}
|
||||
.contact-table tbody tr:hover {
|
||||
background: #e6f7ff;
|
||||
}
|
||||
.contact-table td {
|
||||
padding: 12px 12px;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
vertical-align: middle;
|
||||
word-break: break-word;
|
||||
}
|
||||
.contact-table th:first-child, .contact-table td:first-child {
|
||||
border-top-left-radius: 8px;
|
||||
}
|
||||
.contact-table th:last-child, .contact-table td:last-child {
|
||||
border-top-right-radius: 8px;
|
||||
}
|
||||
@media (max-width: 700px) {
|
||||
.contact-table-modal {
|
||||
padding: 12px 2px;
|
||||
max-width: 100vw;
|
||||
}
|
||||
.contact-table th, .contact-table td {
|
||||
padding: 8px 4px;
|
||||
font-size: 0.95rem;
|
||||
}
|
||||
.contact-table-header h2 {
|
||||
font-size: 1.1rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
623
frontend/src/components/DleManagement.vue
Normal file
623
frontend/src/components/DleManagement.vue
Normal file
@@ -0,0 +1,623 @@
|
||||
<template>
|
||||
<div class="dle-management-modal">
|
||||
<div class="dle-management-header">
|
||||
<h2>Ваши DLE</h2>
|
||||
<button class="close-btn" @click="$emit('close')">×</button>
|
||||
</div>
|
||||
<div class="dle-list-section">
|
||||
<div v-if="dleList.length === 0" class="no-dle-message">
|
||||
<p>У вас пока нет созданных DLE.</p>
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="dle-list">
|
||||
<div v-for="(dle, index) in dleList" :key="index" class="dle-card"
|
||||
:class="{ 'active': selectedDleIndex === index }"
|
||||
@click="selectDle(index)">
|
||||
<h3>{{ dle.name }} ({{ dle.symbol }})</h3>
|
||||
<p><strong>Адрес:</strong> {{ shortenAddress(dle.tokenAddress) }}</p>
|
||||
<p><strong>Местонахождение:</strong> {{ dle.location }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="selectedDle" class="dle-details-section">
|
||||
<h2>Управление "{{ selectedDle.name }}"</h2>
|
||||
<div class="dle-tabs">
|
||||
<div class="tab-header">
|
||||
<div class="tab-button" :class="{ 'active': activeTab === 'info' }" @click="activeTab = 'info'">
|
||||
<i class="fas fa-info-circle"></i> Основная информация
|
||||
</div>
|
||||
<div class="tab-button" :class="{ 'active': activeTab === 'proposals' }" @click="activeTab = 'proposals'">
|
||||
<i class="fas fa-tasks"></i> Предложения
|
||||
</div>
|
||||
<div class="tab-button" :class="{ 'active': activeTab === 'governance' }" @click="activeTab = 'governance'">
|
||||
<i class="fas fa-balance-scale"></i> Управление
|
||||
</div>
|
||||
<div class="tab-button" :class="{ 'active': activeTab === 'modules' }" @click="activeTab = 'modules'">
|
||||
<i class="fas fa-puzzle-piece"></i> Модули
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" v-if="activeTab === 'info'">
|
||||
<div class="info-card">
|
||||
<h3>Основная информация</h3>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Название:</span>
|
||||
<span class="info-value">{{ selectedDle.name }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Символ токена:</span>
|
||||
<span class="info-value">{{ selectedDle.symbol }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Местонахождение:</span>
|
||||
<span class="info-value">{{ selectedDle.location }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Коды деятельности:</span>
|
||||
<span class="info-value">{{ selectedDle.isicCodes && selectedDle.isicCodes.length ? selectedDle.isicCodes.join(', ') : 'Не указаны' }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Дата создания:</span>
|
||||
<span class="info-value">{{ formatDate(selectedDle.creationTimestamp) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contract-cards">
|
||||
<div class="contract-card">
|
||||
<h4>Токен управления</h4>
|
||||
<p class="address">{{ selectedDle.tokenAddress }}</p>
|
||||
<div class="contract-actions">
|
||||
<button class="btn btn-sm btn-secondary" @click="copyToClipboard(selectedDle.tokenAddress)">
|
||||
<i class="fas fa-copy"></i> Копировать адрес
|
||||
</button>
|
||||
<button class="btn btn-sm btn-info" @click="viewOnExplorer(selectedDle.tokenAddress)">
|
||||
<i class="fas fa-external-link-alt"></i> Обзор
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contract-card">
|
||||
<h4>Таймлок</h4>
|
||||
<p class="address">{{ selectedDle.timelockAddress }}</p>
|
||||
<div class="contract-actions">
|
||||
<button class="btn btn-sm btn-secondary" @click="copyToClipboard(selectedDle.timelockAddress)">
|
||||
<i class="fas fa-copy"></i> Копировать адрес
|
||||
</button>
|
||||
<button class="btn btn-sm btn-info" @click="viewOnExplorer(selectedDle.timelockAddress)">
|
||||
<i class="fas fa-external-link-alt"></i> Обзор
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contract-card">
|
||||
<h4>Governor</h4>
|
||||
<p class="address">{{ selectedDle.governorAddress }}</p>
|
||||
<div class="contract-actions">
|
||||
<button class="btn btn-sm btn-secondary" @click="copyToClipboard(selectedDle.governorAddress)">
|
||||
<i class="fas fa-copy"></i> Копировать адрес
|
||||
</button>
|
||||
<button class="btn btn-sm btn-info" @click="viewOnExplorer(selectedDle.governorAddress)">
|
||||
<i class="fas fa-external-link-alt"></i> Обзор
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" v-if="activeTab === 'proposals'">
|
||||
<h3>Предложения</h3>
|
||||
<div class="proposals-actions">
|
||||
<button class="btn btn-primary" @click="showCreateProposalForm = true">
|
||||
<i class="fas fa-plus"></i> Создать предложение
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="showCreateProposalForm" class="create-proposal-form">
|
||||
<h4>Новое предложение</h4>
|
||||
<div class="form-group">
|
||||
<label for="proposalTitle">Заголовок:</label>
|
||||
<input type="text" id="proposalTitle" v-model="newProposal.title" class="form-control">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="proposalDescription">Описание:</label>
|
||||
<textarea id="proposalDescription" v-model="newProposal.description" class="form-control" rows="3"></textarea>
|
||||
</div>
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-success" @click="createProposal" :disabled="isCreatingProposal">
|
||||
<i class="fas fa-paper-plane"></i> {{ isCreatingProposal ? 'Отправка...' : 'Отправить' }}
|
||||
</button>
|
||||
<button class="btn btn-secondary" @click="showCreateProposalForm = false">
|
||||
<i class="fas fa-times"></i> Отмена
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="proposals-list">
|
||||
<p v-if="proposals.length === 0">Предложений пока нет</p>
|
||||
<div v-else v-for="(proposal, index) in proposals" :key="index" class="proposal-card">
|
||||
<h4>{{ proposal.title }}</h4>
|
||||
<p>{{ proposal.description }}</p>
|
||||
<div class="proposal-status" :class="proposal.status">
|
||||
{{ getProposalStatusText(proposal.status) }}
|
||||
</div>
|
||||
<div class="proposal-actions">
|
||||
<button class="btn btn-sm btn-primary" @click="voteForProposal(proposal.id, true)" :disabled="!canVote(proposal)">
|
||||
<i class="fas fa-thumbs-up"></i> За
|
||||
</button>
|
||||
<button class="btn btn-sm btn-danger" @click="voteForProposal(proposal.id, false)" :disabled="!canVote(proposal)">
|
||||
<i class="fas fa-thumbs-down"></i> Против
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" v-if="activeTab === 'governance'">
|
||||
<h3>Управление</h3>
|
||||
<div class="governance-info">
|
||||
<div class="info-card">
|
||||
<h4>Настройки Governor</h4>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Порог предложения:</span>
|
||||
<span class="info-value">100,000 GT</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Кворум:</span>
|
||||
<span class="info-value">4%</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Задержка голосования:</span>
|
||||
<span class="info-value">1 день</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Период голосования:</span>
|
||||
<span class="info-value">7 дней</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-card">
|
||||
<h4>Статистика голосований</h4>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Всего предложений:</span>
|
||||
<span class="info-value">{{ proposals.length }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Активных предложений:</span>
|
||||
<span class="info-value">{{ getProposalsByStatus('active').length }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Успешных предложений:</span>
|
||||
<span class="info-value">{{ getProposalsByStatus('succeeded').length }}</span>
|
||||
</div>
|
||||
<div class="info-row">
|
||||
<span class="info-label">Отклоненных предложений:</span>
|
||||
<span class="info-value">{{ getProposalsByStatus('defeated').length }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tab-content" v-if="activeTab === 'modules'">
|
||||
<h3>Подключение модулей</h3>
|
||||
<p>Здесь вы можете подключить дополнительные модули к вашему DLE.</p>
|
||||
<div class="modules-list">
|
||||
<div v-for="(module, index) in availableModules" :key="index" class="module-card">
|
||||
<h4>{{ module.name }}</h4>
|
||||
<p>{{ module.description }}</p>
|
||||
<div class="module-status" :class="{ 'installed': module.installed }">
|
||||
{{ module.installed ? 'Установлен' : 'Доступен' }}
|
||||
</div>
|
||||
<div class="module-actions">
|
||||
<button v-if="!module.installed" class="btn btn-success" @click="installModule(module)">
|
||||
<i class="fas fa-plus"></i> Установить
|
||||
</button>
|
||||
<button v-else class="btn btn-danger" @click="uninstallModule(module)">
|
||||
<i class="fas fa-trash"></i> Удалить
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, defineProps, computed } from 'vue';
|
||||
const props = defineProps({
|
||||
dleList: { type: Array, required: true },
|
||||
selectedDleIndex: { type: Number, default: null }
|
||||
});
|
||||
const selectedDleIndex = ref(props.selectedDleIndex ?? 0);
|
||||
const activeTab = ref('info');
|
||||
const showCreateProposalForm = ref(false);
|
||||
const newProposal = ref({ title: '', description: '' });
|
||||
const isCreatingProposal = ref(false);
|
||||
const proposals = ref([]);
|
||||
const availableModules = ref([
|
||||
{
|
||||
name: 'Контракт на активы',
|
||||
description: 'Позволяет токенизировать физические активы и управлять ими через DLE.',
|
||||
installed: false
|
||||
},
|
||||
{
|
||||
name: 'Мультиподпись',
|
||||
description: 'Добавляет функциональность мультиподписи для повышенной безопасности.',
|
||||
installed: false
|
||||
},
|
||||
{
|
||||
name: 'Дивиденды',
|
||||
description: 'Позволяет распределять дивиденды между держателями токенов.',
|
||||
installed: false
|
||||
},
|
||||
{
|
||||
name: 'Стейкинг',
|
||||
description: 'Добавляет возможность стейкинга токенов для получения наград.',
|
||||
installed: false
|
||||
}
|
||||
]);
|
||||
const selectedDle = computed(() => {
|
||||
if (selectedDleIndex.value !== null && props.dleList.length > selectedDleIndex.value) {
|
||||
return props.dleList[selectedDleIndex.value];
|
||||
}
|
||||
return null;
|
||||
});
|
||||
function selectDle(index) {
|
||||
selectedDleIndex.value = index;
|
||||
activeTab.value = 'info';
|
||||
}
|
||||
function shortenAddress(address) {
|
||||
if (!address) return '';
|
||||
return `${address.slice(0, 6)}...${address.slice(-4)}`;
|
||||
}
|
||||
function formatDate(timestamp) {
|
||||
if (!timestamp) return 'N/A';
|
||||
return new Date(timestamp * 1000).toLocaleString();
|
||||
}
|
||||
function copyToClipboard(text) {
|
||||
navigator.clipboard.writeText(text)
|
||||
.then(() => {
|
||||
alert('Адрес скопирован в буфер обмена');
|
||||
})
|
||||
.catch(err => {
|
||||
console.error('Ошибка при копировании текста: ', err);
|
||||
});
|
||||
}
|
||||
function viewOnExplorer(address) {
|
||||
window.open(`https://sepolia.etherscan.io/address/${address}`, '_blank');
|
||||
}
|
||||
function createProposal() {
|
||||
if (!newProposal.value.title || !newProposal.value.description) {
|
||||
alert('Пожалуйста, заполните все поля');
|
||||
return;
|
||||
}
|
||||
isCreatingProposal.value = true;
|
||||
try {
|
||||
proposals.value.push({
|
||||
id: Date.now().toString(),
|
||||
title: newProposal.value.title,
|
||||
description: newProposal.value.description,
|
||||
status: 'pending',
|
||||
votes: { for: 0, against: 0 }
|
||||
});
|
||||
showCreateProposalForm.value = false;
|
||||
newProposal.value = { title: '', description: '' };
|
||||
alert('Предложение создано!');
|
||||
} catch (error) {
|
||||
console.error('Ошибка при создании предложения:', error);
|
||||
alert('Ошибка при создании предложения');
|
||||
} finally {
|
||||
isCreatingProposal.value = false;
|
||||
}
|
||||
}
|
||||
function voteForProposal(proposalId, isFor) {
|
||||
try {
|
||||
const proposal = proposals.value.find(p => p.id === proposalId);
|
||||
if (proposal) {
|
||||
if (isFor) {
|
||||
proposal.votes.for += 1;
|
||||
} else {
|
||||
proposal.votes.against += 1;
|
||||
}
|
||||
if (proposal.votes.for > proposal.votes.against && proposal.votes.for >= 3) {
|
||||
proposal.status = 'succeeded';
|
||||
} else if (proposal.votes.against > proposal.votes.for && proposal.votes.against >= 3) {
|
||||
proposal.status = 'defeated';
|
||||
} else {
|
||||
proposal.status = 'active';
|
||||
}
|
||||
alert('Ваш голос учтен!');
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Ошибка при голосовании:', error);
|
||||
alert('Ошибка при голосовании');
|
||||
}
|
||||
}
|
||||
function canVote(proposal) {
|
||||
return proposal.status === 'active' || proposal.status === 'pending';
|
||||
}
|
||||
function getProposalStatusText(status) {
|
||||
const statusMap = {
|
||||
'pending': 'Ожидает',
|
||||
'active': 'Активно',
|
||||
'succeeded': 'Принято',
|
||||
'defeated': 'Отклонено',
|
||||
'executed': 'Выполнено'
|
||||
};
|
||||
return statusMap[status] || status;
|
||||
}
|
||||
function getProposalsByStatus(status) {
|
||||
return proposals.value.filter(p => p.status === status);
|
||||
}
|
||||
function installModule(module) {
|
||||
module.installed = true;
|
||||
alert(`Модуль "${module.name}" успешно установлен!`);
|
||||
}
|
||||
function uninstallModule(module) {
|
||||
module.installed = false;
|
||||
alert(`Модуль "${module.name}" удален.`);
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dle-management-modal {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
box-shadow: 0 4px 32px rgba(0,0,0,0.12);
|
||||
padding: 32px 24px 24px 24px;
|
||||
max-width: 950px;
|
||||
margin: 40px auto;
|
||||
position: relative;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.dle-management-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.close-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 2rem;
|
||||
cursor: pointer;
|
||||
color: #bbb;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
.close-btn:hover {
|
||||
color: #333;
|
||||
}
|
||||
.dle-list-section {
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.dle-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 15px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.dle-card {
|
||||
width: 300px;
|
||||
padding: 15px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
|
||||
background: #f8f9fa;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.dle-card.active {
|
||||
border-color: #17a2b8;
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.dle-card h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 10px;
|
||||
color: #17a2b8;
|
||||
}
|
||||
.dle-details-section {
|
||||
margin-top: 30px;
|
||||
border-top: 1px solid #e5e7eb;
|
||||
padding-top: 20px;
|
||||
}
|
||||
.no-dle-message {
|
||||
padding: 20px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
text-align: center;
|
||||
}
|
||||
.dle-tabs {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
.tab-header {
|
||||
display: flex;
|
||||
gap: 20px;
|
||||
border-bottom: 1px solid #e5e7eb;
|
||||
}
|
||||
.tab-button {
|
||||
padding: 10px 20px;
|
||||
cursor: pointer;
|
||||
transition: border-bottom 0.2s;
|
||||
}
|
||||
.tab-button.active {
|
||||
border-bottom: 2px solid #17a2b8;
|
||||
}
|
||||
.tab-content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.info-card {
|
||||
padding: 20px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.info-row {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.info-label {
|
||||
font-weight: bold;
|
||||
}
|
||||
.info-value {
|
||||
margin-left: 10px;
|
||||
}
|
||||
.contract-cards {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
margin-top: 24px;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.contract-card {
|
||||
flex: 1 1 0;
|
||||
min-width: 260px;
|
||||
max-width: 340px;
|
||||
background: #fff;
|
||||
border-radius: 18px;
|
||||
box-shadow: 0 2px 16px rgba(0,0,0,0.07);
|
||||
padding: 22px 20px 18px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 16px;
|
||||
transition: box-shadow 0.2s, transform 0.2s;
|
||||
}
|
||||
.contract-card:hover {
|
||||
box-shadow: 0 6px 24px rgba(23,162,184,0.13);
|
||||
transform: translateY(-2px) scale(1.02);
|
||||
}
|
||||
.contract-card h4 {
|
||||
margin: 0 0 10px 0;
|
||||
font-size: 1.1rem;
|
||||
font-weight: 600;
|
||||
color: #17a2b8;
|
||||
}
|
||||
.contract-card .address {
|
||||
font-family: 'Fira Mono', 'Consolas', monospace;
|
||||
word-break: break-all;
|
||||
background: #f6f8fa;
|
||||
border-radius: 6px;
|
||||
padding: 7px 10px;
|
||||
font-size: 0.98rem;
|
||||
margin-bottom: 18px;
|
||||
color: #222;
|
||||
}
|
||||
.contract-actions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.contract-actions .btn {
|
||||
flex: 1 1 0;
|
||||
min-width: 0;
|
||||
font-size: 1rem;
|
||||
padding: 10px 0;
|
||||
border-radius: 8px;
|
||||
font-weight: 500;
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
transition: background 0.18s, color 0.18s;
|
||||
}
|
||||
.contract-actions .btn-secondary {
|
||||
background: #f1f3f6;
|
||||
color: #888;
|
||||
}
|
||||
.contract-actions .btn-secondary:hover {
|
||||
background: #e2e6ea;
|
||||
color: #222;
|
||||
}
|
||||
.contract-actions .btn-info {
|
||||
background: #17a2b8;
|
||||
color: #fff;
|
||||
}
|
||||
.contract-actions .btn-info:hover {
|
||||
background: #148a9d;
|
||||
}
|
||||
@media (max-width: 900px) {
|
||||
.contract-cards {
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
align-items: stretch;
|
||||
}
|
||||
.contract-card {
|
||||
max-width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
.proposals-actions {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.create-proposal-form {
|
||||
padding: 20px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 10px;
|
||||
}
|
||||
.form-group {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.form-group label {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.form-group input,
|
||||
.form-group textarea {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
border: 1px solid #e5e7eb;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.form-actions {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 10px;
|
||||
}
|
||||
.proposals-list {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.proposal-card {
|
||||
padding: 10px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.proposal-status {
|
||||
margin-top: 5px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.proposal-status.pending {
|
||||
background-color: #ffd700;
|
||||
}
|
||||
.proposal-status.active {
|
||||
background-color: #17a2b8;
|
||||
color: #fff;
|
||||
}
|
||||
.proposal-status.succeeded {
|
||||
background-color: #28a745;
|
||||
color: #fff;
|
||||
}
|
||||
.proposal-status.defeated {
|
||||
background-color: #dc3545;
|
||||
color: #fff;
|
||||
}
|
||||
.proposal-actions {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
.modules-list {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.module-card {
|
||||
padding: 10px;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.module-status {
|
||||
margin-top: 5px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.module-status.installed {
|
||||
background-color: #28a745;
|
||||
color: #fff;
|
||||
}
|
||||
.module-actions {
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user