Commit graph

11 commits

Author SHA1 Message Date
Sudhanshu Gautam
3f8de60160 Add JS tests. Cleanup code and add github workflow to test. 2021-01-12 23:40:38 +05:30
Sudhanshu Gautam
9f4d64e1c0 update axios 2021-01-10 20:13:47 +05:30
Sudhanshu Gautam
ce4c36622b Rewrite using typescript, integrate the latest changes from @mwarning/openwrt-firmware-selector 2021-01-10 19:56:13 +05:30
Sudhanshu Gautam
db14840f4a Fix responsive design issues
Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
2019-09-05 00:03:52 +05:30
Sudhanshu Gautam
ce4d2e1436 Add prettier support
Add prettier and bind it with eslint.
Also add pre-commit hook to prettify before commit

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
2019-09-02 02:34:41 +05:30
Sudhanshu Gautam
3d1243a946 Fix responsiveness of UI on mobile devices. Shows only relevant images.
The UI is now responsive for all devices (almost). The inputs are made
full-width for mobile devices.
Only relevant images are shown as download links. Previously all the
images returned by ASU server were shown which is fixed now.

Signed-off-by: Sudhanshu Gautam <sudhanshu@clever.coffee>
2019-07-27 17:25:31 +05:30
Sudhanshu Gautam
9475f4092a Add ESLint to maintain code style. Add pre-commit hook to lint prior.
ESLint is used with the standard react plugin. It detects all kinds of
issues ranging from misspells, indentation, variable-naming, etc.
A pre-commit hook is added to git. Prior commiting, ESlint will run
to validate that everything is OK and the user will have the option
to fix it.

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
2019-07-21 22:03:51 +05:30
Sudhanshu Gautam
d30cf925b1 Complete build functionality. Used mwarning's server for data.
Now users can build their images using the Build button and it works
fine for the most part.
There is still some issue with the file download as there are a lot
of them and will be imporved in the future.
Using axios now for cross browser support issue of `fetch`

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
2019-07-21 20:49:13 +05:30
Sudhanshu Gautam
3f7007f259 adds search bar functionality
The process of finding image for a specific device by select inputs
was a tidious one.
Search bar functionality was introduced to make the process easier
and convenient.
The search uses fuzzyset.js to find possible suggestions for the user
in realtime.

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
2019-07-03 03:10:36 +05:30
Sudhanshu Gautam
07b13c3f7a adds translation support via i18n.js
Uses react-i18next library to provide APIs for translational
purposes.
Translation data is loaded from `src/locales/{{lng}}/translation.json`
and is accessed by dot notation.
The data can be translated in two ways:
1. In functional components, a method `t` can be instantiated using the
`useTranslation` method from rect-18next.
2. In class components, a method `t` can be accessed via props while
exporting the component with `withTranslation` method from react-i18next
library.

The syntax will look like `t('data.data')` or `this.props.t('data.data')`

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
2019-06-29 12:22:32 +05:30
Sudhanshu Gautam
8f68dc328e initializes the base for the firmware wizard
PWA based on ReactJs. Showcases the basic functionalities required
for the Firmware Selector.
Proof of Concept for the wizard with selection for vendor, model
and variants.

Signed-off-by: Sudhanshu Gautam <me@sudhanshug.com>
Initial commit from Create React App
2019-06-26 02:43:24 +05:30