GithubHelp home page GithubHelp logo

ufe-pr / vitasensus Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 2.0 1.87 MB

Home Page: https://vitasensus.vercel.app/

License: GNU General Public License v3.0

JavaScript 1.63% HTML 0.69% TypeScript 95.12% CSS 1.05% Solidity 1.39% Shell 0.13%
react soliditypp

vitasensus's Introduction

The Official Vite Dapp Template

Getting Started

npm install

# run unit test for test/*.spec.ts
npx vuilder test

# deploy contract
# edit scripts/deploy.config.json && run deploy scripts
npx ts-node scripts/deploy.ts

# stake quota for contract(by web-wallet)

Getting Started with the Frontend

A frontend created with create-react-app using React, TypeScript, and Tailwind CSS has been created under the frontend folder.

Features frontend implements out of the box:

  • Routing with react-router-dom v6
  • Global state management using a higher-order component called connect which connects the passed in component to a single context.
    • Implemented in globalContext.tsx
    • The initial global state is set in App.tsx
    • To mutate the global state, a setState function is passed to all connected components as a prop.
      • Pass an object to it and its properties will be shallow merged with the current global state
        • e.g. setState({ networkType: network })
        • To deep merge, pass a second meta object to setState like:
           setState({ a: { b: 'c' } }, { deepMerge: true });
           // { a: { d: 3 } } => { a: { d: 3, b: 'c' } }
    • Note: all non-page component that are connected go in the containers folder, else they go in the components folder.
    • The State type can be modified in types.ts
  • ViteConnect for signing transactions with the Vite Wallet iOS / Android app
    • Implemented in viteConnect.ts
      • This handles saving the ViteConnect session to a browsers localStorage to persist it after reloading the page
      • To call a contract, a callContract function is passed to all connected components as a prop.
      • Contracts should be stored in the contracts folder.
  • internationalization (i18n)
  • Light, Dark, and System themes
  • Toast alerts
    • Implemented in Toast.tsx
    • To use, call setState({ toast: 'message' }) in a connected component.

This is a fork of dapp-buymeacoffee

vitasensus's People

Contributors

ufe-pr avatar wepsree avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

vitasensus's Issues

Edit proposal

As the sponsor of the proposal, you can edit the proposal again to avoid typos, or wrong dates, etc.

Can't see my proposal

After launching the proposal, I voted. My vite has been deducted from the vote, but the voting result is not displayed on the front end, and my proposal cannot be seen on the project home page.

image

Cannot create new project

Even if the network is congested, it should be possible to create projects with enough vite staked

image

space logo

By the way, what are the requirements for the link of the icon, I use this link, but the created project does not display the logo

https://reurl.cc/ZbabGV

project dispaly

Click to switch the project on the left, the project logo is updated to Honey bee, but the proposal still displays Floppy disk

image

cannot create proposals

When I set as below, Create proposal threshold >=1000

My other address has 5000vite but cannot create proposals

image

Suggest

At the same time, I think the following functions need to be added, otherwise the project cannot be edited and it will be bad

  1. Add Proposal threshold, Proposal threshold is the minimum number of tokens required to create a proposal.

  2. Add Allow only admins to submit a proposal,
    admins will be able to create proposals without being constrained by filters. You must add one address per line. Once enabled, only admins will be allowed to post proposals

  3. When creating a project, the creation page needs to have the Admin option. The default address for creating a project is the administrator, and other addresses can be added as adminis.
    As the Admin address, you can edit the information of the project, such as updating the logo, project description, modifying the Proposal threshold, etc.

  4. it's better if the owner can delete them

proposal fail

If I first enter the project space, click on the innovation proposal, fill in the information, and then log in, the proposal will fail to be created

image

vote lost

If you don't join the space, you can still vote, but it will be returned immediately

When you click vote, you can prompt the user to join the space before they can vote.

image

Amount

When I enter the amount, I don't need this 0 before the number I enter

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.