Skip to content
This repository has been archived by the owner on Sep 7, 2023. It is now read-only.

Commit

Permalink
Added fallbacks
Browse files Browse the repository at this point in the history
  • Loading branch information
jota11 committed Aug 19, 2021
1 parent 21893e8 commit 8ab5af3
Show file tree
Hide file tree
Showing 11 changed files with 908 additions and 1,872 deletions.
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
**/*.html
.eslintrc
.eslintignore
LICENSE
LICENSE
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Remove the items that don't apply. For completed items, change [ ] to [x].
- [ ] I have cloned the repository
- [ ] I have started the app without errors
- [ ] This pull request updates a dependency
- [ ] [CI scripts](https://github.com/ampersoftware/Creators.TF-Community-Launcher/tree/master/.github/workflows) are changed or added
- [ ] [CI scripts](https://github.com/ampersoftware/Creators.TF-Community-Launcher/tree/master/.github/workflows) are changed or added
14 changes: 6 additions & 8 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ deb:
packageCategory: net
publish:
provider: github
owner: ampersoftware
owner: CreatorsTF
repo: Creators.TF-Community-Launcher
releaseType: draft
vPrefixedTagName: false
Expand All @@ -41,18 +41,16 @@ files:
"**/*",
"!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}",
"!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}",
"!**/node_modules/*.d.ts",
"!**/node_modules/.bin",
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj,ts,scss,map,sh}",
"!.editorconfig",
"!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj,ts,scss,map,sh,d.ts}",
"!**/._*",
"!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes,.github,.eslintrc,.eslintignore}",
"!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.vscode,.nyc_output}",
"!**/{appveyor.yml,.travis.yml,circle.yml}",
"!**/{thumbs.db,.DS_Store,.hg,CVS,RCS,SCCS,.gitignore,.gitattributes,.eslintrc,.eslintignore,.editorconfig}",
"!**/{__pycache__,.flowconfig,.idea,.vs,.vscode,.nyc_output,.github,.git,.svn}",
"!**/{appveyor.yml,.travis.yml,circle.yml,electron-builder.yml,dev-app-update.yml}",
"!**/{npm-debug.log,yarn.lock,package-lock.json,tsconfig.json,.yarn-integrity,.yarn-metadata.json}",
"!buildfix.js",
"!tools/**",
"!CODE_OF_CONDUCT.md",
"!README.md"
]
electronVersion: 13.1.7
electronVersion: 13.1.7
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; connect-src https://api.github.com/repos/ampersoftware/Creators.TF-Community-Launcher/releases/latest https://creators.tf https://fastdl.creators.tf 'self'; img-src 'self' https://creators.tf https://fastdl.creators.tf; style-src 'self'; base-uri 'self'; form-action 'self'; font-src 'self';">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; connect-src https://api.github.com/repos/ampersoftware/Creators.TF-Community-Launcher/releases/latest https://api.github.com/repos/CreatorsTF/Creators.TF-Community-Launcher/releases/latest https://creators.tf https://fastdl.creators.tf 'self'; img-src 'self' https://creators.tf https://fastdl.creators.tf; style-src 'self'; base-uri 'self'; form-action 'self'; font-src 'self';">
<title>Creators.TF Launcher - Alpha Version</title>
<link rel="stylesheet" href="node_modules/@mdi/font/css/materialdesignicons.min.css">
<link rel="stylesheet" href="styles/style.css">
Expand Down
3 changes: 2 additions & 1 deletion modules/mod_list_loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import Utilities from "./utilities";
//More than one allows fallbacks.
const modListURLs = [
"https://fastdl.creators.tf/launcher/mods.json",
"https://raw.githubusercontent.com/ampersoftware/Creators.TF-Community-Launcher/master/internal/mods.json"
"https://raw.githubusercontent.com/ampersoftware/Creators.TF-Community-Launcher/master/internal/mods.json",
"https://raw.githubusercontent.com/CreatorsTF/Creators.TF-Community-Launcher/master/internal/mods.json"
];

const localModListName = "mods.json";
Expand Down
6 changes: 3 additions & 3 deletions modules/mod_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ class ModManager {
const jsonSourceManager = <JsonListSource>this.source_manager;
const data = await jsonSourceManager.GetJsonData();

let urls = [];
const urls = [];
if (data.hasOwnProperty("PatchUpdates") && data.PatchUpdates.length > 0) {
//There should be urls to patch zips for each update.
const patchObjects = data.PatchUpdates;
Expand Down Expand Up @@ -489,7 +489,7 @@ class ModManager {
})
.on("aborted", () => {
running = false;
ErrorDialog(`Mod removal was canceled and may be incomplete.\nYou may need to reinstall the mod to remove it correctly.`, "Removal Canceled!");
ErrorDialog("Mod removal was canceled and may be incomplete.\nYou may need to reinstall the mod to remove it correctly.", "Removal Canceled!");
this.FakeClickMod();
})
.on("progress", (value: number) => {
Expand Down Expand Up @@ -926,7 +926,7 @@ function DownloadFile(_url: string, progressFunc: any, responseHeadersFunc: any,
DoRequest(res.headers.location, retries--);
}
else if (res.statusCode == 404){
const error = `Remote Mod file was not able to be found. Try again later.\nIf this persists please report this error.`;
const error = "Remote Mod file was not able to be found. Try again later.\nIf this persists please report this error.";
log.error(error);
log.error("404 for: " + _url);
reject(error);
Expand Down
Loading

0 comments on commit 8ab5af3

Please sign in to comment.