-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathflags.json
16 lines (16 loc) · 13.5 KB
/
flags.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"components": {
"frontend/widget/obrigado-react.src.bos-landing-page": {
"code": "const contract = \"obrigado.testnet\";\n// const tasks = Near.view(contract, \"get_tasks_from_queue\", {})\n\nconst fontUrl = `https://ipfs.io/ipfs/bafkreicrs3gh7f77yhpw4xiejx35cd56jcczuhvqbwkn77g2ztkrjejopa`;\n\nconst css = `\n\nbody {\n display: inline-block;\n}\n\n@font-face {\n font-family: \"Pixter\";\n src: url(\"${fontUrl}\");\n}\n\na, a:focus, a:visited, a:hover {\n color: white !important;\n}\n\n.apps {\n margin-top: 32px;\n display: grid;\n gap: 16px;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n}\n\n.flex-right {\n padding-left: 16px;\n > p {\n margin-bottom: 2px;\n }\n > .subtle {\n font-size: 0.8rem;\n }\n}\n.gray {\n color: #888 !important;\n}\n\n.header {\n align-content: center;\n flex: 1;\n margin: 100px auto auto auto;\n overflow: hidden;\n height: 600px;\n background-image: url('https://bafybeicc3wlqrkisg2k7ibwss5wlusxfoq7intpgwmhcm4r7ck27fd5eym.ipfs.nftstorage.link/');\n background-size: cover;\n > div {\n padding: 32px;\n h1 {\n font-size: 3rem;\n }\n h2 {\n color: #ddd;\n }\n > div {\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n height: 100%;\n }\n }\n}\n\n.logo {\n width: 350px;\n margin: 200px auto auto auto;\n height: 80px;\n}\n\n .main {\n padding: 32px;\n p {\n color: #ddd;\n }\n }\n\n footer {\n padding-top: 2rem;\n height: 2rem;\n}\n\nfooter a, span {\n color: rgba(255, 255, 255, 0.2);\n}\n\n\n@media only screen and (max-width: 700px) {\n .header {\n flex-direction: column;\n }\n .header-left {\n transform: skew(0);\n }\n .header-left, .header-right {\n width: 100%;\n margin-left: 0;\n border: none;\n }\n .header-content-right {\n top: 260px;\n }\n .noise {\n height: 520px;\n }\n}\n`;\n\nif (!state.theme) {\n State.update({\n theme: styled.div`\n font-family: Pixter;\n background: black;\n color: white;\n ${css}\n`,\n });\n}\nconst Theme = state.theme;\n\n// const featured = [\n// {\n// widgetSrc: \"mm-near.near/widget/zkSyncExp\",\n// accountId: \"mm-near.near\",\n// widgetName: \"zkSyncExp\",\n// alt: \"zkSyncExp\",\n// },\n// ];\nconst featured = [];\n\nState.init({ tasks: [], task_bounty: Number(10), task_url: \"\"});\n\nconst onBountyInputChange = ({ target }) => {\n State.update({ task_bounty: Number(target.value) });\n};\nconst onTaskUrlInputChange = ({ target }) => {\n State.update({ task_url: target.value });\n console.log(tasks)\n};\n\n// const onBtnClick = () => {\n// if (!state.new_greeting) {\n// return;\n// }\n\n// Near.call(contract, \"set_greeting\", {\n// greeting: state.new_greeting,\n// });\n// };\n\nconst onSubmitTaskClick = () => {\n Near.call(contract, \"create_task\", {\n repository_url: state.task_url, \n bounty: state.task_bounty\n },\n 30000000000000,\n 1000000000000000000000000); \n};\n\nconst onClearQueueClick = () => {\n Near.call(contract, \"clear_queue\", {});\n};\nconst onRefreshQueueClick = () => {\n const res = Near.view(contract, \"get_tasks_from_queue\", {});\n console.log(res);\n State.update({ tasks: res });\n};\n\n\n// const greeting = Near.call(contract, \"add_task\", {});\n\nconst submitTaskComponent = (\n <>\n <div className=\"mb-2 center flex\">\n <div className=\"border border-black p-3\">\n <label>Task</label>\n <input className=\"p-2 m-2 rounded-full\" placeholder=\"Wokspace location\" onChange={onTaskUrlInputChange} value={state.task_url}/>\n <input className=\"p-2 m-2 rounded-full\" placeholder=\"Bounty\" onChange={onBountyInputChange} value={state.bounty}/>\n <button className=\"btn btn-primary mt-2\" onClick={onSubmitTaskClick}>\n Submit\n </button>\n <button className=\"btn btn-primary mt-2\" onClick={onClearQueueClick}>\n Clear Queue\n </button>\n </div>\n </div>\n </>\n);\n\nconst notLoggedInWarning = () => {\n return (<>\n <button class=\"btn btn-primary mt-2\" onClick={onBtnClick}>\n Connect wallet\n </button>\n </>);\n};\n\nreturn (\n <Theme>\n <div class=\"header\">\n <img\n class=\"logo\"\n src=\"https://bafkreidsq3r5xof4umfa5mmsfem2kmsfh2nyxo22e5kj7bsqtr6pl3zdke.ipfs.nftstorage.link/\"\n />\n <p>\n Start earning crypto tokens for your hard work today! Join now and\n prosper with Web3 technology.\n </p>\n {context.accountId ? submitTaskComponent : notLoggedInWarning}\n </div>\n\n <div class=\"main\">\n {/* <h3>Search tasks</h3>\n <p class=\"gray\">\n Discover a range of fully decentralized frontends that leverage the\n power of BOS.\n </p> */}\n\n <div class=\"mt-5\">\n <h3>Task Queue</h3>\n </div>\n <div class=\"apps\">\n\n <button className=\"btn btn-primary mt-2\" onClick={onRefreshQueueClick}>\n Refresh Task Queue\n </button>\n {featured.map((component, i) => (\n <div key={i} class=\"widget\">\n <div class=\"flex\">\n <a href={`#/${component.widgetSrc}`} target=\"_blank\">\n <div class=\"image-parent\">\n <Widget\n src=\"mob.near/widget/WidgetImage\"\n props={{\n accountId: component.accountId,\n widgetName: component.widgetName,\n alt: component.widgetName,\n className,\n style: {},\n fallbackUrl:\n \"https://ipfs.near.social/ipfs/bafkreido7gsk4dlb63z3s5yirkkgrjs2nmyar5bxyet66chakt2h5jve6e\",\n }}\n />\n <div class=\"shadow\"></div>\n <div class=\"eth-logo\">\n <img\n src={\n \"https://ipfs.near.social/ipfs/bafkreibkkypb3zybzlwfotwa6tdmelalfnfucmvgzzeqwge4e75mkpq6dq\"\n }\n />\n </div>\n </div>\n </a>\n <div class=\"flex-right\">\n <p>{component.widgetName}</p>\n <p class=\"subtle gray\">Ethereum</p>\n </div>\n </div>\n <p>{component.description}</p>\n\n <a\n href={`#/mob.near/widget/WidgetSource?src=${component.widgetSrc}`}\n target=\"_blank\"\n >\n <i className=\"bi bi-file-earmark-code me-1\"></i>Source\n </a>\n </div>\n ))}\n </div>\n </div>\n\n <div class=\"footer\">\n <div className=\"text-center\">\n <a href=\"/#/thebos.near/widget/Terms\">Terms of Use</a> <span>|</span>{\" \"}\n <a href=\"/#/thebos.near/widget/Privacy\">Privacy Policy</a>\n </div>\n </div>\n </Theme>\n);\n"
},
"frontend/widget/obrigado-react-js.src.components.TempContainer.Card.Card": {
"code": "import FavoriteIcon from \"@mui/icons-material/Favorite\";\nimport VerifiedIcon from \"@mui/icons-material/Verified\";\nimport EventAvailableIcon from \"@mui/icons-material/EventAvailable\";\nimport EmojiEventsIcon from \"@mui/icons-material/EmojiEvents\";\nimport PersonIcon from \"@mui/icons-material/Person\";\nimport \"./stylesCard.css\";\nimport { useState } from \"react\";\n\nconst Card = (props) => {\n const {\n title,\n description,\n imgUrl,\n isOpen,\n prizeBounty,\n usersCount,\n isFavorite,\n } = props;\n\n const [isFav, setIsFav] = useState(isFavorite);\n\n return (\n <div className=\"card\">\n <button\n className={`btn-favorite ${isFav ? \"favorite\" : \"\"}`}\n onClick={() => setIsFav((prev) => !prev)}\n >\n <FavoriteIcon />\n </button>\n\n <img src={imgUrl} alt=\"card\" />\n\n <div className=\"content\">\n <div className=\"letters\">RS</div>\n\n <h1>\n <VerifiedIcon />\n {title}\n <span className={`open-box ${isOpen ? \"open\" : \"closed\"}`}>\n {isOpen ? \"done\" : \"in queue\"}\n </span>\n </h1>\n\n <p>{description}</p>\n\n <ul className=\"properties-list\">\n <li>\n <div className=\"image-wrapper\">\n <EventAvailableIcon />\n </div>\n Today\n </li>\n <li>\n <div className=\"image-wrapper\">\n <EmojiEventsIcon />\n </div>\n {`${prizeBounty.toFixed(2)}$ in prizes`}\n </li>\n <li>\n <div className=\"image-wrapper\">\n <PersonIcon />\n </div>\n {usersCount}\n </li>\n </ul>\n\n {isOpen && (\n <a \n className=\"link-get-bounty\" \n href=\"https://nftstorage.link/ipfs/bafkreifqytgw37znmn6huzfthi7zdh26k2bjedy66fjm6mjhu7m5dj4x7u\" \n download=\"results.zip\"\n >\n Download results\n </a>\n)}\n\n </div>\n </div>\n );\n};\n\nexport default Card;\n"
},
"frontend/widget/obrigado-react-js.src.components.TempContainer.TempContainer": {
"code": "import Card from \"./Card/Card\";\nimport \"./stylesTempContainer.css\";\n\nconst DATA = [\n {\n id: 0,\n title: \"Hello Near!\",\n description: \"Simple Python script running quickly, but showing a great power of the Obrigado disctributed compute marketplace!\",\n isOpen: false,\n isFavorite: true,\n prizeBounty: 1,\n usersCount: 10000,\n imgUrl:\n \"https://images.pexels.com/photos/4194850/pexels-photo-4194850.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500\",\n },\n {\n id: 1,\n title: \"Protein interaction\",\n description: \"Train a network to predict proten docking site for various proteins suing molecular dynamics simulation.\",\n isOpen: false,\n isFavorite: true,\n prizeBounty: 15,\n usersCount: 3,\n imgUrl:\n \"https://images.pexels.com/photos/4194850/pexels-photo-4194850.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500\",\n },\n {\n id: 2,\n title: \"GPT-5\",\n description: \"The largest and most accurate next-generation LLM humanity has ever trained.\",\n isOpen: false,\n isFavorite: false,\n prizeBounty: 300000,\n usersCount: 1,\n imgUrl:\n \"https://images.unsplash.com/photo-1509281373149-e957c6296406?q=80&w=2605&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n },\n {\n id: 3,\n title: \"Hot dog\",\n description: \"Iconic hot dog vs. not hot dog detector. Every hacker's first step into the world of deep tech.\",\n isOpen: true,\n isFavorite: false,\n prizeBounty: 1.5,\n usersCount: 5,\n imgUrl:\n \"https://plus.unsplash.com/premium_photo-1679314213957-909df10381ac?q=80&w=3027&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n },\n {\n id: 4,\n title: \"nanoGPT\",\n description: \"Andrey Karpathy's nanoGPT trained on Shakespeare's sonnets. Small, but simple to understand intro to LLMs.\",\n isOpen: true,\n isFavorite: true,\n prizeBounty: 50,\n usersCount: 10,\n imgUrl:\n \"https://images.unsplash.com/photo-1513542789411-b6a5d4f31634?q=80&w=2874&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n },\n {\n id: 6,\n title: \"ETL pipeline\",\n description: \"Streamlined extraction, transformation, and loading of massive datasets into a data warehouse for enhanced business intelligence.\",\n isOpen: true,\n isFavorite: false,\n prizeBounty: 10,\n usersCount: 5,\n imgUrl:\n \"https://plus.unsplash.com/premium_photo-1679314213957-909df10381ac?q=80&w=3027&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n },\n {\n id: 5,\n title: \"Sentiment Analysis\",\n description: \"NLP-driven sentiment extraction from customer feedback to drive business strategy and product improvements.\",\n isOpen: false,\n isFavorite: false,\n prizeBounty: 20,\n usersCount: 1,\n imgUrl:\n \"https://images.unsplash.com/photo-1509281373149-e957c6296406?q=80&w=2605&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n },\n\n {\n id: 7,\n title: \"Predictive Maintenance\",\n description: \"Automated machine learning pipeline that processes historical sensor data to predict equipment failures before they happen.\",\n isOpen: true,\n isFavorite: true,\n prizeBounty: 40,\n usersCount: 10,\n imgUrl:\n \"https://images.unsplash.com/photo-1513542789411-b6a5d4f31634?q=80&w=2874&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D\",\n },\n];\n\nconst TempContainer = () => {\n return (\n <div className=\"cards_container\">\n {DATA.map((x) => (\n <Card key={x.id} {...x} />\n ))}\n </div>\n );\n};\n\nexport default TempContainer;\n"
},
"frontend/widget/obrigado-react-js.src.components.Steps.StepOne.StepOne": {
"code": "import \"../Step.css\";\n\nconst StepOne = (props) => {\n\n return <div className=\"step-wrapper\">\n <p className=\"step-header\">Scalable & Secure on Near</p>\n <p>Experience unparalleled protection and scalability for your heavy computing tasks,\n enabled by NEAR's robust ecosystem.\n </p>\n </div>\n}\n\nexport default StepOne;"
}
}
}