@oasisomniverse/nextjs 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +29 -0
- package/src/components/ForgetPassword.tsx +127 -0
- package/src/components/Login.tsx +223 -0
- package/src/components/ResetPassword.tsx +177 -0
- package/src/components/Signup.tsx +286 -0
- package/src/components/VerifyEmail.tsx +69 -0
- package/src/components/common/AvatarConnect.tsx +90 -0
- package/src/components/common/Contact.tsx +61 -0
- package/src/components/common/Eggs.tsx +51 -0
- package/src/components/common/Game.tsx +37 -0
- package/src/components/common/HyperDrive.tsx +51 -0
- package/src/components/common/KarmaToast.tsx +39 -0
- package/src/components/common/Map.tsx +43 -0
- package/src/components/common/MenuMessage.tsx +71 -0
- package/src/components/common/Messaging.tsx +75 -0
- package/src/components/common/Mission.tsx +41 -0
- package/src/components/common/NFT.tsx +43 -0
- package/src/components/common/NavBar.tsx +138 -0
- package/src/components/common/OApp.tsx +42 -0
- package/src/components/common/ONET.tsx +51 -0
- package/src/components/common/ONODE.tsx +50 -0
- package/src/components/common/OasisModal.tsx +30 -0
- package/src/components/common/ProviderDropdown.tsx +26 -0
- package/src/components/common/Providers.tsx +39 -0
- package/src/components/common/Quest.tsx +41 -0
- package/src/components/common/SearchAvatars.tsx +50 -0
- package/src/components/common/Seeds.tsx +40 -0
- package/src/components/common/Settings.tsx +71 -0
- package/src/components/common/StarField.tsx +57 -0
- package/src/components/common/Wallet.tsx +46 -0
- package/src/components/popups/avatar/components/AvatarWallet.tsx +170 -0
- package/src/components/popups/avatar/components/EditAvatar.tsx +35 -0
- package/src/components/popups/avatar/components/SearchAvatar.tsx +35 -0
- package/src/components/popups/avatar/components/ViewAvatar.tsx +149 -0
- package/src/components/popups/avatar/index.tsx +40 -0
- package/src/components/popups/comingsoon/ComingSoon.tsx +29 -0
- package/src/components/popups/confirmation/Confirmation.tsx +31 -0
- package/src/components/popups/contact/index.tsx +101 -0
- package/src/components/popups/data-screen/components/AddData.tsx +90 -0
- package/src/components/popups/data-screen/components/CrossChainManagement.tsx +88 -0
- package/src/components/popups/data-screen/components/LoadData.tsx +158 -0
- package/src/components/popups/data-screen/components/ManageData.tsx +35 -0
- package/src/components/popups/data-screen/components/OffChainManagement.tsx +178 -0
- package/src/components/popups/data-screen/components/SearchData.tsx +35 -0
- package/src/components/popups/data-screen/index.tsx +53 -0
- package/src/components/popups/eggs/components/ManageEggs.tsx +35 -0
- package/src/components/popups/eggs/components/SearchEggs.tsx +35 -0
- package/src/components/popups/eggs/components/ViewEggs.tsx +35 -0
- package/src/components/popups/eggs/index.tsx +32 -0
- package/src/components/popups/game/components/SearchProfiles.tsx +35 -0
- package/src/components/popups/game/components/ViewAchievements.tsx +35 -0
- package/src/components/popups/game/components/ViewLeagues.tsx +35 -0
- package/src/components/popups/game/components/ViewTournaments.tsx +35 -0
- package/src/components/popups/game/index.tsx +39 -0
- package/src/components/popups/karma/components/SearchKarma.tsx +35 -0
- package/src/components/popups/karma/components/ViewAvatarKarma.tsx +140 -0
- package/src/components/popups/karma/components/ViewKarma.tsx +104 -0
- package/src/components/popups/karma/components/VoteKarma.tsx +35 -0
- package/src/components/popups/karma/index.tsx +35 -0
- package/src/components/popups/map/components/Add2dObjectMap.tsx +35 -0
- package/src/components/popups/map/components/Add3dObjectMap.tsx +35 -0
- package/src/components/popups/map/components/AddQuestToMap.tsx +35 -0
- package/src/components/popups/map/components/DownloadOurWorld.tsx +35 -0
- package/src/components/popups/map/components/ManageMap.tsx +35 -0
- package/src/components/popups/map/components/PlotRouteOnMap.tsx +35 -0
- package/src/components/popups/map/components/SearchMap.tsx +35 -0
- package/src/components/popups/map/components/ViewGlobal3dMap.tsx +35 -0
- package/src/components/popups/map/components/ViewHalonsOnMap.tsx +35 -0
- package/src/components/popups/map/components/ViewOappOnMap.tsx +35 -0
- package/src/components/popups/map/components/ViewQuestOnMap.tsx +35 -0
- package/src/components/popups/map/index.tsx +80 -0
- package/src/components/popups/messages/Message.tsx +87 -0
- package/src/components/popups/mission/components/ManageMission.tsx +35 -0
- package/src/components/popups/mission/components/SearchMission.tsx +35 -0
- package/src/components/popups/mission/components/ViewMission.tsx +35 -0
- package/src/components/popups/mission/index.tsx +33 -0
- package/src/components/popups/nft/ContactPopup.tsx +147 -0
- package/src/components/popups/nft/Solana.tsx +71 -0
- package/src/components/popups/nft/components/ManageOasisNft.tsx +35 -0
- package/src/components/popups/nft/components/PurchaseOasisNft.tsx +35 -0
- package/src/components/popups/nft/components/PurchaseOasisVirtualLandNft.tsx +35 -0
- package/src/components/popups/nft/components/SearchOasisNft.tsx +35 -0
- package/src/components/popups/nft/components/ViewOasisNft.tsx +35 -0
- package/src/components/popups/nft/index.tsx +46 -0
- package/src/components/popups/oapp/components/CreateOAPP.tsx +35 -0
- package/src/components/popups/oapp/components/DeployOAPP.tsx +35 -0
- package/src/components/popups/oapp/components/DownloadOurWorld.tsx +35 -0
- package/src/components/popups/oapp/components/EditOAPP.tsx +35 -0
- package/src/components/popups/oapp/components/InstallOAPP.tsx +35 -0
- package/src/components/popups/oapp/components/LaunchOAPP.tsx +35 -0
- package/src/components/popups/oapp/components/ManageOAPP.tsx +69 -0
- package/src/components/popups/oapp/components/SearchOAPP.tsx +35 -0
- package/src/components/popups/oapp/index.tsx +63 -0
- package/src/components/popups/provider/components/ActivityPub.tsx +35 -0
- package/src/components/popups/provider/components/CompareProviderSpeeds.tsx +124 -0
- package/src/components/popups/provider/components/Eosio.tsx +35 -0
- package/src/components/popups/provider/components/Ethereum.tsx +35 -0
- package/src/components/popups/provider/components/Holochain.tsx +35 -0
- package/src/components/popups/provider/components/Ipfs.tsx +36 -0
- package/src/components/popups/provider/components/ManageAutoFailOver.tsx +35 -0
- package/src/components/popups/provider/components/ManageAutoReplicaton.tsx +35 -0
- package/src/components/popups/provider/components/ManageLoadBalancing.tsx +35 -0
- package/src/components/popups/provider/components/ManageProviders.tsx +35 -0
- package/src/components/popups/provider/components/MongoDb.tsx +35 -0
- package/src/components/popups/provider/components/Neo4j.tsx +35 -0
- package/src/components/popups/provider/components/SearchProviders.tsx +123 -0
- package/src/components/popups/provider/components/Seeds.tsx +35 -0
- package/src/components/popups/provider/components/Solid.tsx +35 -0
- package/src/components/popups/provider/components/SqlLite.tsx +35 -0
- package/src/components/popups/provider/components/ThreeFold.tsx +35 -0
- package/src/components/popups/provider/components/ViewProviderStats.tsx +124 -0
- package/src/components/popups/provider/components/ViewProviders.tsx +122 -0
- package/src/components/popups/provider/index.tsx +114 -0
- package/src/components/popups/quest/components/ManageQuest.tsx +35 -0
- package/src/components/popups/quest/components/SearchQuest.tsx +35 -0
- package/src/components/popups/quest/components/ViewQuest.tsx +35 -0
- package/src/components/popups/quest/index.tsx +33 -0
- package/src/components/popups/seeds/components/AcceptInvite.tsx +62 -0
- package/src/components/popups/seeds/components/DonateSeeds.tsx +179 -0
- package/src/components/popups/seeds/components/ManageSeeds.tsx +35 -0
- package/src/components/popups/seeds/components/PayWithSeeds.tsx +234 -0
- package/src/components/popups/seeds/components/RewardSeeds.tsx +179 -0
- package/src/components/popups/seeds/components/SearchSeeds.tsx +92 -0
- package/src/components/popups/seeds/components/SendInvite.tsx +179 -0
- package/src/components/popups/seeds/components/ViewOrganizations.tsx +179 -0
- package/src/components/popups/seeds/components/ViewSeeds.tsx +222 -0
- package/src/components/popups/seeds/index.tsx +71 -0
- package/src/index.ts +129 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useEffect } from 'react';
|
|
3
|
+
import './OasisModal.css';
|
|
4
|
+
|
|
5
|
+
export default function OasisModal({ open, onClose, title, accentColor = '#00c8ff', children }) {
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
if (!open) return;
|
|
8
|
+
const onKey = e => { if (e.key === 'Escape') onClose?.(); };
|
|
9
|
+
document.addEventListener('keydown', onKey);
|
|
10
|
+
document.body.style.overflow = 'hidden';
|
|
11
|
+
return () => {
|
|
12
|
+
document.removeEventListener('keydown', onKey);
|
|
13
|
+
document.body.style.overflow = '';
|
|
14
|
+
};
|
|
15
|
+
}, [open, onClose]);
|
|
16
|
+
|
|
17
|
+
if (!open) return null;
|
|
18
|
+
|
|
19
|
+
return (
|
|
20
|
+
<div className="oasis-modal-backdrop" onClick={e => { if (e.target === e.currentTarget) onClose?.(); }}>
|
|
21
|
+
<div className="oasis-modal-box" role="dialog" aria-modal="true">
|
|
22
|
+
<div className="oasis-modal-header" style={{ borderBottomColor: accentColor + '33' }}>
|
|
23
|
+
<span className="oasis-modal-title" style={{ color: accentColor }}>{title}</span>
|
|
24
|
+
<button className="oasis-modal-close" onClick={onClose} aria-label="Close">✕</button>
|
|
25
|
+
</div>
|
|
26
|
+
<div className="oasis-modal-body">{children}</div>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
class ProviderDropdown extends React.Component {
|
|
4
|
+
state = { }
|
|
5
|
+
render() {
|
|
6
|
+
return (
|
|
7
|
+
<>
|
|
8
|
+
<p className="single-form-row">
|
|
9
|
+
<label>Provider: </label>
|
|
10
|
+
<span className="have-selectbox">
|
|
11
|
+
<select className="custom-selectbox">
|
|
12
|
+
<option>EOSIO</option>
|
|
13
|
+
<option>EOSIO - 1</option>
|
|
14
|
+
<option>EOSIO - 2</option>
|
|
15
|
+
</select>
|
|
16
|
+
<i className="fa fa-angle-down"></i>
|
|
17
|
+
</span>
|
|
18
|
+
|
|
19
|
+
<span className="have-icon"></span>
|
|
20
|
+
</p>
|
|
21
|
+
</>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default ProviderDropdown;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
const INITIAL = [
|
|
5
|
+
{ id: '1', name: 'Ethereum', icon: '⟠', color: '#627eea', type: 'Blockchain', description: 'Connect your Ethereum wallet (MetaMask, WalletConnect).', connected: false },
|
|
6
|
+
{ id: '2', name: 'Solana', icon: '◎', color: '#9945ff', type: 'Blockchain', description: 'Connect your Solana wallet (Phantom, Solflare).', connected: false },
|
|
7
|
+
{ id: '3', name: 'EOSIO', icon: '🔮', color: '#443f54', type: 'Blockchain', description: 'Connect via EOSIO for high-speed transactions.', connected: false },
|
|
8
|
+
{ id: '4', name: 'Holochain', icon: '⬡', color: '#00e5be', type: 'P2P Network', description: 'Peer-to-peer data storage on Holochain.', connected: false },
|
|
9
|
+
{ id: '5', name: 'The Graph', icon: '📊', color: '#6f4cff', type: 'Indexer', description: 'Query blockchain data with The Graph protocol.', connected: false },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export function Providers() {
|
|
13
|
+
const [providers, setProviders] = useState(INITIAL);
|
|
14
|
+
function toggle(id) { setProviders(l => l.map(x => x.id === id ? { ...x, connected: !x.connected } : x)); }
|
|
15
|
+
return (
|
|
16
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
|
|
17
|
+
<div style={{ textAlign: 'center' }}>
|
|
18
|
+
<h2 style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 20, color: '#fff', margin: '0 0 6px' }}>🔗 Providers</h2>
|
|
19
|
+
<p style={{ fontSize: 13, color: '#7a9bbf', margin: 0 }}>Connect blockchain providers to your OASIS avatar.</p>
|
|
20
|
+
</div>
|
|
21
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
|
22
|
+
{providers.map(p => (
|
|
23
|
+
<div key={p.id} style={{ display: 'flex', alignItems: 'center', gap: 14, background: p.connected ? 'rgba(72,220,130,.03)' : 'rgba(255,255,255,.04)', border: `1px solid ${p.connected ? 'rgba(72,220,130,.3)' : 'rgba(0,200,255,.12)'}`, borderRadius: 12, padding: '14px 16px' }}>
|
|
24
|
+
<div style={{ fontSize: 26, flexShrink: 0, color: p.color }}>{p.icon}</div>
|
|
25
|
+
<div style={{ flex: 1 }}>
|
|
26
|
+
<div style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 13, color: '#fff', marginBottom: 2 }}>{p.name}</div>
|
|
27
|
+
<div style={{ fontSize: 11, color: '#5ba8ff', textTransform: 'uppercase', letterSpacing: '.06em', marginBottom: 4 }}>{p.type}</div>
|
|
28
|
+
<div style={{ fontSize: 12, color: '#7a9bbf' }}>{p.description}</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div style={{ display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 8, flexShrink: 0 }}>
|
|
31
|
+
<div style={{ width: 8, height: 8, borderRadius: '50%', background: p.connected ? '#48dc82' : '#4a6a88', boxShadow: p.connected ? '0 0 6px #48dc82' : undefined }} />
|
|
32
|
+
<button onClick={() => toggle(p.id)} style={{ background: p.connected ? 'rgba(255,80,80,.15)' : 'linear-gradient(135deg,#00c8ff,#0080ff)', border: p.connected ? '1px solid rgba(255,80,80,.3)' : 'none', borderRadius: 7, color: p.connected ? '#ff6b6b' : '#fff', fontFamily: "'Orbitron',sans-serif", fontSize: 10, fontWeight: 700, letterSpacing: '.06em', padding: '7px 14px', cursor: 'pointer', whiteSpace: 'nowrap' }}>{p.connected ? 'Disconnect' : 'Connect'}</button>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
))}
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
const DIFF_COLORS = { Easy: '#48dc82', Medium: '#ffb43c', Hard: '#ff6b6b', Legendary: '#b87fff' };
|
|
5
|
+
const INITIAL = [
|
|
6
|
+
{ id: '1', title: 'Avatar Awakening', description: 'Complete your avatar profile and connect your first provider.', reward: 200, difficulty: 'Easy', accepted: true, completed: true },
|
|
7
|
+
{ id: '2', title: 'Karma Seeker', description: 'Earn 1000 karma through good deeds and OASIS contributions.', reward: 500, difficulty: 'Medium', accepted: true, completed: false },
|
|
8
|
+
{ id: '3', title: 'The NFT Collector', description: 'Acquire 5 unique NFTs across different categories.', reward: 1000, difficulty: 'Hard', accepted: false, completed: false },
|
|
9
|
+
{ id: '4', title: 'Omniverse Explorer', description: 'Visit every major hub location on the OASIS map.', reward: 2500, difficulty: 'Legendary', accepted: false, completed: false },
|
|
10
|
+
];
|
|
11
|
+
|
|
12
|
+
export function Quest() {
|
|
13
|
+
const [quests, setQuests] = useState(INITIAL);
|
|
14
|
+
function accept(id) { setQuests(l => l.map(x => x.id === id ? { ...x, accepted: true } : x)); }
|
|
15
|
+
function complete(id) { setQuests(l => l.map(x => x.id === id ? { ...x, completed: true } : x)); }
|
|
16
|
+
return (
|
|
17
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
|
|
18
|
+
<div style={{ textAlign: 'center' }}>
|
|
19
|
+
<h2 style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 20, color: '#fff', margin: '0 0 6px' }}>⚔️ Quests</h2>
|
|
20
|
+
<p style={{ fontSize: 13, color: '#7a9bbf', margin: 0 }}>Embark on quests to gain karma and rare rewards.</p>
|
|
21
|
+
</div>
|
|
22
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 12 }}>
|
|
23
|
+
{quests.map(q => (
|
|
24
|
+
<div key={q.id} style={{ display: 'flex', gap: 14, alignItems: 'flex-start', background: 'rgba(255,255,255,.04)', border: `1px solid ${q.completed ? 'rgba(72,220,130,.2)' : q.accepted ? 'rgba(0,200,255,.4)' : 'rgba(0,200,255,.12)'}`, borderRadius: 12, padding: 16, opacity: q.completed ? .6 : 1 }}>
|
|
25
|
+
<div style={{ fontSize: 10, fontWeight: 700, letterSpacing: '.1em', textTransform: 'uppercase', borderRadius: 999, padding: '4px 10px', border: `1px solid ${DIFF_COLORS[q.difficulty]}44`, color: DIFF_COLORS[q.difficulty], whiteSpace: 'nowrap', flexShrink: 0 }}>{q.difficulty}</div>
|
|
26
|
+
<div style={{ flex: 1 }}>
|
|
27
|
+
<div style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 13, color: '#fff', marginBottom: 4 }}>{q.title}</div>
|
|
28
|
+
<div style={{ fontSize: 12, color: '#7a9bbf', lineHeight: 1.5, marginBottom: 6 }}>{q.description}</div>
|
|
29
|
+
<div style={{ fontSize: 12, color: '#48dc82', fontWeight: 600 }}>+{q.reward} karma</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div style={{ flexShrink: 0 }}>
|
|
32
|
+
{q.completed ? <div style={{ fontSize: 13, color: '#48dc82', fontWeight: 600 }}>✅ Done</div>
|
|
33
|
+
: !q.accepted ? <button onClick={() => accept(q.id)} style={{ background: 'linear-gradient(135deg,#00c8ff,#0080ff)', border: 'none', borderRadius: 7, color: '#fff', fontFamily: "'Orbitron',sans-serif", fontSize: 11, fontWeight: 700, padding: '8px 16px', cursor: 'pointer' }}>Accept Quest</button>
|
|
34
|
+
: <button onClick={() => complete(q.id)} style={{ background: 'linear-gradient(135deg,#48dc82,#00aa55)', border: 'none', borderRadius: 7, color: '#fff', fontFamily: "'Orbitron',sans-serif", fontSize: 11, fontWeight: 700, padding: '8px 16px', cursor: 'pointer' }}>Finish</button>}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
))}
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { OASISClient } from '@oasisomniverse/web4-api';
|
|
4
|
+
|
|
5
|
+
export function SearchAvatars() {
|
|
6
|
+
const [query, setQuery] = useState('');
|
|
7
|
+
const [loading, setLoading] = useState(false);
|
|
8
|
+
const [error, setError] = useState('');
|
|
9
|
+
const [results, setResults] = useState([]);
|
|
10
|
+
const [searched, setSearched] = useState(false);
|
|
11
|
+
|
|
12
|
+
async function search() {
|
|
13
|
+
if (!query.trim()) return;
|
|
14
|
+
setLoading(true); setError(''); setResults([]); setSearched(false);
|
|
15
|
+
try {
|
|
16
|
+
const oasis = new OASISClient({ baseUrl: 'https://api.web4.oasisomniverse.one' });
|
|
17
|
+
const res = await oasis.avatar?.searchAvatars?.({ searchQuery: query });
|
|
18
|
+
setResults(Array.isArray(res?.result) ? res.result : []);
|
|
19
|
+
setSearched(true);
|
|
20
|
+
} catch (e) { setError(e?.message ?? 'Search failed.'); }
|
|
21
|
+
finally { setLoading(false); }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
|
|
26
|
+
<div style={{ textAlign: 'center' }}>
|
|
27
|
+
<h2 style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 20, color: '#fff', margin: '0 0 6px' }}>🔍 Search Avatars</h2>
|
|
28
|
+
<p style={{ fontSize: 13, color: '#7a9bbf', margin: 0 }}>Find other OASIS avatars by username or name.</p>
|
|
29
|
+
</div>
|
|
30
|
+
<div style={{ display: 'flex', gap: 10 }}>
|
|
31
|
+
<input style={{ flex: 1, background: 'rgba(255,255,255,.05)', border: '1px solid rgba(0,200,255,.2)', borderRadius: 8, padding: '10px 14px', color: '#fff', fontSize: 14, outline: 'none' }} value={query} onChange={e => setQuery(e.target.value)} onKeyDown={e => e.key === 'Enter' && search()} placeholder="Search by username…" />
|
|
32
|
+
<button onClick={search} disabled={loading || !query.trim()} style={{ background: 'linear-gradient(135deg,#00c8ff,#0080ff)', border: 'none', borderRadius: 8, color: '#fff', fontFamily: "'Orbitron',sans-serif", fontSize: 12, fontWeight: 700, letterSpacing: '.08em', padding: '10px 20px', cursor: 'pointer', opacity: loading || !query.trim() ? .4 : 1 }}>{loading ? '…' : 'Search'}</button>
|
|
33
|
+
</div>
|
|
34
|
+
{error && <div style={{ background: 'rgba(255,80,80,.12)', border: '1px solid rgba(255,80,80,.3)', color: '#ff6b6b', borderRadius: 8, padding: '10px 14px', fontSize: 13 }}>{error}</div>}
|
|
35
|
+
{results.length > 0 ? (
|
|
36
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
|
37
|
+
{results.map(a => (
|
|
38
|
+
<div key={a.id} style={{ display: 'flex', alignItems: 'center', gap: 14, padding: '14px 16px', background: 'rgba(255,255,255,.04)', border: '1px solid rgba(0,200,255,.12)', borderRadius: 10 }}>
|
|
39
|
+
<div style={{ fontSize: 28 }}>👤</div>
|
|
40
|
+
<div style={{ flex: 1 }}><div style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 13, color: '#fff' }}>{a.username}</div><div style={{ fontSize: 12, color: '#7a9bbf', marginTop: 2 }}>{a.firstName} {a.lastName}</div></div>
|
|
41
|
+
<div style={{ fontSize: 12, color: '#48dc82', fontWeight: 600, whiteSpace: 'nowrap' }}>{a.karma} karma</div>
|
|
42
|
+
</div>
|
|
43
|
+
))}
|
|
44
|
+
</div>
|
|
45
|
+
) : searched && !loading ? (
|
|
46
|
+
<div style={{ textAlign: 'center', color: '#4a6a88', fontSize: 14, padding: 24 }}>No avatars found for "{query}".</div>
|
|
47
|
+
) : null}
|
|
48
|
+
</div>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
const RARITY_COLORS = { Common: '#7a9bbf', Rare: '#5ba8ff', Epic: '#b87fff', Legendary: '#ffb43c' };
|
|
5
|
+
const ICONS = { Spiritual: '✨', Health: '💚', Community: '🤝', Knowledge: '📖' };
|
|
6
|
+
const INITIAL = [
|
|
7
|
+
{ id: '1', name: 'Wisdom Seed', type: 'Spiritual', rarity: 'Rare', karma: 50, planted: false },
|
|
8
|
+
{ id: '2', name: 'Healing Seed', type: 'Health', rarity: 'Common', karma: 20, planted: false },
|
|
9
|
+
{ id: '3', name: 'Unity Seed', type: 'Community', rarity: 'Epic', karma: 150, planted: false },
|
|
10
|
+
{ id: '4', name: 'Truth Seed', type: 'Knowledge', rarity: 'Legendary', karma: 500, planted: false },
|
|
11
|
+
{ id: '5', name: 'Love Seed', type: 'Spiritual', rarity: 'Common', karma: 30, planted: false },
|
|
12
|
+
{ id: '6', name: 'Peace Seed', type: 'Community', rarity: 'Rare', karma: 75, planted: false },
|
|
13
|
+
];
|
|
14
|
+
|
|
15
|
+
export function Seeds() {
|
|
16
|
+
const [seeds, setSeeds] = useState(INITIAL);
|
|
17
|
+
function plant(id) { setSeeds(s => s.map(x => x.id === id ? { ...x, planted: true } : x)); }
|
|
18
|
+
return (
|
|
19
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 20 }}>
|
|
20
|
+
<div style={{ textAlign: 'center' }}>
|
|
21
|
+
<h2 style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 20, color: '#fff', margin: '0 0 6px' }}>🌱 Seeds</h2>
|
|
22
|
+
<p style={{ fontSize: 13, color: '#7a9bbf', margin: 0 }}>Plant seeds to grow your OASIS avatar and earn karma.</p>
|
|
23
|
+
</div>
|
|
24
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fill,minmax(160px,1fr))', gap: 16 }}>
|
|
25
|
+
{seeds.map(s => (
|
|
26
|
+
<div key={s.id} style={{ background: s.planted ? 'rgba(72,220,130,.04)' : 'rgba(255,255,255,.04)', border: `1px solid ${s.planted ? 'rgba(72,220,130,.3)' : 'rgba(0,200,255,.15)'}`, borderRadius: 12, padding: '18px 14px', display: 'flex', flexDirection: 'column', alignItems: 'center', gap: 10 }}>
|
|
27
|
+
<div style={{ fontSize: 10, fontWeight: 700, letterSpacing: '.1em', textTransform: 'uppercase', borderRadius: 999, padding: '3px 10px', border: `1px solid ${RARITY_COLORS[s.rarity]}44`, color: RARITY_COLORS[s.rarity] }}>{s.rarity}</div>
|
|
28
|
+
<div style={{ fontSize: 36 }}>{ICONS[s.type] ?? '🌱'}</div>
|
|
29
|
+
<div style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 13, color: '#fff', textAlign: 'center' }}>{s.name}</div>
|
|
30
|
+
<div style={{ fontSize: 11, color: '#7a9bbf' }}>{s.type}</div>
|
|
31
|
+
<div style={{ fontSize: 12, color: '#48dc82', fontWeight: 600 }}>+{s.karma} Karma</div>
|
|
32
|
+
{s.planted
|
|
33
|
+
? <div style={{ fontSize: 12, color: '#48dc82', fontWeight: 600 }}>🌿 Growing…</div>
|
|
34
|
+
: <button style={{ width: '100%', background: 'linear-gradient(135deg,#00c8ff,#0080ff)', border: 'none', borderRadius: 7, color: '#fff', fontFamily: "'Orbitron',sans-serif", fontSize: 11, fontWeight: 700, letterSpacing: '.08em', padding: 8, cursor: 'pointer' }} onClick={() => plant(s.id)}>Plant Seed</button>}
|
|
35
|
+
</div>
|
|
36
|
+
))}
|
|
37
|
+
</div>
|
|
38
|
+
</div>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
|
|
4
|
+
const SECTIONS = [
|
|
5
|
+
{ icon: '🔔', label: 'Notifications', options: [
|
|
6
|
+
{ key: 'notifications', name: 'Enable Notifications', desc: 'Receive alerts for karma, messages and quests.', type: 'toggle' },
|
|
7
|
+
{ key: 'sound', name: 'Sound Effects', desc: 'Play sounds for OASIS events.', type: 'toggle' },
|
|
8
|
+
]},
|
|
9
|
+
{ icon: '🎨', label: 'Appearance', options: [
|
|
10
|
+
{ key: 'darkMode', name: 'Dark Mode', desc: 'Use the dark space theme.', type: 'toggle' },
|
|
11
|
+
{ key: 'theme', name: 'Theme', desc: 'Select your OASIS visual theme.', type: 'select', choices: ['Dark Space', 'Neon City', 'Forest Realm'] },
|
|
12
|
+
]},
|
|
13
|
+
{ icon: '🌐', label: 'Language & Region', options: [
|
|
14
|
+
{ key: 'language', name: 'Language', desc: 'Select your preferred language.', type: 'select', choices: ['English', 'Spanish', 'French', 'German', 'Japanese'] },
|
|
15
|
+
{ key: 'currency', name: 'Display Currency', desc: 'Currency for prices.', type: 'select', choices: ['ETH', 'SOL', 'USD', 'GBP', 'EUR'] },
|
|
16
|
+
]},
|
|
17
|
+
{ icon: '💾', label: 'Data', options: [
|
|
18
|
+
{ key: 'autoSave', name: 'Auto-save Progress', desc: 'Automatically save your OASIS progress.', type: 'toggle' },
|
|
19
|
+
]},
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
export function Settings() {
|
|
23
|
+
const [open, setOpen] = useState('');
|
|
24
|
+
const [prefs, setPrefs] = useState({ notifications: true, darkMode: true, sound: false, autoSave: true, language: 'English', theme: 'Dark Space', currency: 'ETH' });
|
|
25
|
+
const [saved, setSaved] = useState(false);
|
|
26
|
+
function togglePref(k) { setPrefs(p => ({ ...p, [k]: !p[k] })); }
|
|
27
|
+
function setPref(k, v) { setPrefs(p => ({ ...p, [k]: v })); }
|
|
28
|
+
function save() { setSaved(true); setTimeout(() => setSaved(false), 2000); }
|
|
29
|
+
return (
|
|
30
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
|
|
31
|
+
<div style={{ textAlign: 'center' }}>
|
|
32
|
+
<h2 style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 20, color: '#fff', margin: '0 0 6px' }}>⚙️ Settings</h2>
|
|
33
|
+
<p style={{ fontSize: 13, color: '#7a9bbf', margin: 0 }}>Manage your OASIS account and preferences.</p>
|
|
34
|
+
</div>
|
|
35
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
36
|
+
{SECTIONS.map(sec => (
|
|
37
|
+
<div key={sec.label} style={{ background: 'rgba(255,255,255,.04)', border: `1px solid ${open === sec.label ? 'rgba(0,200,255,.3)' : 'rgba(0,200,255,.12)'}`, borderRadius: 10, overflow: 'hidden' }}>
|
|
38
|
+
<div onClick={() => setOpen(o => o === sec.label ? '' : sec.label)} style={{ display: 'flex', alignItems: 'center', gap: 10, padding: '14px 16px', cursor: 'pointer', userSelect: 'none' }}>
|
|
39
|
+
<span style={{ fontSize: 18 }}>{sec.icon}</span>
|
|
40
|
+
<span style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 13, color: '#fff', flex: 1 }}>{sec.label}</span>
|
|
41
|
+
<span style={{ fontSize: 10, color: '#7a9bbf' }}>{open === sec.label ? '▲' : '▼'}</span>
|
|
42
|
+
</div>
|
|
43
|
+
{open === sec.label && (
|
|
44
|
+
<div style={{ padding: '0 16px 16px', display: 'flex', flexDirection: 'column', gap: 14 }}>
|
|
45
|
+
{sec.options.map(opt => (
|
|
46
|
+
<div key={opt.key} style={{ display: 'flex', alignItems: 'center', gap: 14 }}>
|
|
47
|
+
<div style={{ flex: 1 }}>
|
|
48
|
+
<div style={{ fontSize: 13, color: '#e0f0ff' }}>{opt.name}</div>
|
|
49
|
+
<div style={{ fontSize: 11, color: '#4a6a88', marginTop: 2 }}>{opt.desc}</div>
|
|
50
|
+
</div>
|
|
51
|
+
{opt.type === 'toggle' && (
|
|
52
|
+
<div onClick={() => togglePref(opt.key)} style={{ width: 44, height: 24, borderRadius: 999, background: prefs[opt.key] ? 'linear-gradient(135deg,#00c8ff,#0080ff)' : 'rgba(255,255,255,.1)', cursor: 'pointer', position: 'relative', flexShrink: 0 }}>
|
|
53
|
+
<div style={{ position: 'absolute', top: 3, left: prefs[opt.key] ? 23 : 3, width: 18, height: 18, borderRadius: '50%', background: '#fff', transition: 'left .2s' }} />
|
|
54
|
+
</div>
|
|
55
|
+
)}
|
|
56
|
+
{opt.type === 'select' && (
|
|
57
|
+
<select value={prefs[opt.key]} onChange={e => setPref(opt.key, e.target.value)} style={{ background: 'rgba(255,255,255,.05)', border: '1px solid rgba(0,200,255,.2)', borderRadius: 7, color: '#fff', fontSize: 12, padding: '6px 10px', outline: 'none' }}>
|
|
58
|
+
{opt.choices.map(c => <option key={c} value={c}>{c}</option>)}
|
|
59
|
+
</select>
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
)}
|
|
65
|
+
</div>
|
|
66
|
+
))}
|
|
67
|
+
</div>
|
|
68
|
+
<button onClick={save} style={{ background: 'linear-gradient(135deg,#00c8ff,#0080ff)', border: 'none', borderRadius: 8, color: '#fff', fontFamily: "'Orbitron',sans-serif", fontSize: 13, fontWeight: 700, letterSpacing: '.08em', padding: 12, cursor: 'pointer' }}>{saved ? '✅ Saved!' : 'Save Settings'}</button>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React, { useEffect, useRef } from 'react';
|
|
3
|
+
|
|
4
|
+
export default function StarField({ starCount = 160, speed = 0.3, style = {} }) {
|
|
5
|
+
const canvasRef = useRef(null);
|
|
6
|
+
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
const canvas = canvasRef.current;
|
|
9
|
+
const ctx = canvas.getContext('2d');
|
|
10
|
+
let raf;
|
|
11
|
+
let stars = [];
|
|
12
|
+
|
|
13
|
+
function resize() {
|
|
14
|
+
canvas.width = window.innerWidth;
|
|
15
|
+
canvas.height = window.innerHeight;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
function init() {
|
|
19
|
+
stars = Array.from({ length: starCount }, () => ({
|
|
20
|
+
x: Math.random() * canvas.width,
|
|
21
|
+
y: Math.random() * canvas.height,
|
|
22
|
+
r: Math.random() * 1.4 + 0.3,
|
|
23
|
+
o: Math.random() * 0.6 + 0.2,
|
|
24
|
+
dy: (Math.random() * 0.3 + 0.1) * speed,
|
|
25
|
+
}));
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
function tick() {
|
|
29
|
+
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
|
30
|
+
for (const s of stars) {
|
|
31
|
+
ctx.beginPath();
|
|
32
|
+
ctx.arc(s.x, s.y, s.r, 0, Math.PI * 2);
|
|
33
|
+
ctx.fillStyle = `rgba(200,230,255,${s.o})`;
|
|
34
|
+
ctx.fill();
|
|
35
|
+
s.y -= s.dy;
|
|
36
|
+
if (s.y < -2) { s.y = canvas.height + 2; s.x = Math.random() * canvas.width; }
|
|
37
|
+
}
|
|
38
|
+
raf = requestAnimationFrame(tick);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
window.addEventListener('resize', resize);
|
|
42
|
+
resize();
|
|
43
|
+
init();
|
|
44
|
+
raf = requestAnimationFrame(tick);
|
|
45
|
+
return () => {
|
|
46
|
+
cancelAnimationFrame(raf);
|
|
47
|
+
window.removeEventListener('resize', resize);
|
|
48
|
+
};
|
|
49
|
+
}, [starCount, speed]);
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<canvas
|
|
53
|
+
ref={canvasRef}
|
|
54
|
+
style={{ position: 'fixed', inset: 0, width: '100%', height: '100%', pointerEvents: 'none', zIndex: 0, ...style }}
|
|
55
|
+
/>
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
const BALANCES = [
|
|
3
|
+
{ icon: '⟠', currency: 'Ethereum', network: 'Mainnet', amount: '0.4821', symbol: 'ETH' },
|
|
4
|
+
{ icon: '◎', currency: 'Solana', network: 'Mainnet', amount: '12.305', symbol: 'SOL' },
|
|
5
|
+
{ icon: '⬡', currency: 'Polygon', network: 'Mainnet', amount: '245.00', symbol: 'MATIC' },
|
|
6
|
+
];
|
|
7
|
+
const TXS = [
|
|
8
|
+
{ id: '1', type: 'in', amount: 0.05, currency: 'ETH', description: 'NFT Sale — Cosmic Warrior', date: '2 hours ago' },
|
|
9
|
+
{ id: '2', type: 'out', amount: 12, currency: 'SOL', description: 'Quest Reward Conversion', date: '1 day ago' },
|
|
10
|
+
{ id: '3', type: 'in', amount: 100, currency: 'MATIC', description: 'Karma Reward Payout', date: '3 days ago' },
|
|
11
|
+
];
|
|
12
|
+
|
|
13
|
+
export function Wallet() {
|
|
14
|
+
return (
|
|
15
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 18 }}>
|
|
16
|
+
<div style={{ textAlign: 'center' }}>
|
|
17
|
+
<h2 style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 20, color: '#fff', margin: '0 0 6px' }}>💰 Wallet</h2>
|
|
18
|
+
<p style={{ fontSize: 13, color: '#7a9bbf', margin: 0 }}>Your OASIS multi-chain wallet.</p>
|
|
19
|
+
</div>
|
|
20
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 10 }}>
|
|
21
|
+
{BALANCES.map(b => (
|
|
22
|
+
<div key={b.currency} style={{ display: 'flex', alignItems: 'center', gap: 14, background: 'rgba(255,255,255,.04)', border: '1px solid rgba(0,200,255,.12)', borderRadius: 10, padding: '14px 16px' }}>
|
|
23
|
+
<div style={{ fontSize: 24 }}>{b.icon}</div>
|
|
24
|
+
<div style={{ flex: 1 }}><div style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 13, color: '#fff' }}>{b.currency}</div><div style={{ fontSize: 11, color: '#7a9bbf', marginTop: 2 }}>{b.network}</div></div>
|
|
25
|
+
<div style={{ fontFamily: "'Share Tech Mono',monospace", fontSize: 16, color: '#00c8ff', fontWeight: 600 }}>{b.amount} <span style={{ fontSize: 12, color: '#7a9bbf' }}>{b.symbol}</span></div>
|
|
26
|
+
</div>
|
|
27
|
+
))}
|
|
28
|
+
</div>
|
|
29
|
+
<div style={{ display: 'flex', gap: 10 }}>
|
|
30
|
+
{['📤 Send', '📥 Receive', '🔄 Swap'].map(a => (
|
|
31
|
+
<button key={a} style={{ flex: 1, background: 'rgba(0,200,255,.08)', border: '1px solid rgba(0,200,255,.2)', borderRadius: 8, color: '#00c8ff', fontFamily: "'Orbitron',sans-serif", fontSize: 11, fontWeight: 700, letterSpacing: '.06em', padding: 10, cursor: 'pointer' }}>{a}</button>
|
|
32
|
+
))}
|
|
33
|
+
</div>
|
|
34
|
+
<div style={{ fontFamily: "'Orbitron',sans-serif", fontSize: 12, color: '#7a9bbf', letterSpacing: '.06em', textTransform: 'uppercase' }}>Recent Transactions</div>
|
|
35
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: 8 }}>
|
|
36
|
+
{TXS.map(t => (
|
|
37
|
+
<div key={t.id} style={{ display: 'flex', alignItems: 'center', gap: 12, padding: '10px 14px', background: 'rgba(255,255,255,.03)', border: '1px solid rgba(0,200,255,.08)', borderRadius: 8 }}>
|
|
38
|
+
<div style={{ width: 28, height: 28, borderRadius: '50%', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: 14, fontWeight: 700, flexShrink: 0, background: t.type === 'in' ? 'rgba(72,220,130,.15)' : 'rgba(255,107,107,.15)', color: t.type === 'in' ? '#48dc82' : '#ff6b6b' }}>{t.type === 'in' ? '↓' : '↑'}</div>
|
|
39
|
+
<div style={{ flex: 1 }}><div style={{ fontSize: 13, color: '#e0f0ff' }}>{t.description}</div><div style={{ fontSize: 11, color: '#4a6a88', marginTop: 2 }}>{t.date}</div></div>
|
|
40
|
+
<div style={{ fontFamily: "'Share Tech Mono',monospace", fontSize: 13, fontWeight: 600, color: t.type === 'in' ? '#48dc82' : '#ff6b6b' }}>{t.type === 'in' ? '+' : '-'}{t.amount} {t.currency}</div>
|
|
41
|
+
</div>
|
|
42
|
+
))}
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Modal } from 'react-bootstrap';
|
|
4
|
+
import '../../../../assets/scss/avatar-popup.scss';
|
|
5
|
+
import { AgGridReact } from 'ag-grid-react';
|
|
6
|
+
import axios from "axios";
|
|
7
|
+
import { toast } from 'react-toastify';
|
|
8
|
+
import API_BASE_URL from "../../../../config/api";
|
|
9
|
+
|
|
10
|
+
class AvatarWallet extends React.Component {
|
|
11
|
+
state = {
|
|
12
|
+
columnDefs: [
|
|
13
|
+
{
|
|
14
|
+
fieldName: "date",
|
|
15
|
+
headerName: "Date",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
fieldName: "note",
|
|
19
|
+
headerName: "Note",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
fieldName: "fromAvatar",
|
|
23
|
+
headerName: "From Avatar",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
fieldName: "fromWallet",
|
|
27
|
+
headerName: "From Wallet",
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
fieldName: "token",
|
|
31
|
+
headerName: "Token"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
fieldName: "amount",
|
|
35
|
+
headerName: "Amount"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
fieldName: "balance",
|
|
39
|
+
headerName: "Balance"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
fieldName: "provider",
|
|
43
|
+
headerName: "Provider"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
fieldName: "type",
|
|
47
|
+
headerName: "Type"
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
defaultColDef: {
|
|
51
|
+
flex: 1,
|
|
52
|
+
minWidth: 150,
|
|
53
|
+
filter: true,
|
|
54
|
+
sortable: true,
|
|
55
|
+
floatingFilter: true,
|
|
56
|
+
resizable: true,
|
|
57
|
+
},
|
|
58
|
+
rowData: null,
|
|
59
|
+
loading: true,
|
|
60
|
+
loggedIn: true,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
onGridReady = async (params) => {
|
|
64
|
+
this.gridApi = params.api;
|
|
65
|
+
this.gridColumnApi = params.columnApi;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
getApiData = () => {
|
|
69
|
+
this.setState({ loading: true })
|
|
70
|
+
|
|
71
|
+
axios({
|
|
72
|
+
method: 'get',
|
|
73
|
+
url: API_BASE_URL,
|
|
74
|
+
headers: {
|
|
75
|
+
'Content-Type': 'application/json'
|
|
76
|
+
},
|
|
77
|
+
})
|
|
78
|
+
.then((response) => {
|
|
79
|
+
this.setState({loading: false})
|
|
80
|
+
|
|
81
|
+
if (response.data.result?.isError) {
|
|
82
|
+
toast.error(response.data.result.message);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
toast.success(response.data.result.message);
|
|
87
|
+
})
|
|
88
|
+
.catch((err) => {
|
|
89
|
+
toast.error('err');
|
|
90
|
+
this.setState({loading: false})
|
|
91
|
+
return { error: true, data: err };
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
render() {
|
|
96
|
+
const { show, hide } = this.props;
|
|
97
|
+
|
|
98
|
+
return (
|
|
99
|
+
<>
|
|
100
|
+
{/* <Modal
|
|
101
|
+
centered
|
|
102
|
+
className="custom-modal custom-popup-component w-100 "
|
|
103
|
+
show={show}
|
|
104
|
+
onHide={() => hide('avatar', 'avatarWallet')}
|
|
105
|
+
>
|
|
106
|
+
<Modal.Body>
|
|
107
|
+
<span className="form-cross-icon" onClick={() => hide('avatar', 'avatarWallet')}>
|
|
108
|
+
<i className="fa fa-times"></i>
|
|
109
|
+
</span>
|
|
110
|
+
|
|
111
|
+
<div className="page new-skin">
|
|
112
|
+
<div className="container opened" data-animation-in="fadeInLeft" data-animation-out="fadeOutLeft">
|
|
113
|
+
|
|
114
|
+
<h1 class="single-heading">Avatar Wallet</h1>
|
|
115
|
+
|
|
116
|
+
<div className="card-started" id="home-card">
|
|
117
|
+
|
|
118
|
+
<div className="profile no-photo">
|
|
119
|
+
<div className="slide" />
|
|
120
|
+
<div className="title">Username</div>
|
|
121
|
+
<div className="subtitle"> User Level </div>
|
|
122
|
+
<div className="lnks">
|
|
123
|
+
<a href="#" className="lnk">
|
|
124
|
+
<span className="text">2D Avatar</span>
|
|
125
|
+
</a>
|
|
126
|
+
<a href="#" className="lnk discover">
|
|
127
|
+
<span className="text">3d Avatar</span>
|
|
128
|
+
</a>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
</Modal.Body>
|
|
136
|
+
</Modal> */}
|
|
137
|
+
|
|
138
|
+
<Modal
|
|
139
|
+
size="xl"
|
|
140
|
+
centered
|
|
141
|
+
className="custom-modal custom-popup-component"
|
|
142
|
+
show={show}
|
|
143
|
+
onHide={() => hide('avatar', 'avatarWallet')}
|
|
144
|
+
>
|
|
145
|
+
<Modal.Body>
|
|
146
|
+
<span className="form-cross-icon" onClick={() => hide('avatar', 'avatarWallet')}>
|
|
147
|
+
<i className="fa fa-times"></i>
|
|
148
|
+
</span>
|
|
149
|
+
|
|
150
|
+
<div className="popup-container default-popup">
|
|
151
|
+
<div className="data-screen-container">
|
|
152
|
+
|
|
153
|
+
<div className="ag-theme-alpine custom-ag-parent">
|
|
154
|
+
<AgGridReact
|
|
155
|
+
columnDefs={this.state.columnDefs}
|
|
156
|
+
defaultColDef={this.state.defaultColDef}
|
|
157
|
+
onGridReady={this.onGridReady}
|
|
158
|
+
rowData={this.state.rowData}
|
|
159
|
+
/>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</Modal.Body>
|
|
164
|
+
</Modal>
|
|
165
|
+
</>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export default AvatarWallet;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Modal } from "react-bootstrap";
|
|
4
|
+
import '../../../../assets/scss/coming-soon.scss';
|
|
5
|
+
import InfoIcon from '../../../../assets/images/icon-info.svg'
|
|
6
|
+
|
|
7
|
+
class EditAvatar extends React.Component {
|
|
8
|
+
state = { }
|
|
9
|
+
render() {
|
|
10
|
+
const { show, hide } = this.props;
|
|
11
|
+
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<Modal
|
|
15
|
+
size="sm"
|
|
16
|
+
show={show}
|
|
17
|
+
dialogClassName=""
|
|
18
|
+
onHide={() => hide('avatar', 'editAvatar')}
|
|
19
|
+
>
|
|
20
|
+
<Modal.Body className="text-center coming-soon">
|
|
21
|
+
<img
|
|
22
|
+
src={InfoIcon}
|
|
23
|
+
alt="icon"
|
|
24
|
+
/>
|
|
25
|
+
<h2>UI Coming Soon</h2>
|
|
26
|
+
<p>You can use this functionality directly by accessing the OASIS API from the Developer menu.</p>
|
|
27
|
+
<button onClick={() => hide('avatar', 'editAvatar')}>OK</button>
|
|
28
|
+
</Modal.Body>
|
|
29
|
+
</Modal>
|
|
30
|
+
</>
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default EditAvatar;
|