@oasisomniverse/react 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/README.md +69 -0
- package/package.json +72 -0
- package/src/components/App.js +504 -0
- package/src/components/ForgetPassword.js +126 -0
- package/src/components/Login.js +222 -0
- package/src/components/ResetPassword.js +176 -0
- package/src/components/Signup.js +285 -0
- package/src/components/VerifyEmail.js +68 -0
- package/src/components/common/AvatarConnect.jsx +89 -0
- package/src/components/common/Contact.jsx +60 -0
- package/src/components/common/Eggs.jsx +50 -0
- package/src/components/common/Game.jsx +36 -0
- package/src/components/common/HyperDrive.jsx +50 -0
- package/src/components/common/KarmaToast.jsx +38 -0
- package/src/components/common/Map.jsx +42 -0
- package/src/components/common/MenuMessage.jsx +70 -0
- package/src/components/common/Messaging.jsx +74 -0
- package/src/components/common/Mission.jsx +40 -0
- package/src/components/common/NFT.jsx +42 -0
- package/src/components/common/NavBar.jsx +52 -0
- package/src/components/common/Navbar.js +137 -0
- package/src/components/common/OApp.jsx +41 -0
- package/src/components/common/ONET.jsx +50 -0
- package/src/components/common/ONODE.jsx +49 -0
- package/src/components/common/OasisModal.css +9 -0
- package/src/components/common/OasisModal.jsx +29 -0
- package/src/components/common/ProviderDropdown.js +25 -0
- package/src/components/common/ProviderDropdown.jsx +61 -0
- package/src/components/common/Providers.jsx +38 -0
- package/src/components/common/Quest.jsx +40 -0
- package/src/components/common/SearchAvatars.jsx +49 -0
- package/src/components/common/Seeds.jsx +39 -0
- package/src/components/common/Settings.jsx +70 -0
- package/src/components/common/StarField.jsx +56 -0
- package/src/components/common/Wallet.jsx +45 -0
- package/src/components/common/message/MessageContacts.jsx +66 -0
- package/src/components/common/message/Messages.jsx +75 -0
- package/src/components/common/sidebar/Sidebar.jsx +27 -0
- package/src/components/common/sidebar/SidebarData.js +615 -0
- package/src/components/common/sidebar/SidebarMenuItem.jsx +79 -0
- package/src/components/index.js +26 -0
- package/src/components/pages/forgotPassword.js +47 -0
- package/src/components/popups/avatar/components/AvatarWallet.jsx +169 -0
- package/src/components/popups/avatar/components/EditAvatar.jsx +34 -0
- package/src/components/popups/avatar/components/SearchAvatar.jsx +34 -0
- package/src/components/popups/avatar/components/ViewAvatar.jsx +148 -0
- package/src/components/popups/avatar/index.jsx +39 -0
- package/src/components/popups/comingsoon/ComingSoon.jsx +28 -0
- package/src/components/popups/confirmation/Confirmation.js +30 -0
- package/src/components/popups/contact/index.js +100 -0
- package/src/components/popups/data-screen/components/AddData.jsx +89 -0
- package/src/components/popups/data-screen/components/CrossChainManagement.jsx +87 -0
- package/src/components/popups/data-screen/components/LoadData.jsx +157 -0
- package/src/components/popups/data-screen/components/ManageData.jsx +34 -0
- package/src/components/popups/data-screen/components/OffChainManagement.jsx +177 -0
- package/src/components/popups/data-screen/components/SearchData.jsx +34 -0
- package/src/components/popups/data-screen/index.jsx +52 -0
- package/src/components/popups/eggs/components/ManageEggs.jsx +34 -0
- package/src/components/popups/eggs/components/SearchEggs.jsx +34 -0
- package/src/components/popups/eggs/components/ViewEggs.jsx +34 -0
- package/src/components/popups/eggs/index.jsx +31 -0
- package/src/components/popups/game/components/SearchProfiles.jsx +34 -0
- package/src/components/popups/game/components/ViewAchievements.jsx +34 -0
- package/src/components/popups/game/components/ViewLeagues.jsx +34 -0
- package/src/components/popups/game/components/ViewTournaments.jsx +34 -0
- package/src/components/popups/game/index.jsx +38 -0
- package/src/components/popups/karma/components/SearchKarma.jsx +34 -0
- package/src/components/popups/karma/components/ViewAvatarKarma.jsx +139 -0
- package/src/components/popups/karma/components/ViewKarma.jsx +103 -0
- package/src/components/popups/karma/components/VoteKarma.jsx +34 -0
- package/src/components/popups/karma/index.jsx +34 -0
- package/src/components/popups/map/components/Add2dObjectMap.jsx +34 -0
- package/src/components/popups/map/components/Add3dObjectMap.jsx +34 -0
- package/src/components/popups/map/components/AddQuestToMap.jsx +34 -0
- package/src/components/popups/map/components/DownloadOurWorld.jsx +34 -0
- package/src/components/popups/map/components/ManageMap.jsx +34 -0
- package/src/components/popups/map/components/PlotRouteOnMap.jsx +34 -0
- package/src/components/popups/map/components/SearchMap.jsx +34 -0
- package/src/components/popups/map/components/ViewGlobal3dMap.jsx +34 -0
- package/src/components/popups/map/components/ViewHalonsOnMap.jsx +34 -0
- package/src/components/popups/map/components/ViewOappOnMap.jsx +34 -0
- package/src/components/popups/map/components/ViewQuestOnMap.jsx +34 -0
- package/src/components/popups/map/index.jsx +79 -0
- package/src/components/popups/messages/Message.jsx +86 -0
- package/src/components/popups/mission/components/ManageMission.jsx +34 -0
- package/src/components/popups/mission/components/SearchMission.jsx +34 -0
- package/src/components/popups/mission/components/ViewMission.jsx +34 -0
- package/src/components/popups/mission/index.jsx +32 -0
- package/src/components/popups/nft/ContactPopup.jsx +146 -0
- package/src/components/popups/nft/Solana.jsx +70 -0
- package/src/components/popups/nft/components/ManageOasisNft.jsx +34 -0
- package/src/components/popups/nft/components/PurchaseOasisNft.jsx +34 -0
- package/src/components/popups/nft/components/PurchaseOasisVirtualLandNft.jsx +34 -0
- package/src/components/popups/nft/components/SearchOasisNft.jsx +34 -0
- package/src/components/popups/nft/components/ViewOasisNft.jsx +34 -0
- package/src/components/popups/nft/index.jsx +45 -0
- package/src/components/popups/oapp/components/CreateOAPP.jsx +34 -0
- package/src/components/popups/oapp/components/DeployOAPP.jsx +34 -0
- package/src/components/popups/oapp/components/DownloadOurWorld.jsx +34 -0
- package/src/components/popups/oapp/components/EditOAPP.jsx +34 -0
- package/src/components/popups/oapp/components/InstallOAPP.jsx +34 -0
- package/src/components/popups/oapp/components/LaunchOAPP.jsx +34 -0
- package/src/components/popups/oapp/components/ManageOAPP.jsx +68 -0
- package/src/components/popups/oapp/components/SearchOAPP.jsx +34 -0
- package/src/components/popups/oapp/index.jsx +62 -0
- package/src/components/popups/provider/components/ActivityPub.jsx +34 -0
- package/src/components/popups/provider/components/CompareProviderSpeeds.jsx +123 -0
- package/src/components/popups/provider/components/Eosio.jsx +34 -0
- package/src/components/popups/provider/components/Ethereum.jsx +34 -0
- package/src/components/popups/provider/components/Holochain.jsx +34 -0
- package/src/components/popups/provider/components/Ipfs.jsx +35 -0
- package/src/components/popups/provider/components/ManageAutoFailOver.jsx +34 -0
- package/src/components/popups/provider/components/ManageAutoReplicaton.jsx +34 -0
- package/src/components/popups/provider/components/ManageLoadBalancing.jsx +34 -0
- package/src/components/popups/provider/components/ManageProviders.jsx +34 -0
- package/src/components/popups/provider/components/MongoDb.jsx +34 -0
- package/src/components/popups/provider/components/Neo4j.jsx +34 -0
- package/src/components/popups/provider/components/SearchProviders.jsx +122 -0
- package/src/components/popups/provider/components/Seeds.jsx +34 -0
- package/src/components/popups/provider/components/Solid.jsx +34 -0
- package/src/components/popups/provider/components/SqlLite.jsx +34 -0
- package/src/components/popups/provider/components/ThreeFold.jsx +34 -0
- package/src/components/popups/provider/components/ViewProviderStats.jsx +123 -0
- package/src/components/popups/provider/components/ViewProviders.jsx +121 -0
- package/src/components/popups/provider/index.jsx +113 -0
- package/src/components/popups/quest/components/ManageQuest.jsx +34 -0
- package/src/components/popups/quest/components/SearchQuest.jsx +34 -0
- package/src/components/popups/quest/components/ViewQuest.jsx +34 -0
- package/src/components/popups/quest/index.jsx +32 -0
- package/src/components/popups/seeds/components/AcceptInvite.jsx +61 -0
- package/src/components/popups/seeds/components/DonateSeeds.jsx +178 -0
- package/src/components/popups/seeds/components/ManageSeeds.jsx +34 -0
- package/src/components/popups/seeds/components/PayWithSeeds.jsx +233 -0
- package/src/components/popups/seeds/components/RewardSeeds.jsx +178 -0
- package/src/components/popups/seeds/components/SearchSeeds.jsx +91 -0
- package/src/components/popups/seeds/components/SendInvite.jsx +178 -0
- package/src/components/popups/seeds/components/ViewOrganizations.jsx +178 -0
- package/src/components/popups/seeds/components/ViewSeeds.jsx +221 -0
- package/src/components/popups/seeds/index.jsx +70 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import oasisApi from "oasis-api"
|
|
3
|
+
|
|
4
|
+
class SidebarMenuItem extends React.Component {
|
|
5
|
+
|
|
6
|
+
async componentDidMount(){
|
|
7
|
+
const auth = new oasisApi.Auth()
|
|
8
|
+
const user = await auth.getUser()
|
|
9
|
+
if(!user.error){
|
|
10
|
+
this.setState({user: user.data})
|
|
11
|
+
console.log(user);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
state = {
|
|
16
|
+
show: false
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
expandHandler = () => {
|
|
20
|
+
this.setState({
|
|
21
|
+
show: !this.state.show
|
|
22
|
+
})
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
render() {
|
|
26
|
+
const { item } = this.props;
|
|
27
|
+
return (
|
|
28
|
+
<>
|
|
29
|
+
<li>
|
|
30
|
+
<a onClick={this.expandHandler}>{item.name}</a>
|
|
31
|
+
|
|
32
|
+
<ul className={`sidebar-inner-menu ${this.state.show ? 'show' : ''}`} id={item.id}>
|
|
33
|
+
{
|
|
34
|
+
item.subMenu.map((subItem, index) =>
|
|
35
|
+
<li key={index}>
|
|
36
|
+
{/* {
|
|
37
|
+
subItem.disabled || (subItem.loginRequired && !this.state.user)
|
|
38
|
+
?
|
|
39
|
+
<a className='disabled'>{subItem.name}</a>
|
|
40
|
+
|
|
41
|
+
:
|
|
42
|
+
<a
|
|
43
|
+
target={subItem.externalLink ? '_blank': ''}
|
|
44
|
+
href={subItem.path}
|
|
45
|
+
onClick={
|
|
46
|
+
() => this.props.toggleScreenPopup(item.name, subItem.popupName)
|
|
47
|
+
}
|
|
48
|
+
>{subItem.name}</a>
|
|
49
|
+
} */}
|
|
50
|
+
|
|
51
|
+
{
|
|
52
|
+
subItem.externalLink ?
|
|
53
|
+
|
|
54
|
+
<a
|
|
55
|
+
target={subItem.externalLink ? '_blank': ''}
|
|
56
|
+
href={subItem.path}
|
|
57
|
+
>{subItem.name}</a>
|
|
58
|
+
:
|
|
59
|
+
|
|
60
|
+
<a
|
|
61
|
+
target={subItem.externalLink ? '_blank': ''}
|
|
62
|
+
href={subItem.path}
|
|
63
|
+
onClick={
|
|
64
|
+
() => this.props.toggleScreenPopup(item.name, subItem.popupName)
|
|
65
|
+
// () => this.props.toggleScreenPopup(item, subItem)
|
|
66
|
+
}
|
|
67
|
+
>{subItem.name}</a>
|
|
68
|
+
}
|
|
69
|
+
</li>
|
|
70
|
+
)
|
|
71
|
+
}
|
|
72
|
+
</ul>
|
|
73
|
+
</li>
|
|
74
|
+
</>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export default SidebarMenuItem;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
// @oasisomniverse/react — OASIS Omniverse React components
|
|
2
|
+
|
|
3
|
+
export { AvatarConnect } from './common/AvatarConnect';
|
|
4
|
+
export { Contact } from './common/Contact';
|
|
5
|
+
export { Eggs } from './common/Eggs';
|
|
6
|
+
export { Game } from './common/Game';
|
|
7
|
+
export { HyperDrive } from './common/HyperDrive';
|
|
8
|
+
export { KarmaToast } from './common/KarmaToast';
|
|
9
|
+
export { Map } from './common/Map';
|
|
10
|
+
export { MenuMessage } from './common/MenuMessage';
|
|
11
|
+
export { Messaging } from './common/Messaging';
|
|
12
|
+
export { Mission } from './common/Mission';
|
|
13
|
+
export { NavBar } from './common/NavBar';
|
|
14
|
+
export { NFT } from './common/NFT';
|
|
15
|
+
export { OApp } from './common/OApp';
|
|
16
|
+
export { OasisModal } from './common/OasisModal';
|
|
17
|
+
export { ONET } from './common/ONET';
|
|
18
|
+
export { ONODE } from './common/ONODE';
|
|
19
|
+
export { ProviderDropdown } from './common/ProviderDropdown';
|
|
20
|
+
export { Providers } from './common/Providers';
|
|
21
|
+
export { Quest } from './common/Quest';
|
|
22
|
+
export { SearchAvatars } from './common/SearchAvatars';
|
|
23
|
+
export { Seeds } from './common/Seeds';
|
|
24
|
+
export { Settings } from './common/Settings';
|
|
25
|
+
export { StarField } from './common/StarField';
|
|
26
|
+
export { Wallet } from './common/Wallet';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import axios from "axios";
|
|
3
|
+
import { toast } from "react-toastify";
|
|
4
|
+
import oasisApi from "oasis-api";
|
|
5
|
+
|
|
6
|
+
class ForgotPassword extends React.Component {
|
|
7
|
+
state = { }
|
|
8
|
+
|
|
9
|
+
componentDidMount = () => {
|
|
10
|
+
this.forgetPasswordUrlSearch();
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
forgetPasswordUrlSearch = () => {
|
|
14
|
+
const queryParams = new URLSearchParams(this.props.location.search);
|
|
15
|
+
const email = queryParams.get("email");
|
|
16
|
+
|
|
17
|
+
let data = {
|
|
18
|
+
email: email
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const auth = new oasisApi.Auth();
|
|
22
|
+
auth.forgotPassword(data)
|
|
23
|
+
.then(response => {
|
|
24
|
+
console.log(response)
|
|
25
|
+
if(response.data.result.isError) {
|
|
26
|
+
toast.error(response.data.result.message)
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
toast.success(response.data.result.message);
|
|
30
|
+
this.props.history.goBack()
|
|
31
|
+
}).catch(error => {
|
|
32
|
+
console.log(error)
|
|
33
|
+
this.setState({ loading: false })
|
|
34
|
+
toast.error(error.data.result.message);
|
|
35
|
+
this.props.history.goBack()
|
|
36
|
+
})
|
|
37
|
+
}
|
|
38
|
+
render() {
|
|
39
|
+
return (
|
|
40
|
+
<>
|
|
41
|
+
|
|
42
|
+
</>
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export default ForgotPassword;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from 'react-bootstrap';
|
|
3
|
+
import '../../../../assets/scss/avatar-popup.scss';
|
|
4
|
+
import { AgGridReact } from 'ag-grid-react';
|
|
5
|
+
import axios from "axios";
|
|
6
|
+
import { toast } from 'react-toastify';
|
|
7
|
+
import API_BASE_URL from "../../../../config/api";
|
|
8
|
+
|
|
9
|
+
class AvatarWallet extends React.Component {
|
|
10
|
+
state = {
|
|
11
|
+
columnDefs: [
|
|
12
|
+
{
|
|
13
|
+
fieldName: "date",
|
|
14
|
+
headerName: "Date",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
fieldName: "note",
|
|
18
|
+
headerName: "Note",
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
fieldName: "fromAvatar",
|
|
22
|
+
headerName: "From Avatar",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
fieldName: "fromWallet",
|
|
26
|
+
headerName: "From Wallet",
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
fieldName: "token",
|
|
30
|
+
headerName: "Token"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
fieldName: "amount",
|
|
34
|
+
headerName: "Amount"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
fieldName: "balance",
|
|
38
|
+
headerName: "Balance"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
fieldName: "provider",
|
|
42
|
+
headerName: "Provider"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
fieldName: "type",
|
|
46
|
+
headerName: "Type"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
defaultColDef: {
|
|
50
|
+
flex: 1,
|
|
51
|
+
minWidth: 150,
|
|
52
|
+
filter: true,
|
|
53
|
+
sortable: true,
|
|
54
|
+
floatingFilter: true,
|
|
55
|
+
resizable: true,
|
|
56
|
+
},
|
|
57
|
+
rowData: null,
|
|
58
|
+
loading: true,
|
|
59
|
+
loggedIn: true,
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
onGridReady = async (params) => {
|
|
63
|
+
this.gridApi = params.api;
|
|
64
|
+
this.gridColumnApi = params.columnApi;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
getApiData = () => {
|
|
68
|
+
this.setState({ loading: true })
|
|
69
|
+
|
|
70
|
+
axios({
|
|
71
|
+
method: 'get',
|
|
72
|
+
url: API_BASE_URL,
|
|
73
|
+
headers: {
|
|
74
|
+
'Content-Type': 'application/json'
|
|
75
|
+
},
|
|
76
|
+
})
|
|
77
|
+
.then((response) => {
|
|
78
|
+
this.setState({loading: false})
|
|
79
|
+
|
|
80
|
+
if (response.data.result?.isError) {
|
|
81
|
+
toast.error(response.data.result.message);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
toast.success(response.data.result.message);
|
|
86
|
+
})
|
|
87
|
+
.catch((err) => {
|
|
88
|
+
toast.error('err');
|
|
89
|
+
this.setState({loading: false})
|
|
90
|
+
return { error: true, data: err };
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
render() {
|
|
95
|
+
const { show, hide } = this.props;
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
{/* <Modal
|
|
100
|
+
centered
|
|
101
|
+
className="custom-modal custom-popup-component w-100 "
|
|
102
|
+
show={show}
|
|
103
|
+
onHide={() => hide('avatar', 'avatarWallet')}
|
|
104
|
+
>
|
|
105
|
+
<Modal.Body>
|
|
106
|
+
<span className="form-cross-icon" onClick={() => hide('avatar', 'avatarWallet')}>
|
|
107
|
+
<i className="fa fa-times"></i>
|
|
108
|
+
</span>
|
|
109
|
+
|
|
110
|
+
<div className="page new-skin">
|
|
111
|
+
<div className="container opened" data-animation-in="fadeInLeft" data-animation-out="fadeOutLeft">
|
|
112
|
+
|
|
113
|
+
<h1 class="single-heading">Avatar Wallet</h1>
|
|
114
|
+
|
|
115
|
+
<div className="card-started" id="home-card">
|
|
116
|
+
|
|
117
|
+
<div className="profile no-photo">
|
|
118
|
+
<div className="slide" />
|
|
119
|
+
<div className="title">Username</div>
|
|
120
|
+
<div className="subtitle"> User Level </div>
|
|
121
|
+
<div className="lnks">
|
|
122
|
+
<a href="#" className="lnk">
|
|
123
|
+
<span className="text">2D Avatar</span>
|
|
124
|
+
</a>
|
|
125
|
+
<a href="#" className="lnk discover">
|
|
126
|
+
<span className="text">3d Avatar</span>
|
|
127
|
+
</a>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</Modal.Body>
|
|
135
|
+
</Modal> */}
|
|
136
|
+
|
|
137
|
+
<Modal
|
|
138
|
+
size="xl"
|
|
139
|
+
centered
|
|
140
|
+
className="custom-modal custom-popup-component"
|
|
141
|
+
show={show}
|
|
142
|
+
onHide={() => hide('avatar', 'avatarWallet')}
|
|
143
|
+
>
|
|
144
|
+
<Modal.Body>
|
|
145
|
+
<span className="form-cross-icon" onClick={() => hide('avatar', 'avatarWallet')}>
|
|
146
|
+
<i className="fa fa-times"></i>
|
|
147
|
+
</span>
|
|
148
|
+
|
|
149
|
+
<div className="popup-container default-popup">
|
|
150
|
+
<div className="data-screen-container">
|
|
151
|
+
|
|
152
|
+
<div className="ag-theme-alpine custom-ag-parent">
|
|
153
|
+
<AgGridReact
|
|
154
|
+
columnDefs={this.state.columnDefs}
|
|
155
|
+
defaultColDef={this.state.defaultColDef}
|
|
156
|
+
onGridReady={this.onGridReady}
|
|
157
|
+
rowData={this.state.rowData}
|
|
158
|
+
/>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</Modal.Body>
|
|
163
|
+
</Modal>
|
|
164
|
+
</>
|
|
165
|
+
);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
export default AvatarWallet;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from "react-bootstrap";
|
|
3
|
+
import '../../../../assets/scss/coming-soon.scss';
|
|
4
|
+
import InfoIcon from '../../../../assets/images/icon-info.svg'
|
|
5
|
+
|
|
6
|
+
class EditAvatar extends React.Component {
|
|
7
|
+
state = { }
|
|
8
|
+
render() {
|
|
9
|
+
const { show, hide } = this.props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<Modal
|
|
14
|
+
size="sm"
|
|
15
|
+
show={show}
|
|
16
|
+
dialogClassName=""
|
|
17
|
+
onHide={() => hide('avatar', 'editAvatar')}
|
|
18
|
+
>
|
|
19
|
+
<Modal.Body className="text-center coming-soon">
|
|
20
|
+
<img
|
|
21
|
+
src={InfoIcon}
|
|
22
|
+
alt="icon"
|
|
23
|
+
/>
|
|
24
|
+
<h2>UI Coming Soon</h2>
|
|
25
|
+
<p>You can use this functionality directly by accessing the OASIS API from the Developer menu.</p>
|
|
26
|
+
<button onClick={() => hide('avatar', 'editAvatar')}>OK</button>
|
|
27
|
+
</Modal.Body>
|
|
28
|
+
</Modal>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default EditAvatar;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Modal } from "react-bootstrap";
|
|
3
|
+
import '../../../../assets/scss/coming-soon.scss';
|
|
4
|
+
import InfoIcon from '../../../../assets/images/icon-info.svg'
|
|
5
|
+
|
|
6
|
+
class SearchAvatar extends React.Component {
|
|
7
|
+
state = { }
|
|
8
|
+
render() {
|
|
9
|
+
const { show, hide } = this.props;
|
|
10
|
+
|
|
11
|
+
return (
|
|
12
|
+
<>
|
|
13
|
+
<Modal
|
|
14
|
+
size="sm"
|
|
15
|
+
show={show}
|
|
16
|
+
dialogClassName=""
|
|
17
|
+
onHide={() => hide('avatar', 'searchAvatar')}
|
|
18
|
+
>
|
|
19
|
+
<Modal.Body className="text-center coming-soon">
|
|
20
|
+
<img
|
|
21
|
+
src={InfoIcon}
|
|
22
|
+
alt="icon"
|
|
23
|
+
/>
|
|
24
|
+
<h2>UI Coming Soon</h2>
|
|
25
|
+
<p>You can use this functionality directly by accessing the OASIS API from the Developer menu.</p>
|
|
26
|
+
<button onClick={() => hide('avatar', 'searchAvatar')}>OK</button>
|
|
27
|
+
</Modal.Body>
|
|
28
|
+
</Modal>
|
|
29
|
+
</>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default SearchAvatar;
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
// import axios from "axios";
|
|
3
|
+
import { Modal } from "react-bootstrap";
|
|
4
|
+
|
|
5
|
+
// import { login, getUserById } from "../../../../functions";
|
|
6
|
+
// import ReactGrid from "../../../ReactGrid";
|
|
7
|
+
import { AgGridReact } from 'ag-grid-react'
|
|
8
|
+
import '../../../../assets/scss/avatar-popup.scss';
|
|
9
|
+
import oasisApi from "oasis-api";
|
|
10
|
+
import axios from "axios";
|
|
11
|
+
import { toast } from 'react-toastify';
|
|
12
|
+
import API_BASE_URL from "../../../../config/api";
|
|
13
|
+
|
|
14
|
+
class ViewAvatar extends React.Component {
|
|
15
|
+
state = {
|
|
16
|
+
columnDefs: [
|
|
17
|
+
{
|
|
18
|
+
field: 'avatar',
|
|
19
|
+
// filterParams: filterParams,
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
field: 'level',
|
|
23
|
+
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
field: 'karma'
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
field: 'sex',
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
field: 'created'
|
|
33
|
+
},
|
|
34
|
+
|
|
35
|
+
{
|
|
36
|
+
field: 'last'
|
|
37
|
+
},
|
|
38
|
+
|
|
39
|
+
{
|
|
40
|
+
field: 'online'
|
|
41
|
+
},
|
|
42
|
+
],
|
|
43
|
+
defaultColDef: {
|
|
44
|
+
flex: 1,
|
|
45
|
+
minWidth: 150,
|
|
46
|
+
filter: true,
|
|
47
|
+
sortable: true,
|
|
48
|
+
floatingFilter: true,
|
|
49
|
+
resizable: true,
|
|
50
|
+
},
|
|
51
|
+
rowData: null,
|
|
52
|
+
loading: true,
|
|
53
|
+
loggedIn: true,
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
onGridReady = async (params) => {
|
|
57
|
+
this.gridApi = params.api;
|
|
58
|
+
this.gridColumnApi = params.columnApi;
|
|
59
|
+
|
|
60
|
+
const avatar = new oasisApi.Avatar()
|
|
61
|
+
const karma = new oasisApi.Karma()
|
|
62
|
+
|
|
63
|
+
const res = await avatar.getAll()
|
|
64
|
+
if(!res.error){
|
|
65
|
+
let avatars=[]
|
|
66
|
+
const users = res.data.result
|
|
67
|
+
for(let i=0; i<=users.length-1; i++){
|
|
68
|
+
let user = users[i]
|
|
69
|
+
console.log('user')
|
|
70
|
+
const karmaRes = await karma.getKarmaForAvatar(user.avatarId)
|
|
71
|
+
console.log(karmaRes)
|
|
72
|
+
let temp = {
|
|
73
|
+
avatar: user.username,
|
|
74
|
+
level: 1,
|
|
75
|
+
karma: karmaRes.data.result,
|
|
76
|
+
sex: user.title === 'Mr' ? 'Male':'Female',
|
|
77
|
+
created: 'Now',
|
|
78
|
+
last: 'Now ',
|
|
79
|
+
online: user.isBeamedIn
|
|
80
|
+
}
|
|
81
|
+
avatars.push(temp)
|
|
82
|
+
}
|
|
83
|
+
this.setState({rowData: avatars})
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
getApiData = () => {
|
|
88
|
+
this.setState({ loading: true })
|
|
89
|
+
|
|
90
|
+
axios({
|
|
91
|
+
method: 'get',
|
|
92
|
+
url: API_BASE_URL,
|
|
93
|
+
headers: {
|
|
94
|
+
'Content-Type': 'application/json'
|
|
95
|
+
},
|
|
96
|
+
})
|
|
97
|
+
.then((response) => {
|
|
98
|
+
this.setState({loading: false})
|
|
99
|
+
|
|
100
|
+
if (response.data.result?.isError) {
|
|
101
|
+
toast.error(response.data.result.message);
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
toast.success(response.data.result.message);
|
|
106
|
+
})
|
|
107
|
+
.catch((err) => {
|
|
108
|
+
toast.error('err');
|
|
109
|
+
this.setState({loading: false})
|
|
110
|
+
return { error: true, data: err };
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
render() {
|
|
115
|
+
const { show, hide } = this.props;
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<>
|
|
119
|
+
<Modal
|
|
120
|
+
centered
|
|
121
|
+
className="custom-modal custom-popup-component light-custom-popup"
|
|
122
|
+
show={show}
|
|
123
|
+
dialogClassName=""
|
|
124
|
+
onHide={() => hide('avatar', 'viewAvatar')}
|
|
125
|
+
>
|
|
126
|
+
<Modal.Body>
|
|
127
|
+
<span className="form-cross-icon" onClick={() => hide('avatar', 'viewAvatar')}>
|
|
128
|
+
<i className="fa fa-times"></i>
|
|
129
|
+
</span>
|
|
130
|
+
|
|
131
|
+
<h1 className="single-heading">View Avatar</h1>
|
|
132
|
+
|
|
133
|
+
<div className="ag-theme-alpine custom-ag-parent">
|
|
134
|
+
<AgGridReact
|
|
135
|
+
columnDefs={this.state.columnDefs}
|
|
136
|
+
defaultColDef={this.state.defaultColDef}
|
|
137
|
+
onGridReady={this.onGridReady}
|
|
138
|
+
rowData={this.state.rowData}
|
|
139
|
+
/>
|
|
140
|
+
</div>
|
|
141
|
+
</Modal.Body>
|
|
142
|
+
</Modal>
|
|
143
|
+
</>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export default ViewAvatar
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
// import AvatarDetail from './components/AvatarDetail';
|
|
4
|
+
import AvatarWallet from './components/AvatarWallet';
|
|
5
|
+
import EditAvatar from './components/EditAvatar';
|
|
6
|
+
import SearchAvatar from './components/SearchAvatar';
|
|
7
|
+
import ViewAvatar from './components/ViewAvatar';
|
|
8
|
+
|
|
9
|
+
class Avatar extends React.Component {
|
|
10
|
+
|
|
11
|
+
render() {
|
|
12
|
+
const props=this.props;
|
|
13
|
+
return(
|
|
14
|
+
<>
|
|
15
|
+
<ViewAvatar
|
|
16
|
+
show={props.avatar.viewAvatar}
|
|
17
|
+
hide={props.toggleScreenPopup}
|
|
18
|
+
/>
|
|
19
|
+
|
|
20
|
+
<EditAvatar
|
|
21
|
+
show={props.avatar.editAvatar}
|
|
22
|
+
hide={props.toggleScreenPopup}
|
|
23
|
+
/>
|
|
24
|
+
|
|
25
|
+
<SearchAvatar
|
|
26
|
+
show={props.avatar.searchAvatar}
|
|
27
|
+
hide={props.toggleScreenPopup}
|
|
28
|
+
/>
|
|
29
|
+
|
|
30
|
+
<AvatarWallet
|
|
31
|
+
show={props.avatar.avatarWallet}
|
|
32
|
+
hide={props.toggleScreenPopup}
|
|
33
|
+
/>
|
|
34
|
+
</>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default Avatar;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "react-bootstrap";
|
|
3
|
+
import '../../../assets/scss/coming-soon.scss';
|
|
4
|
+
import InfoIcon from '../../../assets/images/icon-info.svg'
|
|
5
|
+
class ComingSoon extends React.Component {
|
|
6
|
+
render() {
|
|
7
|
+
return (
|
|
8
|
+
<Modal
|
|
9
|
+
size="sm"
|
|
10
|
+
show={this.props.show}
|
|
11
|
+
dialogClassName=""
|
|
12
|
+
onHide={this.props.toggleScreenPopup}
|
|
13
|
+
>
|
|
14
|
+
<Modal.Body className="text-center coming-soon">
|
|
15
|
+
<img
|
|
16
|
+
src={InfoIcon}
|
|
17
|
+
alt="icon"
|
|
18
|
+
/>
|
|
19
|
+
<h2>Coming Soon</h2>
|
|
20
|
+
<p>This module is coming soon...</p>
|
|
21
|
+
<button onClick={this.props.toggleScreenPopup}>OK</button>
|
|
22
|
+
</Modal.Body>
|
|
23
|
+
</Modal>
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default ComingSoon;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Modal } from "react-bootstrap";
|
|
3
|
+
import '../../../assets/scss/coming-soon.scss';
|
|
4
|
+
import InfoIcon from '../../../assets/images/icon-info.svg';
|
|
5
|
+
|
|
6
|
+
class Confirmation extends React.Component {
|
|
7
|
+
render() {
|
|
8
|
+
return (
|
|
9
|
+
<Modal
|
|
10
|
+
size="sm"
|
|
11
|
+
show={this.props.show}
|
|
12
|
+
onHide={this.props.hide}
|
|
13
|
+
>
|
|
14
|
+
<Modal.Body className="text-center coming-soon">
|
|
15
|
+
<img
|
|
16
|
+
src={InfoIcon}
|
|
17
|
+
alt="icon"
|
|
18
|
+
/>
|
|
19
|
+
<h2>Are you Sure?</h2>
|
|
20
|
+
<p>Are you sure you want to Beam Out?</p>
|
|
21
|
+
|
|
22
|
+
<button onClick={this.props.hide}>Cancel</button>
|
|
23
|
+
<button onClick={this.props.logout}>Beam Out</button>
|
|
24
|
+
</Modal.Body>
|
|
25
|
+
</Modal>
|
|
26
|
+
);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default Confirmation;
|