Skip to content

Commit

Permalink
Merge branch 'reg-dev' of github.com:metagov/daostar
Browse files Browse the repository at this point in the history
  • Loading branch information
ipatka committed Jan 20, 2023
2 parents 7610877 + b70dab5 commit 17e09de
Show file tree
Hide file tree
Showing 840 changed files with 106,217 additions and 4 deletions.
1 change: 0 additions & 1 deletion api/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,6 @@ <h5 class="card-title">DAOstar Endpoint Service v0.2 <span class="text-muted">(C
form.addEventListener('submit', async function (e) {
e.preventDefault();
const form_data = Object.fromEntries(new FormData(form).entries());
console.log(form_data);
if (checkboxElem.checked) {
window.location.href = `/api/view?cid=${form_data.contract_id}`;
} else {
Expand Down
2 changes: 0 additions & 2 deletions api/manage.html
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ <h5>
body: JSON.stringify(payload)
});

console.log(endpoint, response);
const result = await response.json();

updateAlert.classList.toggle("show");
Expand All @@ -253,7 +252,6 @@ <h5>
fetch(endpoint, { method: 'DELETE' })
.then(resp => resp.json())
.then(data => {
console.log(data);
window.location.href = "/api";
})
}
Expand Down
2 changes: 1 addition & 1 deletion css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ iframe {
align-items: flex-start;
gap: 20px;
/* flex-wrap: wrap; */
margin: 5% auto;
margin: 32px auto;
}
.rows > div {
display: flex;
Expand Down
23 changes: 23 additions & 0 deletions daostar-website/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
3 changes: 3 additions & 0 deletions daostar-website/netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[context.production.environment]
REACT_APP_API_URL = "https://api.daostar.org"
CI = "false"
20,825 changes: 20,825 additions & 0 deletions daostar-website/package-lock.json

Large diffs are not rendered by default.

76 changes: 76 additions & 0 deletions daostar-website/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"name": "daostar-website",
"version": "0.1.0",
"private": true,
"proxy": "https://api.daostar.org/",
"dependencies": {
"@apollo/client": "^3.7.1",
"@blueprintjs/core": "^4.11.5",
"@react-three/fiber": "^8.9.2",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/user-event": "^13.5.0",
"@types/jest": "^29.2.2",
"@types/node": "^18.11.9",
"@types/react": "^18.0.25",
"@types/react-dom": "^18.0.8",
"@web3-react/core": "^6.1.9",
"@web3-react/injected-connector": "^6.0.7",
"@web3-react/walletconnect-connector": "^6.2.13",
"@web3-react/walletlink-connector": "^6.2.14",
"@web3modal/ethereum": "^2.0.0-beta.1",
"@web3modal/react": "^2.0.0-beta.1",
"axios": "^1.1.3",
"axios-hooks": "^4.0.0",
"babel-jest": "^29.3.1",
"caip": "^1.1.0",
"connectkit": "^1.0.0",
"ethers": "^5.7.2",
"graphql": "^16.6.0",
"jest": "^29.3.1",
"loadjs": "^4.2.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-router-dom": "^6.4.2",
"react-scripts": "5.0.1",
"react-three-fiber": "^6.0.13",
"three": "^0.148.0",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4",
"typewriter-effect": "^2.19.0",
"validator": "^13.7.0",
"wagmi": "^0.8.1",
"web-vitals": "^2.1.4",
"web3": "^1.8.1"
},
"scripts": {
"start": "PORT=8000 REACT_APP_API_URL=http://localhost:8080/https://api.daostar.org react-scripts start",
"build": "REACT_APP_API_URL=https://api.daostar.org react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": [
"react-app",
"react-app/jest"
]
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"devDependencies": {
"@babel/preset-env": "^7.20.2",
"@testing-library/react": "^13.4.0",
"react-test-renderer": "^18.2.0",
"source-map-loader": "^4.0.1",
"ts-loader": "^9.4.1"
}
}
1 change: 1 addition & 0 deletions daostar-website/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/* /index.html 200
Binary file added daostar-website/public/favicon.ico
Binary file not shown.
57 changes: 57 additions & 0 deletions daostar-website/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Web site created using create-react-app"
/>
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<link
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono&display=swap"
rel="stylesheet"
/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>DAOstar</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
<script defer type="module">
import { Application } from './scripts/runtime.js';
console.log('application', Application);
const app = new Application();
console.log('app', app);
app.load('/scripts/scene.json');
</script>

<script defer src="/scripts/main.js"></script>

</body>
</html>
Binary file added daostar-website/public/logo192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added daostar-website/public/logo512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions daostar-website/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"short_name": "React App",
"name": "Create React App Sample",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
},
{
"src": "logo192.png",
"type": "image/png",
"sizes": "192x192"
},
{
"src": "logo512.png",
"type": "image/png",
"sizes": "512x512"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}
3 changes: 3 additions & 0 deletions daostar-website/public/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# https://www.robotstxt.org/robotstxt.html
User-agent: *
Disallow:
59 changes: 59 additions & 0 deletions daostar-website/public/scripts/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
// Typing animation https://speckyboy.com/css-javascript-text-animation-snippets/


var TxtRotate = function(el, toRotate, period) {
this.toRotate = toRotate;
this.el = el;
this.loopNum = 0;
this.period = parseInt(period, 10) || 2000;
this.txt = '';
this.tick();
this.isDeleting = false;
};

TxtRotate.prototype.tick = function() {
var i = this.loopNum % this.toRotate.length;
var fullTxt = this.toRotate[i];

if (this.isDeleting) {
this.txt = fullTxt.substring(0, this.txt.length - 1);
} else {
this.txt = fullTxt.substring(0, this.txt.length + 1);
}

this.el.innerHTML = '<span class="wrap">'+this.txt+'</span>';

var that = this;
var delta = 300 - Math.random() * 100;

if (this.isDeleting) { delta /= 2; }

if (!this.isDeleting && this.txt === fullTxt) {
delta = this.period;
this.isDeleting = true;
} else if (this.isDeleting && this.txt === '') {
this.isDeleting = false;
this.loopNum++;
delta = 500;
}

setTimeout(function() {
that.tick();
}, delta);
};

window.onload = function() {
var elements = document.getElementsByClassName('txt-rotate');
for (var i=0; i<elements.length; i++) {
var toRotate = elements[i].getAttribute('data-rotate');
var period = elements[i].getAttribute('data-period');
if (toRotate) {
new TxtRotate(elements[i], JSON.parse(toRotate), period);
}
}
// INJECT CSS
var css = document.createElement("style");
css.type = "text/css";
css.innerHTML = ".txt-rotate > .wrap { border-right: 0.08em solid #666 }";
document.body.appendChild(css);
};
4,395 changes: 4,395 additions & 0 deletions daostar-website/public/scripts/runtime.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions daostar-website/public/scripts/scene.json

Large diffs are not rendered by default.

Loading

0 comments on commit 17e09de

Please sign in to comment.