├── .babelrc
├── .gitignore
├── LICENSE
├── README.md
├── dump.rdb
├── main.js
├── package-lock.json
├── package.json
├── src
├── assets
│ ├── animations
│ │ ├── failure.json
│ │ └── success.json
│ ├── css
│ │ ├── App.css
│ │ └── ReactToastify.css
│ └── img
│ │ ├── bg.png
│ │ ├── failure.png
│ │ └── success.png
├── components
│ └── App.js
├── index.js
└── util
│ └── index.js
├── webpack.build.config.js
└── webpack.dev.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["react"]
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | *npm-debug.log
3 | *.DS_Store
4 | dist/
5 | builds/
6 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Phillip Barbiero
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ### Download Subtitles Like a Boss!
2 | 
3 | 
4 | 
5 |
6 |
7 |
8 |
9 |
10 | A simple yet quick application that let's you download missing subtitles of your movie files with just a drag and drop.
11 |
12 |
13 |
14 | ### Features
15 | * **Filename independent**
16 | SubGenesis uses the file hash of the video file instead of the filename to request the SubDB API. No matter what you name the video file, SubGenesis will fetch the right subtitle for you.
17 | * **Multi Platform**
18 | As of now SubGenesis runs on Windows and MacOS. Future builds for Linux, Android and iOS can be expected.
19 | * **Totally Free**
20 | SubGenesis is free, and will always be. Yeah, no ads
21 |
22 | ## Installation
23 | Download the latest binary for your platform from the [releases](https://github.com/vinaychandranvs/subgenesis/releases) page.
24 |
25 | ### To-do List
26 | - [x] Batch files processing
27 | - [x] Auto process folders
28 | - [ ] Reduced filesize
29 |
30 |
--------------------------------------------------------------------------------
/dump.rdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinay0x/subgenesis/1f6a6e514a67b74965ec6592ee8541c0ae745026/dump.rdb
--------------------------------------------------------------------------------
/main.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // Import parts of electron to use
4 | const {app, BrowserWindow} = require('electron');
5 | const path = require('path')
6 | const url = require('url')
7 |
8 | // Keep a global reference of the window object, if you don't, the window will
9 | // be closed automatically when the JavaScript object is garbage collected.
10 | let mainWindow;
11 |
12 | // Keep a reference for dev mode
13 | let dev = false;
14 | if ( process.defaultApp || /[\\/]electron-prebuilt[\\/]/.test(process.execPath) || /[\\/]electron[\\/]/.test(process.execPath) ) {
15 | dev = true;
16 | }
17 |
18 | function createWindow() {
19 | // Create the browser window.
20 | mainWindow = new BrowserWindow({
21 | width: 363,
22 | height: 570,
23 | frame: false,
24 | titleBarStyle: 'hidden',
25 | resizable: false,
26 | webPreferences: {
27 | preload: path.join(__dirname, 'src','util', 'index.js')
28 | }
29 | })
30 |
31 | // and load the index.html of the app.
32 | let indexPath;
33 | if ( dev && process.argv.indexOf('--noDevServer') === -1 ) {
34 | indexPath = url.format({
35 | protocol: 'http:',
36 | host: 'localhost:8080',
37 | pathname: 'index.html',
38 | slashes: true
39 | });
40 | } else {
41 | indexPath = url.format({
42 | protocol: 'file:',
43 | pathname: path.join(__dirname, 'dist', 'index.html'),
44 | slashes: true
45 | });
46 | }
47 | mainWindow.loadURL( indexPath );
48 |
49 | // Don't show until we are ready and loaded
50 | mainWindow.once('ready-to-show', () => {
51 | mainWindow.show();
52 | // Open the DevTools automatically if developing
53 | if ( dev ) {
54 | mainWindow.webContents.openDevTools();
55 | }
56 | });
57 |
58 | // Emitted when the window is closed.
59 | mainWindow.on('closed', function() {
60 | // Dereference the window object, usually you would store windows
61 | // in an array if your app supports multi windows, this is the time
62 | // when you should delete the corresponding element.
63 | mainWindow = null;
64 | });
65 | }
66 |
67 | // This method will be called when Electron has finished
68 | // initialization and is ready to create browser windows.
69 | // Some APIs can only be used after this event occurs.
70 | app.on('ready', createWindow);
71 |
72 | // Quit when all windows are closed.
73 | app.on('window-all-closed', () => {
74 | // On macOS it is common for applications and their menu bar
75 | // to stay active until the user quits explicitly with Cmd + Q
76 | if (process.platform !== 'darwin') {
77 | app.quit();
78 | }
79 | });
80 |
81 | app.on('activate', () => {
82 | // On macOS it's common to re-create a window in the app when the
83 | // dock icon is clicked and there are no other windows open.
84 | if (mainWindow === null) {
85 | createWindow();
86 | }
87 | });
88 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "basic-electron-react-boilerplate",
3 | "version": "0.1.50",
4 | "description": "Minimal and modern react+electron+webpack boilerplate",
5 | "author": "Phillip Barbiero",
6 | "homepage": "https://github.com/pbarbiero/basic-electron-react-boilerplate",
7 | "repository": {
8 | "type": "git",
9 | "url": "https://github.com/pbarbiero/basic-electron-react-boilerplate.git"
10 | },
11 | "license": "MIT",
12 | "main": "main.js",
13 | "scripts": {
14 | "prod": "webpack --config webpack.build.config.js && electron --noDevServer .",
15 | "dev": "webpack-dev-server --hot --host 0.0.0.0 --config=./webpack.dev.config.js",
16 | "build": "webpack --config webpack.build.config.js",
17 | "package": "webpack --config webpack.build.config.js",
18 | "postpackage": "electron-packager ./ --out=./builds"
19 | },
20 | "devDependencies": {
21 | "babel-core": "^6.26.3",
22 | "babel-loader": "^7.1.2",
23 | "babel-preset-react": "^6.24.1",
24 | "babili-webpack-plugin": "^0.1.2",
25 | "css-loader": "^0.28.1",
26 | "electron": "^2.0.7",
27 | "electron-packager": "^9.1.0",
28 | "extract-text-webpack-plugin": "^3.0.1",
29 | "file-loader": "^1.1.5",
30 | "html-webpack-plugin": "^2.28.0",
31 | "react": "^16.4.2",
32 | "react-dom": "^16.4.2",
33 | "style-loader": "^0.19.0",
34 | "webpack": "^3.6.0",
35 | "webpack-dev-server": "^2.4.5"
36 | },
37 | "dependencies": {
38 | "bluebird": "^3.5.1",
39 | "react-dropzone": "^4.3.0",
40 | "react-lottie": "^1.2.3",
41 | "react-spinners": "^0.3.3",
42 | "react-toastify": "^4.1.0",
43 | "recursive-readdir": "^2.2.2",
44 | "subdb-node": "^0.1.53"
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/src/assets/animations/failure.json:
--------------------------------------------------------------------------------
1 | {"v":"4.12.0","fr":30,"ip":0,"op":81,"w":64,"h":64,"nm":"failed","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 4","sr":0.6,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90.553,"ix":10},"p":{"a":0,"k":[27.53,31.637,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[88.427,98.018,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[0.752941176471,0.223529411765,0.16862745098,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.297,0.27],[0.054,0],[-0.994,0.405],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.552,-1.283],[-0.064,0],[0.76,-0.31],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-5.3,-8.425],[-8.178,-11.608],[-7.938,-14.5],[-5.506,-16.155],[-4.438,-16.625],[-3.448,-16.953],[-0.125,-17.312],[3.111,-16.785],[5.774,-15.585],[7.632,-14.007],[8.046,-11.926],[7.375,-10.875],[6.125,-10.125],[4.386,-8.223],[1.733,-5.498],[-0.753,-3.078],[-2.943,-1.24],[-6.191,1.923],[-6.675,2.562],[-7.625,3.625]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":27.6,"s":[0],"e":[50]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.2,"s":[50],"e":[56]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.8,"s":[56],"e":[55]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":46.2,"s":[55],"e":[53]},{"t":49.8}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":27.6,"s":[0],"e":[95]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.2,"s":[95],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.8,"s":[100],"e":[100]},{"t":46.2}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.752941176471,0.223529411765,0.16862745098,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":540,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 3","sr":0.6,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[31.749,36.2,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"st","c":{"a":0,"k":[0.752941176471,0.223529411765,0.16862745098,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[-0.297,0.27],[0.054,0],[-0.994,0.405],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[-0.552,-1.283],[-0.064,0],[0.76,-0.31],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-5.3,-8.425],[-8.178,-11.608],[-7.938,-14.5],[-5.506,-16.155],[-4.438,-16.625],[-3.448,-16.953],[-0.125,-17.312],[3.111,-16.785],[5.774,-15.585],[7.632,-14.007],[8.046,-11.926],[7.375,-10.875],[6.125,-10.125],[4.386,-8.223],[1.733,-5.498],[-0.753,-3.078],[-2.943,-1.24],[-6.191,1.923],[-6.675,2.562],[-7.625,3.625]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":27.6,"s":[0],"e":[50]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.2,"s":[50],"e":[56]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.8,"s":[56],"e":[55]},{"t":46.2}],"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":27.6,"s":[0],"e":[95]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.2,"s":[95],"e":[100]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":43.8,"s":[100],"e":[100]},{"t":46.2}],"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":0,"k":[0.752941176471,0.223529411765,0.16862745098,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":4,"cix":2,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":540,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"waiting","sr":0.6,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-1258.376,"ix":10},"p":{"a":0,"k":[31.75,31.993,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":3,"ty":"el","s":{"a":0,"k":[53.17,53.17],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":202.775,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false},{"ty":"st","c":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0.901960790157,0.494117647409,0.133333340287,1],"e":[0.752941191196,0.223529413342,0.168627455831,1]},{"t":4.8}],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":2,"ix":5},"lc":1,"lj":1,"ml":1,"d":[{"n":"d","nm":"dash","v":{"a":0,"k":81,"ix":1}},{"n":"g","nm":"gap","v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[3.75],"e":[0]},{"t":48.6}],"ix":2}},{"n":"o","nm":"offset","v":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[511.343]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":49.2,"s":[511.343],"e":[5500]},{"t":543}],"ix":7}}],"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.000345592853,0.011274510063,0.002820064547,1],"ix":4},"o":{"a":0,"k":0,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-0.25,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[81.568,82.691],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":4,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":540,"st":0,"bm":0}]}
--------------------------------------------------------------------------------
/src/assets/animations/success.json:
--------------------------------------------------------------------------------
1 | {"v":"5.1.8","fr":23.9759979248047,"ip":0,"op":71.9999937681822,"w":250,"h":250,"nm":"FINALE","ddd":0,"assets":[{"id":"comp_2","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"Shape Layer 4","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[105,105,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0]],"v":[[-56.964,0.265],[-16.566,34.639],[57.229,-48.946]],"c":false},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"st","c":{"a":0,"k":[0.004,0.6,0.859,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":16,"ix":5},"lc":2,"lj":2,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":1,"k":[{"i":{"x":[0.2],"y":[1]},"o":{"x":[0.8],"y":[0]},"n":["0p2_1_0p8_0"],"t":20,"s":[0],"e":[100]},{"t":39.999996537879}],"ix":1},"e":{"a":0,"k":100,"ix":2},"o":{"a":0,"k":0,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":71.9999937681822,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Layer 2 Outlines","tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[105.114,105.239,0],"ix":2},"a":{"a":0,"k":[50.559,40.579,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[2.124,-0.094],[0.925,-1.068],[0,0],[0,0],[1.702,-0.778],[0.237,-2.032],[-1.466,-1.237],[0,0],[-1.821,2.039],[0,0],[0.835,2.179]],"o":[[-1.332,0.047],[0,0],[0,0],[-1.45,-1.261],[-1.701,0.779],[-0.237,2.034],[0,0],[2.043,1.76],[0,0],[1.529,-1.645],[-0.835,-2.178]],"v":[[44.56,-40.235],[41.038,-38.496],[-17.23,26.438],[-41.84,5.255],[-46.938,4.474],[-50.072,9.02],[-48.083,14.308],[-19.911,38.569],[-13.148,38.079],[48.322,-30.423],[49.473,-36.774]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[50.558,40.579],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":72.3381841595917,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 3","td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[105,105,0],"ix":2},"a":{"a":0,"k":[24,32,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.133,0.133,0.18],"y":[1,1,1]},"o":{"x":[0.167,0.167,0.167],"y":[0,0,-15.889]},"n":["0p133_1_0p167_0","0p133_1_0p167_0","0p18_1_0p167_-15p889"],"t":13,"s":[110,110,100],"e":[0,0,100]},{"t":25.9999977496214}],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[200,200],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.004,0.6,0.859,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.004,0.6,0.859,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[24,32],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":72.3381841595917,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"Shape Layer 2","tt":2,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":90,"ix":10},"p":{"a":0,"k":[105,105,0],"ix":2},"a":{"a":0,"k":[24,32,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[200,200],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.004,0.6,0.859,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.004,0.6,0.859,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[24,32],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":3,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":72.3381841595917,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"Shape Layer 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":-180,"ix":10},"p":{"a":0,"k":[105,105,0],"ix":2},"a":{"a":0,"k":[24,32,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[200,200],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[0.004,0.6,0.859,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":8,"ix":5},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"tr","p":{"a":0,"k":[24,32],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Ellipse 1","np":2,"cix":2,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"tm","s":{"a":0,"k":0,"ix":1},"e":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.7],"y":[0]},"n":["0p833_0p833_0p7_0"],"t":0,"s":[0],"e":[100]},{"t":14.9999987017046}],"ix":2},"o":{"a":0,"k":180,"ix":3},"m":1,"ix":2,"nm":"Trim Paths 1","mn":"ADBE Vector Filter - Trim","hd":false}],"ip":0,"op":72.3381841595917,"st":0,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Icons","refId":"comp_2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[125,125,0],"ix":2},"a":{"a":0,"k":[105,105,0],"ix":1},"s":{"a":1,"k":[{"i":{"x":[0.39,0.39,0.39],"y":[1,1,1]},"o":{"x":[0.61,0.61,0.61],"y":[0,0,0]},"n":["0p39_1_0p61_0","0p39_1_0p61_0","0p39_1_0p61_0"],"t":26,"s":[100,100,100],"e":[110,110,100]},{"i":{"x":[0.39,0.39,0.39],"y":[1,1,1]},"o":{"x":[0.61,0.61,0.61],"y":[0,0,0]},"n":["0p39_1_0p61_0","0p39_1_0p61_0","0p39_1_0p61_0"],"t":31,"s":[110,110,100],"e":[100,100,100]},{"t":35.9999968840911}],"ix":6}},"ao":0,"w":210,"h":210,"ip":0,"op":71.9999937681822,"st":0,"bm":0}],"markers":[]}
--------------------------------------------------------------------------------
/src/assets/css/App.css:
--------------------------------------------------------------------------------
1 | html{
2 | width: 100%;
3 | height: 100%;
4 | color:#455a64;
5 | -webkit-app-region: drag;
6 | }
7 | body{
8 | background-image: url("../img/bg.png");
9 | background-size:cover;
10 | height:100%;
11 | overflow: hidden;
12 | }
13 | #root{
14 | height: 100%;
15 | display: flex;
16 | flex-direction: column;
17 | justify-content: center;
18 | align-items: center;
19 | }
20 | .loading-container{
21 | width: 120px;
22 | height:120px;
23 | transition: all 0.3s;
24 | animation: cubic-bezier(0.5, 0.2, 0.3, 1.0);
25 | }
26 | .invisible{
27 | width: 120px;
28 | height:120px;
29 | }
30 | .downloader{
31 | -webkit-app-region: no-drag;
32 | background-color: #0098de;
33 | width: 120px;
34 | height: 120px;
35 | border-radius: 300px;
36 | color: white;
37 | font-family: Verdana;
38 | font-weight: 100;
39 | font-size: 102px;
40 | text-align: center;
41 | line-height: 107px;
42 | cursor: pointer;
43 | transition: all 0.3s;
44 | animation: cubic-bezier(0.5, 0.2, 0.3, 1.0);
45 | }
46 | .downloader:hover{
47 | background-color: #03497A;
48 | transform: scale(1.1);
49 | transition: all 0.3s;
50 | animation: cubic-bezier(0.5, 0.2, 0.3, 1.0);
51 | }
52 | .accept{
53 | background-color: #03497A;
54 | transform: scale(1.1);
55 | transition: all 0.3s;
56 | animation: cubic-bezier(0.5, 0.2, 0.3, 1.0);
57 | }
58 | .reject{
59 | cursor: no-drop;
60 | background-color: #455a64;
61 | transform: scale(0.95);
62 | transition: all 0.3s;
63 | animation: cubic-bezier(0.5, 0.2, 0.3, 1.0);
64 | }
65 | .count{
66 | display: flex;
67 | flex-direction: row;
68 | justify-content: center;
69 | color: white;
70 | font-size: 20px;
71 | line-height: 20px;
72 | font-family: 'Open Sans', sans-serif;
73 | }
74 | .icons{
75 | width: 20px;
76 | height: 20px;
77 | margin: 0px 5px 0px 5px;
78 | }
79 | h6{
80 | color: white;
81 | font-size: 14px;
82 | font-family: 'Roboto Slab', serif;
83 | font-weight: 300;
84 | }
85 | .toast{
86 | background: #0199db;
87 | font-size: 14px;
88 | font-family: 'Roboto Slab', serif;
89 | font-weight: 300;
90 | }
91 | .info-box{
92 | height: 120px;
93 | }
--------------------------------------------------------------------------------
/src/assets/css/ReactToastify.css:
--------------------------------------------------------------------------------
1 | .Toastify__toast-container {
2 | z-index: 9999;
3 | position: fixed;
4 | padding: 4px;
5 | width: 320px;
6 | box-sizing: border-box;
7 | color: #fff; }
8 | .Toastify__toast-container--top-left {
9 | top: 1em;
10 | left: 1em; }
11 | .Toastify__toast-container--top-center {
12 | top: 1em;
13 | left: 50%;
14 | margin-left: -160px; }
15 | .Toastify__toast-container--top-right {
16 | top: 1em;
17 | right: 1em; }
18 | .Toastify__toast-container--bottom-left {
19 | bottom: 1em;
20 | left: 1em; }
21 | .Toastify__toast-container--bottom-center {
22 | bottom: 1em;
23 | left: 50%;
24 | margin-left: -160px; }
25 | .Toastify__toast-container--bottom-right {
26 | bottom: 1em;
27 | right: 1em; }
28 |
29 | @media only screen and (max-width: 480px) {
30 | .Toastify__toast-container {
31 | width: 100vw;
32 | padding: 0;
33 | left: 0;
34 | margin: 0; }
35 | .Toastify__toast-container--top-left, .Toastify__toast-container--top-center, .Toastify__toast-container--top-right {
36 | top: 0; }
37 | .Toastify__toast-container--bottom-left, .Toastify__toast-container--bottom-center, .Toastify__toast-container--bottom-right {
38 | bottom: 0; }
39 | .Toastify__toast-container--rtl {
40 | right: 0;
41 | left: initial; } }
42 |
43 | .Toastify__toast {
44 | position: relative;
45 | min-height: 64px;
46 | box-sizing: border-box;
47 | margin-bottom: 1rem;
48 | padding: 8px;
49 | border-radius: 1px;
50 | box-shadow: 0 1px 10px 0 rgba(0, 0, 0, 0.1), 0 2px 15px 0 rgba(0, 0, 0, 0.05);
51 | display: -ms-flexbox;
52 | display: flex;
53 | -ms-flex-pack: justify;
54 | justify-content: space-between;
55 | max-height: 800px;
56 | overflow: hidden;
57 | font-family: sans-serif;
58 | cursor: pointer;
59 | direction: ltr; }
60 | .Toastify__toast--rtl {
61 | direction: rtl; }
62 | .Toastify__toast--default {
63 | background: #fff;
64 | color: #aaa; }
65 | .Toastify__toast--info {
66 | background: #3498db; }
67 | .Toastify__toast--success {
68 | background: #07bc0c; }
69 | .Toastify__toast--warning {
70 | background: #f1c40f; }
71 | .Toastify__toast--error {
72 | background: #e74c3c; }
73 | .Toastify__toast-body {
74 | margin: auto 0;
75 | -ms-flex: 1;
76 | flex: 1; }
77 |
78 | @media only screen and (max-width: 480px) {
79 | .Toastify__toast {
80 | margin-bottom: 0; } }
81 |
82 | .Toastify__close-button {
83 | color: #fff;
84 | font-weight: bold;
85 | font-size: 14px;
86 | background: transparent;
87 | outline: none;
88 | border: none;
89 | padding: 0;
90 | cursor: pointer;
91 | opacity: 0.7;
92 | transition: 0.3s ease;
93 | -ms-flex-item-align: start;
94 | align-self: flex-start; }
95 | .Toastify__close-button--default {
96 | color: #000;
97 | opacity: 0.3; }
98 | .Toastify__close-button:hover, .Toastify__close-button:focus {
99 | opacity: 1; }
100 |
101 | @keyframes Toastify__trackProgress {
102 | 0% {
103 | width: 100%; }
104 | 100% {
105 | width: 0; } }
106 |
107 | .Toastify__progress-bar {
108 | position: absolute;
109 | bottom: 0;
110 | left: 0;
111 | width: 0;
112 | height: 5px;
113 | z-index: 9999;
114 | opacity: 0.7;
115 | animation: Toastify__trackProgress linear 1;
116 | background-color: rgba(255, 255, 255, 0.7); }
117 | .Toastify__progress-bar--rtl {
118 | right: 0;
119 | left: initial; }
120 | .Toastify__progress-bar--default {
121 | background: linear-gradient(to right, #4cd964, #5ac8fa, #007aff, #34aadc, #5856d6, #ff2d55); }
122 |
123 | @keyframes Toastify__bounceInRight {
124 | from,
125 | 60%,
126 | 75%,
127 | 90%,
128 | to {
129 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
130 | from {
131 | opacity: 0;
132 | transform: translate3d(3000px, 0, 0); }
133 | 60% {
134 | opacity: 1;
135 | transform: translate3d(-25px, 0, 0); }
136 | 75% {
137 | transform: translate3d(10px, 0, 0); }
138 | 90% {
139 | transform: translate3d(-5px, 0, 0); }
140 | to {
141 | transform: none; } }
142 |
143 | @keyframes Toastify__bounceOutRight {
144 | 20% {
145 | opacity: 1;
146 | transform: translate3d(-20px, 0, 0); }
147 | to {
148 | opacity: 0;
149 | transform: translate3d(2000px, 0, 0); } }
150 |
151 | @keyframes Toastify__bounceInLeft {
152 | from,
153 | 60%,
154 | 75%,
155 | 90%,
156 | to {
157 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
158 | 0% {
159 | opacity: 0;
160 | transform: translate3d(-3000px, 0, 0); }
161 | 60% {
162 | opacity: 1;
163 | transform: translate3d(25px, 0, 0); }
164 | 75% {
165 | transform: translate3d(-10px, 0, 0); }
166 | 90% {
167 | transform: translate3d(5px, 0, 0); }
168 | to {
169 | transform: none; } }
170 |
171 | @keyframes Toastify__bounceOutLeft {
172 | 20% {
173 | opacity: 1;
174 | transform: translate3d(20px, 0, 0); }
175 | to {
176 | opacity: 0;
177 | transform: translate3d(-2000px, 0, 0); } }
178 |
179 | @keyframes Toastify__bounceInUp {
180 | from,
181 | 60%,
182 | 75%,
183 | 90%,
184 | to {
185 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
186 | from {
187 | opacity: 0;
188 | transform: translate3d(0, 3000px, 0); }
189 | 60% {
190 | opacity: 1;
191 | transform: translate3d(0, -20px, 0); }
192 | 75% {
193 | transform: translate3d(0, 10px, 0); }
194 | 90% {
195 | transform: translate3d(0, -5px, 0); }
196 | to {
197 | transform: translate3d(0, 0, 0); } }
198 |
199 | @keyframes Toastify__bounceOutUp {
200 | 20% {
201 | transform: translate3d(0, -10px, 0); }
202 | 40%,
203 | 45% {
204 | opacity: 1;
205 | transform: translate3d(0, 20px, 0); }
206 | to {
207 | opacity: 0;
208 | transform: translate3d(0, -2000px, 0); } }
209 |
210 | @keyframes Toastify__bounceInDown {
211 | from,
212 | 60%,
213 | 75%,
214 | 90%,
215 | to {
216 | animation-timing-function: cubic-bezier(0.215, 0.61, 0.355, 1); }
217 | 0% {
218 | opacity: 0;
219 | transform: translate3d(0, -3000px, 0); }
220 | 60% {
221 | opacity: 1;
222 | transform: translate3d(0, 25px, 0); }
223 | 75% {
224 | transform: translate3d(0, -10px, 0); }
225 | 90% {
226 | transform: translate3d(0, 5px, 0); }
227 | to {
228 | transform: none; } }
229 |
230 | @keyframes Toastify__bounceOutDown {
231 | 20% {
232 | transform: translate3d(0, 10px, 0); }
233 | 40%,
234 | 45% {
235 | opacity: 1;
236 | transform: translate3d(0, -20px, 0); }
237 | to {
238 | opacity: 0;
239 | transform: translate3d(0, 2000px, 0); } }
240 |
241 | .Toastify__bounce-enter--top-left, .Toastify__bounce-enter--bottom-left {
242 | animation-name: Toastify__bounceInLeft; }
243 |
244 | .Toastify__bounce-enter--top-right, .Toastify__bounce-enter--bottom-right {
245 | animation-name: Toastify__bounceInRight; }
246 |
247 | .Toastify__bounce-enter--top-center {
248 | animation-name: Toastify__bounceInDown; }
249 |
250 | .Toastify__bounce-enter--bottom-center {
251 | animation-name: Toastify__bounceInUp; }
252 |
253 | .Toastify__bounce-exit--top-left, .Toastify__bounce-exit--bottom-left {
254 | animation-name: Toastify__bounceOutLeft; }
255 |
256 | .Toastify__bounce-exit--top-right, .Toastify__bounce-exit--bottom-right {
257 | animation-name: Toastify__bounceOutRight; }
258 |
259 | .Toastify__bounce-exit--top-center {
260 | animation-name: Toastify__bounceOutUp; }
261 |
262 | .Toastify__bounce-exit--bottom-center {
263 | animation-name: Toastify__bounceOutDown; }
264 |
265 | @keyframes Toastify__zoomIn {
266 | from {
267 | opacity: 0;
268 | transform: scale3d(0.3, 0.3, 0.3); }
269 | 50% {
270 | opacity: 1; } }
271 |
272 | @keyframes Toastify__zoomOut {
273 | from {
274 | opacity: 1; }
275 | 50% {
276 | opacity: 0;
277 | transform: scale3d(0.3, 0.3, 0.3); }
278 | to {
279 | opacity: 0; } }
280 |
281 | .Toastify__zoom-enter {
282 | animation-name: Toastify__zoomIn; }
283 |
284 | .Toastify__zoom-exit {
285 | animation-name: Toastify__zoomOut; }
286 |
287 | @keyframes Toastify__flipIn {
288 | from {
289 | transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
290 | animation-timing-function: ease-in;
291 | opacity: 0; }
292 | 40% {
293 | transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
294 | animation-timing-function: ease-in; }
295 | 60% {
296 | transform: perspective(400px) rotate3d(1, 0, 0, 10deg);
297 | opacity: 1; }
298 | 80% {
299 | transform: perspective(400px) rotate3d(1, 0, 0, -5deg); }
300 | to {
301 | transform: perspective(400px); } }
302 |
303 | @keyframes Toastify__flipOut {
304 | from {
305 | transform: perspective(400px); }
306 | 30% {
307 | transform: perspective(400px) rotate3d(1, 0, 0, -20deg);
308 | opacity: 1; }
309 | to {
310 | transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
311 | opacity: 0; } }
312 |
313 | .Toastify__flip-enter {
314 | animation-name: Toastify__flipIn; }
315 |
316 | .Toastify__flip-exit {
317 | animation-name: Toastify__flipOut; }
318 |
319 | @keyframes Toastify__slideInRight {
320 | from {
321 | transform: translate3d(110%, 0, 0);
322 | visibility: visible; }
323 | to {
324 | transform: translate3d(0, 0, 0); } }
325 |
326 | @keyframes Toastify__slideInLeft {
327 | from {
328 | transform: translate3d(-110%, 0, 0);
329 | visibility: visible; }
330 | to {
331 | transform: translate3d(0, 0, 0); } }
332 |
333 | @keyframes Toastify__slideInUp {
334 | from {
335 | transform: translate3d(0, 110%, 0);
336 | visibility: visible; }
337 | to {
338 | transform: translate3d(0, 0, 0); } }
339 |
340 | @keyframes Toastify__slideInDown {
341 | from {
342 | transform: translate3d(0, -110%, 0);
343 | visibility: visible; }
344 | to {
345 | transform: translate3d(0, 0, 0); } }
346 |
347 | @keyframes Toastify__slideOutRight {
348 | from {
349 | transform: translate3d(0, 0, 0); }
350 | to {
351 | visibility: hidden;
352 | transform: translate3d(110%, 0, 0); } }
353 |
354 | @keyframes Toastify__slideOutLeft {
355 | from {
356 | transform: translate3d(0, 0, 0); }
357 | to {
358 | visibility: hidden;
359 | transform: translate3d(-110%, 0, 0); } }
360 |
361 | @keyframes Toastify__slideOutUp {
362 | from {
363 | transform: translate3d(0, 0, 0); }
364 | to {
365 | visibility: hidden;
366 | transform: translate3d(0, 110%, 0); } }
367 |
368 | @keyframes Toastify__slideOutDown {
369 | from {
370 | transform: translate3d(0, 0, 0); }
371 | to {
372 | visibility: hidden;
373 | transform: translate3d(0, -110%, 0); } }
374 |
375 | .Toastify__slide-enter--top-left, .Toastify__slide-enter--bottom-left {
376 | animation-name: Toastify__slideInLeft; }
377 |
378 | .Toastify__slide-enter--top-right, .Toastify__slide-enter--bottom-right {
379 | animation-name: Toastify__slideInRight; }
380 |
381 | .Toastify__slide-enter--top-center {
382 | animation-name: Toastify__slideInDown; }
383 |
384 | .Toastify__slide-enter--bottom-center {
385 | animation-name: Toastify__slideInUp; }
386 |
387 | .Toastify__slide-exit--top-left, .Toastify__slide-exit--bottom-left {
388 | animation-name: Toastify__slideOutLeft; }
389 |
390 | .Toastify__slide-exit--top-right, .Toastify__slide-exit--bottom-right {
391 | animation-name: Toastify__slideOutRight; }
392 |
393 | .Toastify__slide-exit--top-center {
394 | animation-name: Toastify__slideOutUp; }
395 |
396 | .Toastify__slide-exit--bottom-center {
397 | animation-name: Toastify__slideOutDown; }
398 |
399 | /*# sourceMappingURL=ReactToastify.css.map */
--------------------------------------------------------------------------------
/src/assets/img/bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinay0x/subgenesis/1f6a6e514a67b74965ec6592ee8541c0ae745026/src/assets/img/bg.png
--------------------------------------------------------------------------------
/src/assets/img/failure.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinay0x/subgenesis/1f6a6e514a67b74965ec6592ee8541c0ae745026/src/assets/img/failure.png
--------------------------------------------------------------------------------
/src/assets/img/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/vinay0x/subgenesis/1f6a6e514a67b74965ec6592ee8541c0ae745026/src/assets/img/success.png
--------------------------------------------------------------------------------
/src/components/App.js:
--------------------------------------------------------------------------------
1 | import '../assets/css/ReactToastify.css'
2 | import '../assets/css/App.css'
3 | import React, { Component } from 'react'
4 | import ReactDropzone from 'react-dropzone'
5 | import { BounceLoader } from 'react-spinners'
6 | import Promise from 'bluebird'
7 | import animationData from '../assets/animations/success.json'
8 | import Lottie from 'react-lottie'
9 | import { ToastContainer, toast } from 'react-toastify'
10 | import { Slide } from 'react-toastify';
11 |
12 | import '../util/index.js'
13 | const { download, recursive, path, isVideo, isDirectory } = window.global
14 |
15 | document.ondragover = document.ondrop = (ev) => {
16 | ev.preventDefault()
17 | }
18 |
19 | class App extends React.Component {
20 | constructor(props){
21 | super(props)
22 | this.state = {
23 | loading: false,
24 | complete: false,
25 | files: [],
26 | succeeded: [],
27 | failed: []
28 | }
29 | }
30 |
31 | addToSucceeded(fileName){
32 | this.setState({
33 | succeeded : this.state.succeeded.concat(fileName)
34 | })
35 | }
36 |
37 | addToFailed(fileName){
38 | this.setState({
39 | failed : this.state.failed.concat(fileName)
40 | })
41 | }
42 |
43 | clearArrays(){
44 | this.setState({
45 | failed : [],
46 | succeeded: []
47 | })
48 | }
49 |
50 |
51 | async downloadSubtitle(filePath){
52 | let result = await download(filePath)
53 | if(result!==null) this.addToSucceeded(filePath)
54 | else this.addToFailed(filePath)
55 | return result
56 | }
57 | async onDrop(files){
58 | this.setState({
59 | loading: true
60 | })
61 | this.clearArrays()
62 | for(const file of files){
63 | let result = null
64 | if(isDirectory(file.path)){
65 | const files = await recursive(file.path)
66 | for(const file of files){
67 | if(isVideo(file)) await this.downloadSubtitle(file)
68 | }
69 | }
70 | else{
71 | await this.downloadSubtitle(file.path)
72 | }
73 | }
74 | this.setState({
75 | loading: false
76 | })
77 | this.setState({
78 | complete: true
79 | })
80 | toast.info(`Downloaded ${this.state.succeeded.length} subtitles!`)
81 | }
82 | render() {
83 | const defaultOptions = {
84 | loop: false,
85 | autoplay: true,
86 | animationData: animationData,
87 | rendererSettings: {
88 | preserveAspectRatio: 'xMidYMid slice'
89 | }
90 | }
91 | return (
92 |
93 |
99 |
100 | {
101 | this.state.loading &&
102 |
103 |
108 |
109 | }
110 | { this.state.complete &&
111 |
112 | setTimeout(this.setState({complete:false}), 2000)
118 | }]}
119 | />
120 |
121 | }
122 |
123 | {!this.state.loading && !this.state.complete && {
128 | if(files.some(file => isVideo(file.path) || isDirectory(file.path) ))
129 | this.onDrop(files)
130 | }}
131 | >+
132 |
133 | }
134 |
135 |
{this.state.loading ? 'Hang tight!' : 'Drop a movie or a folder'}
136 |
137 |
138 | )
139 | }
140 | }
141 |
142 | export default App
143 |
--------------------------------------------------------------------------------
/src/index.js:
--------------------------------------------------------------------------------
1 | import React from 'react';
2 | import { render } from 'react-dom';
3 | import App from './components/App';
4 |
5 | // Since we are using HtmlWebpackPlugin WITHOUT a template, we should create our own root node in the body element before rendering into it
6 | let root = document.createElement('div');
7 | root.id = "root";
8 | document.body.appendChild(root);
9 |
10 | //Google font
11 | let googleFont = document.createElement('Link')
12 | googleFont.href = "https://fonts.googleapis.com/css?family=Roboto+Slab:300"
13 | googleFont.rel = "stylesheet"
14 | document.head.appendChild(googleFont)
15 | // Now we can render our application into it
16 | render( , document.getElementById('root') );
17 |
--------------------------------------------------------------------------------
/src/util/index.js:
--------------------------------------------------------------------------------
1 | const {download} = require('subdb-node')
2 | const fs = require('fs')
3 | const recursive = require("recursive-readdir")
4 | const path = require("path")
5 |
6 | const vidExts = [".avi", ".mp4", ".mkv", ".mpg", ".mpeg", ".mov", ".rm", ".vob", ".wmv", ".flv", ".3gp",".3g2"]
7 | const isVideo = (filePath) => {
8 | return vidExts.includes(path.extname(filePath))
9 | }
10 |
11 | const isDirectory = (filePath) => {
12 | return fs.lstatSync(filePath).isDirectory()
13 | }
14 | window.global.download = download
15 | window.global.recursive = recursive
16 | window.global.path = path
17 | window.global.isVideo = isVideo
18 | window.global.isDirectory = isDirectory
--------------------------------------------------------------------------------
/webpack.build.config.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | const path = require('path');
3 | const HtmlWebpackPlugin = require('html-webpack-plugin');
4 | const BabiliPlugin = require('babili-webpack-plugin');
5 | const ExtractTextPlugin = require('extract-text-webpack-plugin');
6 |
7 | // Config directories
8 | const SRC_DIR = path.resolve(__dirname, 'src');
9 | const OUTPUT_DIR = path.resolve(__dirname, 'dist');
10 |
11 | // Any directories you will be adding code/files into, need to be added to this array so webpack will pick them up
12 | const defaultInclude = [SRC_DIR];
13 |
14 | module.exports = {
15 | entry: SRC_DIR + '/index.js',
16 | output: {
17 | path: OUTPUT_DIR,
18 | publicPath: './',
19 | filename: 'bundle.js'
20 | },
21 | module: {
22 | rules: [
23 | {
24 | test: /\.css$/,
25 | use: ExtractTextPlugin.extract({
26 | fallback: 'style-loader',
27 | use: 'css-loader'
28 | }),
29 | include: defaultInclude
30 | },
31 | {
32 | test: /\.jsx?$/,
33 | use: [{ loader: 'babel-loader' }],
34 | include: defaultInclude
35 | },
36 | {
37 | test: /\.(jpe?g|png|gif)$/,
38 | use: [{ loader: 'file-loader?name=img/[name]__[hash:base64:5].[ext]' }],
39 | include: defaultInclude
40 | },
41 | {
42 | test: /\.(eot|svg|ttf|woff|woff2)$/,
43 | use: [{ loader: 'file-loader?name=font/[name]__[hash:base64:5].[ext]' }],
44 | include: defaultInclude
45 | }
46 | ]
47 | },
48 | target: 'electron-renderer',
49 | plugins: [
50 | new HtmlWebpackPlugin(),
51 | new ExtractTextPlugin('bundle.css'),
52 | new webpack.DefinePlugin({
53 | 'process.env.NODE_ENV': JSON.stringify('production')
54 | }),
55 | new BabiliPlugin()
56 | ],
57 | stats: {
58 | colors: true,
59 | children: false,
60 | chunks: false,
61 | modules: false
62 | }
63 | };
64 |
--------------------------------------------------------------------------------
/webpack.dev.config.js:
--------------------------------------------------------------------------------
1 | const webpack = require('webpack');
2 | const path = require('path');
3 | const HtmlWebpackPlugin = require('html-webpack-plugin');
4 | const { spawn } = require('child_process');
5 |
6 | // Config directories
7 | const SRC_DIR = path.resolve(__dirname, 'src');
8 | const OUTPUT_DIR = path.resolve(__dirname, 'dist');
9 |
10 | // Any directories you will be adding code/files into, need to be added to this array so webpack will pick them up
11 | const defaultInclude = [SRC_DIR];
12 |
13 | module.exports = {
14 | entry: SRC_DIR + '/index.js',
15 | output: {
16 | path: OUTPUT_DIR,
17 | publicPath: '/',
18 | filename: 'bundle.js'
19 | },
20 | module: {
21 | rules: [
22 | {
23 | test: /\.css$/,
24 | use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
25 | include: defaultInclude
26 | },
27 | {
28 | test: /\.jsx?$/,
29 | use: [{ loader: 'babel-loader' }],
30 | include: defaultInclude
31 | },
32 | {
33 | test: /\.(jpe?g|png|gif)$/,
34 | use: [{ loader: 'file-loader?name=img/[name]__[hash:base64:5].[ext]' }],
35 | include: defaultInclude
36 | },
37 | {
38 | test: /\.(eot|svg|ttf|woff|woff2)$/,
39 | use: [{ loader: 'file-loader?name=font/[name]__[hash:base64:5].[ext]' }],
40 | include: defaultInclude
41 | }
42 | ]
43 | },
44 | target: 'electron-renderer',
45 | plugins: [
46 | new HtmlWebpackPlugin(),
47 | new webpack.DefinePlugin({
48 | 'process.env.NODE_ENV': JSON.stringify('development')
49 | })
50 | ],
51 | devtool: 'cheap-source-map',
52 | devServer: {
53 | contentBase: OUTPUT_DIR,
54 | stats: {
55 | colors: true,
56 | chunks: false,
57 | children: false
58 | },
59 | setup() {
60 | spawn(
61 | 'electron',
62 | ['.'],
63 | { shell: true, env: process.env, stdio: 'inherit' }
64 | )
65 | .on('close', code => process.exit(0))
66 | .on('error', spawnError => console.error(spawnError));
67 | }
68 | }
69 | };
70 |
--------------------------------------------------------------------------------