hellojags / skapp-ux-private Goto Github PK
View Code? Open in Web Editor NEWSkapp - Skynet AppStore, App Hosting Platform
License: MIT License
Skapp - Skynet AppStore, App Hosting Platform
License: MIT License
Please clear all console warning /error
Warning: Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?
Check the render method of SubmitApp
.
at Controller (http://localhost:3001/static/js/0.chunk.js:238971:5)
at div
at Styled(MuiBox) (http://localhost:3001/static/js/0.chunk.js:192236:28)
at div
at Styled(MuiBox) (http://localhost:3001/static/js/0.chunk.js:192236:28)
at div
at Styled(MuiBox) (http://localhost:3001/static/js/0.chunk.js:192236:28)
at form
at Styled(MuiBox) (http://localhost:3001/static/js/0.chunk.js:192236:28)
at div
at Styled(MuiBox) (http://localhost:3001/static/js/0.chunk.js:192236:28)
at SubmitApp (http://localhost:3001/static/js/main.chunk.js:19599:101)
at Route (http://localhost:3001/static/js/0.chunk.js:243441:29)
at Switch (http://localhost:3001/static/js/0.chunk.js:243643:29)
at main
at section
at div
at ThemeProvider (http://localhost:3001/static/js/0.chunk.js:191167:24)
at Router (http://localhost:3001/static/js/0.chunk.js:243076:30)
at BrowserRouter (http://localhost:3001/static/js/0.chunk.js:242696:35)
at Provider (http://localhost:3001/static/js/0.chunk.js:240096:20)
at App
console. @ index.js:1
..
there are few more warning in red
** Mandatory fields ***
Logo
AppName
Version
App Website URL
Category
App Description
On Submit, if all mandatory fields are not filled, It will highlight a message to fill all fields.
please check attached screenshot for mapping fields from app.json
Comments on App Details page
-- USER SHOULD BE ABLE TO ADD COMMENTS
-- IT SHOULD STORE AS JSON IN INDEXED DB. REFER attached "COMMENT.JSON" FORMAT
{
"$type": "publishedSkapp",
"id": "SKAPP_ID",
"version": "1.0",
"ts": "1610328319",
"content": {
"skappLogo": {
"0": {}
},
"appname": "SkyApp",
"demoUrl": "https://skyapp.hns/demo",
"appUrl": "https://skyapp.hns",
"sourceCode": "https://github.com",
"images": {
"0": {},
"1": {},
"2": {}
},
"appDescription": "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et.",
"age": {
"value": "18",
"label": "18"
},
"category": [
{
"value": "social",
"label": "social"
}
],
"appStatus": [
{
"value": "Alpha",
"label": "Alpha"
}
]
},
"defaultPath": "index.html or EMPTY"
}
{
"$type": "skapp",
"$subType": "published", <-- new field, hard coded
"id": "SKAPP_ID - auto-generated uuid",
"version": "1",
"prevSkylink":"Leave it blank for now",
"content": {
"skappLogo": "[46 Character SKYLINK]", <- Skylink you will get from skynet api after you upload file.
"appname": "SkyFeed",
"demoUrl": "url or skylink",<- user Input
"age": "one of the selected value",
"appUrl": "skylink URL",<- user Input
"defaultPath": "index.html or EMPTY",<- user Input, text field (New)
"sourceCode": "git url",<- user Input,
"category": "one selected category",
"tags": [
"tag1",
"tag2"
],
"appStatus": [
"one of the selected value beta|alpha|live"
],
"previewImages": {
"aspectRatio": 0.5625, <-- hard coded
"images": [
{
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",<- Skylink of Thumnail of uploaded Image
"image": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"<- Skylink of actual uploaded Image
},
{
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",
"image": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"
},
{
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",
"image": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"
},
{
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",
"image": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"
}
]
},
"previewVideo": {
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",<- Skylink of Thumnail of uploaded video
"mp4+1080x1920": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"<- Skylink of actual uploaded video
},
"appDescription": "",<- app description
"releaseNotes": "",<- app release note - use field above "Detailed Description" for releaseNotes. ("Preview Images" label for text area was typo mistake)
"history": [
"list of skylinks"
], <-- leave it as empty array. I will take care of it.
"supportDetails": "", <- user Input, text area (New)
"connections": {
"twitter": "",
"email": "",
"discord": ""
}
},
"ts": 1610328319
}
This is applicable for all images / video uploaded on form .
****** ** Code for generating video thumbnail is provided at end**
//Step 1 : Generate Thumbnail
const videoThumbnail = await generateThumbnailFromVideo({ file })
//Step 2 : upload actual video and thumbnail to skynet using methods provided by me earlier and get Skylinks(It will be two back to back for and You will get two skylink)
//Step 3 : Display thumbnail in SubmitForm " Video Card" preview (url: https://siasky.net/SKYLINK_1 <-- thumbnail skylink)
//Step 4 : on submit, save Skylink of thumbnail and actual video in JSON Field
"previewVideo": {
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",<- Skylink of Thumnail of uploaded video
"mp4+1080x1920": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"<- Skylink of actual uploaded video
},
//Step 1 : Generate Thumbnail
const compressedImgFile = await getCompressedImageFile(file);
//Step 2 : upload actual Image and Thumbnail to skynet using methods provided by me earlier and get Skylinks(It will be two back to back call , 1 for image and 1 for thumnail)
//Step 3 : Display thumbnail in SubmitForm " Image Card" preview
//Step 4 : on submit, save Skylink of thumbnail and actual Image in JSON Field
"images": [
{
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",<- Skylink of Thumnail of uploaded Image
"image": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"<- Skylink of actual uploaded Image
},
{
"thumbnail": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg",
"image": "sia://PAF7C6slOWpgCM9CTjrtuwA51yBgsLMOARI86gaoadFoHg"
},
// ########################## Code for Image and Video Compression ########/
import imageCompression from "browser-image-compression"
/**
/**
Please share URL to view data, aso attached working screenshot here,
I am using below url and it didn't show data I entered
http://localhost:3000/appdetail/UUID <-- here I entered UUID I get in alert
Please display rotating circle on Image/Video card while file (Image/Video) upload is in progress.
Tag needs to work like the way category is working now. multiple tags can be added
if mandatory fields are not filled, On form submit please display message (in red) next to field name showing fields are mandatory.
Code Example:
https://codesandbox.io/s/react-hook-form-apply-validation-px4jp (Live demo)
https://react-hook-form.com/get-started#Applyvalidation
Show loaded on OnSUbmit action and loader should stop when JSON is saved successfully.
This will to avoid multiple submit on same form.
Currently submit action is working on only one submit button. there is submit button at the end of page as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.