1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-14 10:41:52 +00:00

Get rid of more Steam leftovers

This commit is contained in:
Даниїл Григор'єв 2024-06-20 18:31:52 +03:00
parent 4940135140
commit 0e7082dbbd
No known key found for this signature in database
GPG Key ID: B890DF16341D8C1D
5 changed files with 5 additions and 133 deletions

View File

@ -721,17 +721,3 @@ iframe {
pointer-events: all; pointer-events: all;
user-select: all; user-select: all;
} }
// Steam overlay fix
#steamOverlayCanvasFix {
position: fixed;
top: 0px;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: 100%;
opacity: 0.01;
pointer-events: none;
z-index: -1;
}

View File

@ -786,78 +786,6 @@
width: 100%; width: 100%;
} }
.steamSso {
cursor: default;
pointer-events: all;
display: inline-flex;
@include S(padding, 10px);
color: #000;
flex-direction: column;
line-height: 1em;
@include S(gap, 3px);
position: relative;
background: rgba(0, 20, 40, 0.05);
width: 100%;
box-sizing: border-box;
margin-top: auto;
display: grid;
grid-template-columns: 1fr auto;
align-items: center;
.description {
@include SuperSmallText;
color: rgba(0, 10, 20, 0.5);
@include DarkThemeOverride {
color: rgba(#fff, 0.7);
}
}
// &:hover {
// .tooltip {
// opacity: 1;
// }
// }
a.ssoSignIn {
background: #171a23 uiResource("steam_signin.png") center center / contain no-repeat;
width: 100%;
box-sizing: border-box;
@include S(height, 19px);
@include S(width, 110px);
display: inline-flex;
@include S(border-radius, $globalBorderRadius * 0.5);
transition: opacity 0.12s ease-in-out;
overflow: hidden;
text-indent: -999em;
&:hover {
opacity: 0.9;
}
box-shadow: 0 D(1.5px) D(4px) rgba(#000, 0.21);
}
a.ssoSignOut {
width: 100%;
background: $colorRedBright;
color: #fff !important;
display: flex;
align-items: center;
box-sizing: border-box;
justify-content: center;
@include SuperSmallText;
text-transform: uppercase;
@include S(border-radius, $globalBorderRadius * 0.5);
box-shadow: 0 D(1.5px) D(4px) rgba(#000, 0.21);
@include S(padding, 2px, 9px);
&:hover {
opacity: 0.95;
}
}
}
.savegamesMount { .savegamesMount {
width: 100%; width: 100%;
display: flex; display: flex;

View File

@ -1,5 +1,4 @@
/* typehints:start */ /* typehints:start */
import { Application } from "../application";
/* typehints:end */ /* typehints:end */
import debug from "./config.local"; import debug from "./config.local";
@ -25,8 +24,6 @@ export const THIRDPARTY_URLS = {
patreon: "https://www.patreon.com/tobsprgames", patreon: "https://www.patreon.com/tobsprgames",
privacyPolicy: "https://tobspr.io/privacy.html", privacyPolicy: "https://tobspr.io/privacy.html",
puzzleDlcStorePage: "https://get.shapez.io/mm_puzzle_dlc?target=dlc",
levelTutorialVideos: { levelTutorialVideos: {
21: "https://www.youtube.com/watch?v=0nUfRLMCcgo&", 21: "https://www.youtube.com/watch?v=0nUfRLMCcgo&",
25: "https://www.youtube.com/watch?v=7OCV1g40Iew&", 25: "https://www.youtube.com/watch?v=7OCV1g40Iew&",

View File

@ -3,9 +3,9 @@ import { Application } from "../application";
/* typehints:end */ /* typehints:end */
import { IS_MOBILE } from "../core/config"; import { IS_MOBILE } from "../core/config";
import { NoAchievementProvider } from "./no_achievement_provider";
import { createLogger } from "../core/logging"; import { createLogger } from "../core/logging";
import { clamp } from "../core/utils"; import { clamp } from "../core/utils";
import { NoAchievementProvider } from "./no_achievement_provider";
const logger = createLogger("electron-wrapper"); const logger = createLogger("electron-wrapper");
@ -16,32 +16,12 @@ export class PlatformWrapperImplElectron {
} }
initialize() { initialize() {
this.dlcs = { return this.initializeAchievementProvider().then(() => {
puzzle: false,
};
this.steamOverlayCanvasFix = document.createElement("canvas");
this.steamOverlayCanvasFix.width = 1;
this.steamOverlayCanvasFix.height = 1;
this.steamOverlayCanvasFix.id = "steamOverlayCanvasFix";
this.steamOverlayContextFix = this.steamOverlayCanvasFix.getContext("2d");
document.documentElement.appendChild(this.steamOverlayCanvasFix);
this.app.ticker.frameEmitted.add(this.steamOverlayFixRedrawCanvas, this);
return this.initializeAchievementProvider()
.then(() => this.initializeDlcStatus())
.then(() => {
document.documentElement.classList.add("p-" + this.getId()); document.documentElement.classList.add("p-" + this.getId());
return Promise.resolve(); return Promise.resolve();
}); });
} }
steamOverlayFixRedrawCanvas() {
this.steamOverlayContextFix.clearRect(0, 0, 1, 1);
}
getId() { getId() {
return "electron"; return "electron";
} }
@ -89,20 +69,6 @@ export class PlatformWrapperImplElectron {
}); });
} }
initializeDlcStatus() {
logger.log("Checking DLC ownership ...");
// @todo: Don't hardcode the app id
return ipcRenderer.invoke("steam:check-app-ownership", 1625400).then(
res => {
logger.log("Got DLC ownership:", res);
this.dlcs.puzzle = Boolean(res);
},
err => {
logger.error("Failed to get DLC ownership:", err);
}
);
}
/** /**
* Returns the UI scale, called on every resize * Returns the UI scale, called on every resize
* @returns {number} */ * @returns {number} */

View File

@ -255,7 +255,6 @@ export class MainMenuState extends GameState {
this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.github); this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.github);
}, },
".puzzleDlcPlayButton": this.onPuzzleModeButtonClicked, ".puzzleDlcPlayButton": this.onPuzzleModeButtonClicked,
".puzzleDlcGetButton": this.onPuzzleWishlistButtonClicked,
".editMods": this.onModsClicked, ".editMods": this.onModsClicked,
}; };
@ -333,10 +332,6 @@ export class MainMenuState extends GameState {
}); });
} }
onPuzzleWishlistButtonClicked() {
this.app.platformWrapper.openExternalLink(THIRDPARTY_URLS.puzzleDlcStorePage);
}
onBackButtonClicked() { onBackButtonClicked() {
this.renderMainMenu(); this.renderMainMenu();
this.renderSavegames(); this.renderSavegames();