1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-11 09:11:50 +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;
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%;
}
.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 {
width: 100%;
display: flex;

View File

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

View File

@ -3,9 +3,9 @@ import { Application } from "../application";
/* typehints:end */
import { IS_MOBILE } from "../core/config";
import { NoAchievementProvider } from "./no_achievement_provider";
import { createLogger } from "../core/logging";
import { clamp } from "../core/utils";
import { NoAchievementProvider } from "./no_achievement_provider";
const logger = createLogger("electron-wrapper");
@ -16,30 +16,10 @@ export class PlatformWrapperImplElectron {
}
initialize() {
this.dlcs = {
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());
return Promise.resolve();
});
}
steamOverlayFixRedrawCanvas() {
this.steamOverlayContextFix.clearRect(0, 0, 1, 1);
return this.initializeAchievementProvider().then(() => {
document.documentElement.classList.add("p-" + this.getId());
return Promise.resolve();
});
}
getId() {
@ -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 {number} */

View File

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