mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Multiple users for the puzzle dlc
This commit is contained in:
parent
26dd7dfd39
commit
50f599a5c1
@ -30,5 +30,7 @@
|
|||||||
@include Heading;
|
@include Heading;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
|
||||||
@include DarkThemeInvert;
|
@include DarkThemeOverride {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -16,11 +16,16 @@
|
|||||||
|
|
||||||
> label {
|
> label {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
@include SuperSmallText;
|
@include SuperDuperSmallText;
|
||||||
|
color: $accentColorDark;
|
||||||
}
|
}
|
||||||
> span {
|
> span {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color: darken($accentColorDark, 25);
|
||||||
@include SuperSmallText;
|
@include SuperSmallText;
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: lighten($accentColorDark, 15);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,9 +35,12 @@
|
|||||||
justify-self: end;
|
justify-self: end;
|
||||||
align-self: end;
|
align-self: end;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
@include S(margin-bottom, 10px);
|
||||||
|
opacity: 0.8;
|
||||||
@include DarkThemeInvert;
|
@include DarkThemeInvert;
|
||||||
opacity: 0.4;
|
@include DarkThemeOverride {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
> .downloads {
|
> .downloads {
|
||||||
@include SuperSmallText;
|
@include SuperSmallText;
|
||||||
@ -63,7 +71,6 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@include S(padding-left, 14px);
|
@include S(padding-left, 14px);
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
|
|
||||||
& {
|
& {
|
||||||
/* @load-async */
|
/* @load-async */
|
||||||
background: uiResource("icons/puzzle_upvotes.png") #{D(2px)} center / #{D(8px)} #{D(8px)} no-repeat;
|
background: uiResource("icons/puzzle_upvotes.png") #{D(2px)} center / #{D(8px)} #{D(8px)} no-repeat;
|
||||||
@ -115,4 +122,8 @@
|
|||||||
@include PlainText;
|
@include PlainText;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@
|
|||||||
grid-row: 3 / 4;
|
grid-row: 3 / 4;
|
||||||
@include SuperSmallText;
|
@include SuperSmallText;
|
||||||
color: $accentColorDark;
|
color: $accentColorDark;
|
||||||
align-self: end;
|
align-self: center;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
@ -146,6 +146,7 @@
|
|||||||
justify-self: end;
|
justify-self: end;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-self: end;
|
align-self: end;
|
||||||
|
@include S(height, 14px);
|
||||||
|
|
||||||
@include DarkThemeInvert;
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ export class HUDPuzzlePlayMetadata extends BaseHUDPart {
|
|||||||
this.element = makeDiv(parent, "ingame_HUD_PuzzlePlayMetadata");
|
this.element = makeDiv(parent, "ingame_HUD_PuzzlePlayMetadata");
|
||||||
this.element.innerHTML = `
|
this.element.innerHTML = `
|
||||||
|
|
||||||
<div class="info plays">
|
<div class="plays">
|
||||||
<span class="downloads">${formatBigNumberFull(puzzle.meta.downloads)}</span>
|
<span class="downloads">${formatBigNumberFull(puzzle.meta.downloads)}</span>
|
||||||
<span class="likes">${formatBigNumberFull(puzzle.meta.likes)}</span>
|
<span class="likes">${formatBigNumberFull(puzzle.meta.likes)}</span>
|
||||||
</div>
|
</div>
|
||||||
@ -36,7 +36,10 @@ export class HUDPuzzlePlayMetadata extends BaseHUDPart {
|
|||||||
<label>${T.ingame.puzzleMetadata.rating}</label>
|
<label>${T.ingame.puzzleMetadata.rating}</label>
|
||||||
<span>${
|
<span>${
|
||||||
puzzle.meta.difficulty
|
puzzle.meta.difficulty
|
||||||
? puzzle.meta.difficulty.toFixed(1)
|
? puzzle.meta.difficulty.toFixed(2) +
|
||||||
|
" (" +
|
||||||
|
T.ingame.puzzleCompletion.difficulties[Math.round(puzzle.meta.difficulty)] +
|
||||||
|
")"
|
||||||
: T.puzzleMenu.difficultyNotDetermined
|
: T.puzzleMenu.difficultyNotDetermined
|
||||||
}</span>
|
}</span>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,8 +4,10 @@ import { Application } from "../application";
|
|||||||
import { createLogger } from "../core/logging";
|
import { createLogger } from "../core/logging";
|
||||||
import { compressX64 } from "../core/lzstring";
|
import { compressX64 } from "../core/lzstring";
|
||||||
import { T } from "../translations";
|
import { T } from "../translations";
|
||||||
|
import { ShapezGameAnalytics } from "./browser/game_analytics";
|
||||||
|
|
||||||
const logger = createLogger("puzzle-api");
|
const logger = createLogger("puzzle-api");
|
||||||
|
const rusha = require("rusha");
|
||||||
|
|
||||||
export class ClientAPI {
|
export class ClientAPI {
|
||||||
/**
|
/**
|
||||||
@ -20,6 +22,15 @@ export class ClientAPI {
|
|||||||
* @type {string|null}
|
* @type {string|null}
|
||||||
*/
|
*/
|
||||||
this.token = null;
|
this.token = null;
|
||||||
|
|
||||||
|
this.syncToken = window.localStorage.getItem("tmp.syncToken");
|
||||||
|
if (!this.syncToken || G_IS_DEV) {
|
||||||
|
this.syncToken = rusha
|
||||||
|
.createHash()
|
||||||
|
.update(new Date().getTime() + "=" + Math.random())
|
||||||
|
.digest("hex");
|
||||||
|
window.localStorage.setItem("tmp.syncToken", this.syncToken);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getEndpoint() {
|
getEndpoint() {
|
||||||
@ -102,7 +113,7 @@ export class ClientAPI {
|
|||||||
return this._request("/v1/public/login", {
|
return this._request("/v1/public/login", {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: {
|
body: {
|
||||||
hello: "world",
|
token: this.syncToken,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -636,7 +636,7 @@ ingame:
|
|||||||
puzzleMetadata:
|
puzzleMetadata:
|
||||||
author: Author
|
author: Author
|
||||||
shortKey: Short Key
|
shortKey: Short Key
|
||||||
rating: Difficulty
|
rating: Difficulty score
|
||||||
averageDuration: Avg. Duration
|
averageDuration: Avg. Duration
|
||||||
|
|
||||||
# All shop upgrades
|
# All shop upgrades
|
||||||
|
Loading…
Reference in New Issue
Block a user