├── .babelrc
├── .eslintignore
├── .eslintrc
├── .github
└── issue_template.md
├── .gitignore
├── .travis.yml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── LICENSE
├── README.md
├── main
├── data
│ └── extensions.js
├── donate.js
├── download.js
├── index.js
├── menu.js
├── notification.js
├── settings.js
├── sources.js
├── touchbar.js
├── updater.js
├── utils.js
└── windows
│ ├── about.js
│ ├── check.js
│ ├── main.js
│ └── progress.js
├── package-lock.json
├── package.json
└── renderer
├── actions
├── index.js
├── search.js
└── ui.js
├── components
├── Content.js
├── Credits.js
├── Drop.js
├── FilePath.js
├── Footer.js
├── FooterAbout.js
├── Info.js
├── LanguageToggle.js
├── Layout.js
├── List.js
├── ListEmpty.js
├── ListItem.js
├── Loading.js
├── Logo.js
├── Meta.js
├── Search.js
├── SearchField.js
├── SoftwareItem.js
├── Title.js
├── TitleBar.js
└── __tests__
│ ├── Content.test.js
│ ├── Info.test.js
│ └── __snapshots__
│ ├── Content.test.js.snap
│ └── Info.test.js.snap
├── containers
├── Content.js
├── Footer.js
└── Search.js
├── data
├── languages.js
└── software.js
├── next.config.js
├── pages
├── about.js
├── check.js
├── progress.js
└── start.js
├── reducers
├── index.js
├── search.js
└── ui.js
├── static
├── icon.icns
├── icon.ico
├── icon.iconset
│ ├── ..icns
│ ├── icon_1024x1024.png
│ ├── icon_128x128.png
│ ├── icon_16x16.png
│ ├── icon_256x256.png
│ ├── icon_32x32.png
│ ├── icon_512x512.png
│ └── icon_64x64.png
├── icon.png
└── loading.gif
├── store
└── index.js
├── types
└── index.js
└── utils
├── index.js
└── tracking.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "development": {
4 | "presets": "next/babel"
5 | },
6 | "production": {
7 | "presets": "next/babel"
8 | },
9 | "test": {
10 | "presets": [["env", { "modules": "commonjs" }], "next/babel"]
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | **/node_modules
2 | server.js
3 | public
4 | build
5 | build-ci
6 | flow-typed
7 | flow
8 |
--------------------------------------------------------------------------------
/.eslintrc:
--------------------------------------------------------------------------------
1 | {
2 | "extends": ["airbnb"],
3 | "env": {
4 | "browser": true,
5 | "jest": true,
6 | "node": true
7 | },
8 | "globals": {
9 | __CLIENT__: true,
10 | __DEVELOPMENT__: true,
11 | __PRODUCTION__: true
12 | },
13 | "parser": "babel-eslint",
14 | "rules": {
15 | "class-methods-use-this": "warn",
16 | "global-require": "off",
17 | "indent": ["error", 2, { "SwitchCase": 1 }],
18 | "key-spacing": [
19 | "error",
20 | {
21 | "mode": "minimum",
22 | "beforeColon": false,
23 | "afterColon": true
24 | }
25 | ],
26 | "react/react-in-jsx-scope": "off",
27 | "arrow-parens": "off",
28 | "react/jsx-curly-brace-presence": "off",
29 | "react/jsx-wrap-multilines": "off",
30 | "max-len": "off",
31 | "new-cap": ["error", { "capIsNewExceptions": ["Immutable"] }],
32 | "no-confusing-arrow": ["error", { "allowParens": true }],
33 | "no-fallthrough": ["error", { "commentPattern": "break[\\s\\w]*omitted" }],
34 | "no-lonely-if": "warn",
35 | "no-mixed-operators": "warn",
36 | "no-multi-spaces": [
37 | "error",
38 | {
39 | "exceptions": {
40 | "VariableDeclarator": true,
41 | "AssignmentExpression": true,
42 | "ImportDeclaration": true
43 | }
44 | }
45 | ],
46 | "no-plusplus": "off",
47 | "no-underscore-dangle": "off",
48 | "no-use-before-define": "warn",
49 | "no-useless-escape": "warn",
50 | "quotes": 0,
51 | // React rules
52 | "react/forbid-prop-types": "off",
53 | "react/jsx-filename-extension": [
54 | "error",
55 | { "extensions": [".jsx", ".js"] }
56 | ],
57 | "react/jsx-first-prop-new-line": "off",
58 | "react/no-unused-prop-types": "off",
59 | "react/self-closing-comp": ["error", { "component": true, "html": false }],
60 | // jsx-a11y
61 | "jsx-a11y/img-has-alt": "warn",
62 | "jsx-a11y/label-has-for": "warn",
63 | "jsx-a11y/no-static-element-interactions": "warn",
64 | // Import rules
65 | "import/default": "error",
66 | "import/named": "error",
67 | "import/namespace": "error",
68 | "import/no-extraneous-dependencies": "warn",
69 | "import/no-named-as-default": "warn",
70 | "import/prefer-default-export": "warn",
71 | "jsx-a11y/href-no-hash": "off",
72 | "jsx-a11y/anchor-is-valid": ["warn", { "aspects": ["invalidHref"] }],
73 | "jsx-a11y/no-noninteractive-element-interactions": "off"
74 | },
75 | "plugins": ["react", "import"],
76 | "settings": {
77 | "import/ignore": ["node_modules", ".(scss|less|css|svg)$"],
78 | "import/parser": "babel-eslint",
79 | "import/resolver": {
80 | "webpack": {
81 | "config": {
82 | "resolve": {
83 | "extensions": ["", ".js", ".jsx", ".json"],
84 | "modulesDirectories": ["node_modules", "src"]
85 | }
86 | }
87 | }
88 | }
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/.github/issue_template.md:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
8 |
9 | - [ ] I have searched the [issues](https://github.com/gielcobben/Caption/issues) of this repository and believe that this is not a duplicate.
10 |
11 | ## Expected Behavior
12 |
13 |
14 |
15 | ## Current Behavior
16 |
17 |
18 |
19 | ## Steps to Reproduce (for bugs)
20 |
21 |
22 | 1.
23 | 2.
24 | 3.
25 | 4.
26 |
27 | ## Context
28 |
29 |
30 |
31 | ## Your Environment
32 |
33 | | Tech | Version |
34 | |----------------|---------|
35 | | app version | |
36 | | OS | |
37 | | etc | |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # build output
2 | dist
3 | renderer/.next
4 | renderer/out
5 |
6 | # dependencies
7 | node_modules
8 |
9 | # logs
10 | npm-debug.log
11 |
12 | # mac
13 | .DS_Store
14 |
15 | # dotenv
16 | .env
17 |
18 | # update files
19 | dev-app-update.yml
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '8'
4 |
5 | jobs:
6 | include:
7 | - stage: test
8 | script: npm run test
9 | - stage: build
10 | script: npm run build
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Covenant Code of Conduct
2 |
3 | ## Our Pledge
4 |
5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6 |
7 | ## Our Standards
8 |
9 | Examples of behavior that contributes to creating a positive environment include:
10 |
11 | * Using welcoming and inclusive language
12 | * Being respectful of differing viewpoints and experiences
13 | * Gracefully accepting constructive criticism
14 | * Focusing on what is best for the community
15 | * Showing empathy towards other community members
16 |
17 | Examples of unacceptable behavior by participants include:
18 |
19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances
20 | * Trolling, insulting/derogatory comments, and personal or political attacks
21 | * Public or private harassment
22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission
23 | * Other conduct which could reasonably be considered inappropriate in a professional setting
24 |
25 | ## Our Responsibilities
26 |
27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28 |
29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30 |
31 | ## Scope
32 |
33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34 |
35 | ## Enforcement
36 |
37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at g.cobben@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38 |
39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40 |
41 | ## Attribution
42 |
43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
44 |
45 | [homepage]: http://contributor-covenant.org
46 | [version]: http://contributor-covenant.org/version/1/4/
47 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | ## Contributing to Caption
2 |
3 | 1. Fork this repository to your own GitHub account and then clone it to your local device
4 | 2. Install the dependencies: npm install
5 | 3. Run the app by building the code and watch for changes: npm start
6 | 4. Build the actual app for all platforms (Mac, Windows and Linux): `npm run dist`
7 |
8 | ## Financial contributions
9 |
10 | We also welcome financial contributions in full transparency on our [open collective](https://opencollective.com/caption).
11 | Anyone can file an expense. If the expense makes sense for the development of the community, it will be "merged" in the ledger of our open collective by the core contributors and the person who filed the expense will be reimbursed.
12 |
13 | ### Contributors
14 |
15 | Thank you to all the people who have already contributed to Caption!
16 |
17 |
18 |
19 | ### Backers
20 |
21 | Thank you to all our backers! [[Become a backer](https://opencollective.com/caption#backer)]
22 |
23 |
24 |
25 |
26 | ### Sponsors
27 |
28 | Thank you to all our sponsors! (please ask your company to also support this open source project by [becoming a sponsor](https://opencollective.com/caption#sponsor))
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) Giel Cobben (gielcobben.com)
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6 |
7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8 |
9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
2 |
3 | Caption
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
INTRODUCTION
14 |
Caption takes the effort out of finding and setting up the right subtitles. A simple design, drag & drop search, and automatic downloading & renaming let you just start watching. Caption is multi-platform, open-source, and built entirely on web technology.
166 |
167 | `;
168 |
--------------------------------------------------------------------------------
/renderer/components/__tests__/__snapshots__/Info.test.js.snap:
--------------------------------------------------------------------------------
1 | // Jest Snapshot v1, https://goo.gl/fbAQLP
2 |
3 | exports[` should show a loader when there are no results yet 1`] = `
4 |
7 |
10 |
14 |
15 |
16 | `;
17 |
18 | exports[` should show an empty state when no results are found 1`] = `
19 |
22 |
25 | Nothing Found
26 |
27 |
28 | `;
29 |
30 | exports[` should show the total results if any are present 1`] = `
31 |
34 |
37 | 2 Results
38 |
39 |
40 | `;
41 |
--------------------------------------------------------------------------------
/renderer/containers/Content.js:
--------------------------------------------------------------------------------
1 | import { connect } from "react-redux";
2 | import { ipcRenderer } from "electron";
3 |
4 | import Content from "./../components/Content";
5 |
6 | const mapStateToProps = ({ search }) => ({
7 | searchQuery: search.searchQuery,
8 | files: search.files,
9 | results: search.results,
10 | loading: search.loading,
11 | });
12 |
13 | const mapDispatchToProps = {
14 | onDrop: event => () => {
15 | const droppedItems = [];
16 | const rawFiles = event.dataTransfer
17 | ? event.dataTransfer.files
18 | : event.target.files;
19 |
20 | Object.keys(rawFiles).map(key => droppedItems.push(rawFiles[key].path));
21 |
22 | ipcRenderer.send("processFiles", droppedItems);
23 | },
24 | };
25 |
26 | export default connect(mapStateToProps, mapDispatchToProps)(Content);
27 |
--------------------------------------------------------------------------------
/renderer/containers/Footer.js:
--------------------------------------------------------------------------------
1 | import { connect } from "react-redux";
2 |
3 | import { setLanguage } from "./../actions";
4 | import Footer from "./../components/Footer";
5 |
6 | const mapStateToProps = ({ ui, search }) => ({
7 | language: ui.language,
8 | loading: !search.searchCompleted,
9 | results: search.results,
10 | showResults: search.searchAttempts > 0,
11 | isFileSearch: search.files.length > 0,
12 | totalFiles: search.files.length,
13 | foundFiles: search.files.filter(({ status }) => status === "done").length,
14 | });
15 | const mapDispatchToProps = {
16 | onLanguageChange: setLanguage,
17 | };
18 |
19 | export default connect(mapStateToProps, mapDispatchToProps)(Footer);
20 |
--------------------------------------------------------------------------------
/renderer/containers/Search.js:
--------------------------------------------------------------------------------
1 | import { connect } from "react-redux";
2 |
3 | import Search from "./../components/Search";
4 |
5 | import { updateSearchQuery, resetSearch } from "./../actions";
6 |
7 | const mapStateToProps = ({ search }) => ({
8 | value: search.searchQuery || search.dropFilePath,
9 | placeholder: search.placeholder,
10 | dropFilePath: search.dropFilePath,
11 | dropFilePathClean: search.dropFilePathClean,
12 | });
13 |
14 | const mapDispatchToProps = {
15 | onChange: event => dispatch => {
16 | const searchQuery = event.target.value;
17 | dispatch(updateSearchQuery(searchQuery));
18 | },
19 | onReset: resetSearch,
20 | };
21 |
22 | export default connect(mapStateToProps, mapDispatchToProps, null, {
23 | withRef: true,
24 | })(Search);
25 |
--------------------------------------------------------------------------------
/renderer/data/languages.js:
--------------------------------------------------------------------------------
1 | const languages = [
2 | { code: "afr", name: "Afrikaans" },
3 | { code: "alb", name: "Albanian" },
4 | { code: "ara", name: "Arabic" },
5 | { code: "arm", name: "Armenian" },
6 | { code: "aze", name: "Azerbaijani" },
7 | { code: "baq", name: "Basque" },
8 | { code: "bel", name: "Belarusian" },
9 | { code: "ben", name: "Bengali" },
10 | { code: "bos", name: "Bosnian" },
11 | { code: "bre", name: "Breton" },
12 | { code: "bul", name: "Bulgarian" },
13 | { code: "bur", name: "Burmese" },
14 | { code: "cat", name: "Catalan" },
15 | { code: "chi", name: "Chinese (simplified)" },
16 | { code: "zht", name: "Chinese (traditional)" },
17 | { code: "zhe", name: "Chinese bilingual" },
18 | { code: "hrv", name: "Croatian" },
19 | { code: "cze", name: "Czech" },
20 | { code: "dan", name: "Danish" },
21 | { code: "dut", name: "Dutch" },
22 | { code: "eng", name: "English" },
23 | { code: "epo", name: "Esperanto" },
24 | { code: "est", name: "Estonian" },
25 | { code: "eus", name: "Euskera" },
26 | { code: "fin", name: "Finnish" },
27 | { code: "fre", name: "French" },
28 | { code: "glg", name: "Galician" },
29 | { code: "geo", name: "Georgian" },
30 | { code: "ger", name: "German" },
31 | { code: "ell", name: "Greek" },
32 | { code: "heb", name: "Hebrew" },
33 | { code: "hin", name: "Hindi" },
34 | { code: "hun", name: "Hungarian" },
35 | { code: "ice", name: "Icelandic" },
36 | { code: "ind", name: "Indonesian" },
37 | { code: "ita", name: "Italian" },
38 | { code: "jpn", name: "Japanese" },
39 | { code: "kaz", name: "Kazakh" },
40 | { code: "khm", name: "Khmer" },
41 | { code: "kor", name: "Korean" },
42 | { code: "lav", name: "Latvian" },
43 | { code: "lit", name: "Lithuanian" },
44 | { code: "ltz", name: "Luxembourgish" },
45 | { code: "mac", name: "Macedonian" },
46 | { code: "may", name: "Malay" },
47 | { code: "mal", name: "Malayalam" },
48 | { code: "mni", name: "Manipuri" },
49 | { code: "mon", name: "Mongolian" },
50 | { code: "mne", name: "Montenegrin" },
51 | { code: "nor", name: "Norwegian" },
52 | { code: "oci", name: "Occitan" },
53 | { code: "per", name: "Persian" },
54 | { code: "pol", name: "Polish" },
55 | { code: "por", name: "Portuguese" },
56 | { code: "pob", name: "Portuguese (BR)" },
57 | { code: "rum", name: "Romanian" },
58 | { code: "rus", name: "Russian" },
59 | { code: "scc", name: "Serbian" },
60 | { code: "sin", name: "Sinhalese" },
61 | { code: "slo", name: "Slovak" },
62 | { code: "slv", name: "Slovenian" },
63 | { code: "spa", name: "Spanish" },
64 | { code: "swa", name: "Swahili" },
65 | { code: "swe", name: "Swedish" },
66 | { code: "syr", name: "Syriac" },
67 | { code: "tgl", name: "Tagalog" },
68 | { code: "tam", name: "Tamil" },
69 | { code: "tel", name: "Telugu" },
70 | { code: "tha", name: "Thai" },
71 | { code: "tur", name: "Turkish" },
72 | { code: "ukr", name: "Ukrainian" },
73 | { code: "urd", name: "Urdu" },
74 | { code: "vie", name: "Vietnamese" },
75 | ];
76 |
77 | export default languages;
78 |
--------------------------------------------------------------------------------
/renderer/data/software.js:
--------------------------------------------------------------------------------
1 | const software = [
2 | {
3 | name: "next.js",
4 | description: `The MIT License (MIT) Copyright (c) 2016 Zeit, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.`,
5 | },
6 | {
7 | name: "electron-is-dev",
8 | description: `The MIT License (MIT) Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.`,
9 | },
10 | {
11 | name: "electron-next",
12 | description: `MIT License (MIT) Copyright (c) 2017 Leo Lamprecht Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.`,
13 | },
14 | {
15 | name: "electron-store",
16 | description: `MIT License Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.`,
17 | },
18 | {
19 | name: "electron-window-state",
20 | description: `The MIT License (MIT) Copyright (c) 2015 Jakub Szwacz Copyright (c) Marcel Wiehle (http://marcel.wiehle.me) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE`,
21 | },
22 | ];
23 |
24 | export default software;
25 |
--------------------------------------------------------------------------------
/renderer/next.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | webpack(config) {
3 | config.target = "electron-renderer";
4 |
5 | // config.plugins = config.plugins.filter(plugin => {
6 | // return plugin.constructor.name !== "UglifyJsPlugin";
7 | // });
8 |
9 | return config;
10 | },
11 |
12 | exportPathMap() {
13 | // Let Next.js know where to find the entry page
14 | // when it's exporting the static bundle for the use
15 | // in the production version of your app
16 | return {
17 | "/start": { page: "/start" },
18 | "/about": { page: "/about" },
19 | "/check": { page: "/check" },
20 | "/progress": { page: "/progress" },
21 | };
22 | },
23 | };
24 |
--------------------------------------------------------------------------------
/renderer/pages/about.js:
--------------------------------------------------------------------------------
1 | import electron from "electron";
2 | import { Component } from "react";
3 | import isDev from "electron-is-dev";
4 |
5 | import Layout from "../components/Layout";
6 | import TitleBar from "../components/TitleBar";
7 | import Meta from "../components/Meta";
8 | import Credits from "../components/Credits";
9 | import FooterAbout from "../components/FooterAbout";
10 |
11 | class About extends Component {
12 | constructor(props) {
13 | super(props);
14 |
15 | this.state = {
16 | version: "0.0.0",
17 | };
18 |
19 | this.remote = electron.remote || false;
20 | }
21 |
22 | componentWillMount() {
23 | if (!this.remote) {
24 | return;
25 | }
26 |
27 | let version;
28 |
29 | if (isDev) {
30 | version = this.remote.process.env.npm_package_version;
31 | } else {
32 | version = this.remote.app.getVersion();
33 | }
34 |
35 | this.setState({
36 | version,
37 | });
38 | }
39 |
40 | render() {
41 | return (
42 |
43 |
44 |
45 |
46 |
47 |
48 | );
49 | }
50 | }
51 |
52 | export default About;
53 |
--------------------------------------------------------------------------------
/renderer/pages/check.js:
--------------------------------------------------------------------------------
1 | import Layout from "../components/Layout";
2 | import Logo from "../components/Logo";
3 |
4 | const Check = () => (
5 |
6 |
7 |
8 |