mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Add TSLint to github actions, fix existing type errors
This commit is contained in:
@@ -46,7 +46,7 @@ export class MainMenuState extends GameState {
|
||||
: ""
|
||||
}
|
||||
</div>
|
||||
|
||||
|
||||
<video autoplay muted loop class="fullscreenBackgroundVideo">
|
||||
<source src="${cachebust("res/bg_render.webm")}" type="video/webm">
|
||||
</video>
|
||||
@@ -92,10 +92,10 @@ export class MainMenuState extends GameState {
|
||||
<a class="redditLink">${T.mainMenu.subreddit}</a>
|
||||
|
||||
<a class="changelog">${T.changelog.title}</a>
|
||||
|
||||
|
||||
<a class="helpTranslate">${T.mainMenu.helpTranslate}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="author">${T.mainMenu.madeBy.replace(
|
||||
"<author-link>",
|
||||
'<a class="producerLink" target="_blank">Tobias Springer</a>'
|
||||
@@ -218,11 +218,6 @@ export class MainMenuState extends GameState {
|
||||
this.trackClicks(qs(".languageChoose"), this.onLanguageChooseClicked);
|
||||
this.trackClicks(qs(".helpTranslate"), this.onTranslationHelpLinkClicked);
|
||||
|
||||
const contestButton = qs(".participateContest");
|
||||
if (contestButton) {
|
||||
this.trackClicks(contestButton, this.onContestClicked);
|
||||
}
|
||||
|
||||
if (G_IS_STANDALONE) {
|
||||
this.trackClicks(qs(".exitAppButton"), this.onExitAppButtonClicked);
|
||||
}
|
||||
@@ -312,15 +307,6 @@ export class MainMenuState extends GameState {
|
||||
this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.reddit);
|
||||
}
|
||||
|
||||
onContestClicked() {
|
||||
this.app.analytics.trackUiClick("contest_click");
|
||||
|
||||
this.dialogs.showInfo(
|
||||
T.mainMenu.contests.contest_01_03062020.title,
|
||||
T.mainMenu.contests.contest_01_03062020.longDesc
|
||||
);
|
||||
}
|
||||
|
||||
onLanguageChooseClicked() {
|
||||
this.app.analytics.trackUiClick("choose_language");
|
||||
const setting = /** @type {EnumSetting} */ (getApplicationSettingById("language"));
|
||||
|
||||
@@ -37,7 +37,7 @@ export class PreloadState extends GameState {
|
||||
return false;
|
||||
}
|
||||
|
||||
onEnter(payload) {
|
||||
onEnter() {
|
||||
this.htmlElement.classList.add("prefab_LoadingState");
|
||||
|
||||
const elementsToRemove = ["#loadingPreload", "#fontPreload"];
|
||||
@@ -52,9 +52,13 @@ export class PreloadState extends GameState {
|
||||
const dialogsElement = document.body.querySelector(".modalDialogParent");
|
||||
this.dialogs.initializeToElement(dialogsElement);
|
||||
|
||||
/** @type {HTMLElement} */
|
||||
this.statusText = this.htmlElement.querySelector(".loadingStatus > .desc");
|
||||
/** @type {HTMLElement} */
|
||||
this.statusBar = this.htmlElement.querySelector(".loadingStatus > .bar > .inner");
|
||||
/** @type {HTMLElement} */
|
||||
this.statusBarText = this.htmlElement.querySelector(".loadingStatus > .bar > .status");
|
||||
|
||||
this.currentStatus = "booting";
|
||||
this.currentIndex = 0;
|
||||
|
||||
@@ -251,12 +255,12 @@ export class PreloadState extends GameState {
|
||||
${this.currentStatus} failed:<br/>
|
||||
${text}
|
||||
</div>
|
||||
|
||||
|
||||
<div class="supportHelp">
|
||||
Please send me an email with steps to reproduce and what you did before this happened:
|
||||
<br /><a class="email" href="mailto:${email}?subject=App%20does%20not%20launch">${email}</a>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="lower">
|
||||
<button class="resetApp styledButton">Reset App</button>
|
||||
<i>Build ${G_BUILD_VERSION} @ ${G_BUILD_COMMIT_HASH}</i>
|
||||
|
||||
@@ -94,6 +94,7 @@ export class SettingsState extends TextualGameState {
|
||||
|
||||
initSettings() {
|
||||
allApplicationSettings.forEach(setting => {
|
||||
/** @type {HTMLElement} */
|
||||
const element = this.htmlElement.querySelector("[data-setting='" + setting.id + "']");
|
||||
setting.bind(this.app, element, this.dialogs);
|
||||
setting.syncValueToElement();
|
||||
|
||||
Reference in New Issue
Block a user