Add link to custom theme generator again
This commit is contained in:
parent
1755cdcf9a
commit
b5d3eb501d
2 changed files with 26 additions and 14 deletions
|
@ -2,7 +2,7 @@ import {Utils} from "../Utils";
|
||||||
|
|
||||||
export default class Constants {
|
export default class Constants {
|
||||||
|
|
||||||
public static vNumber = "0.22.1";
|
public static vNumber = "0.22.2";
|
||||||
|
|
||||||
public static ImgurApiKey = '7070e7167f0a25a'
|
public static ImgurApiKey = '7070e7167f0a25a'
|
||||||
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
||||||
|
|
|
@ -192,7 +192,7 @@ export default class ShareScreen extends Combine {
|
||||||
|
|
||||||
let downloadThemeConfig: BaseUIElement = undefined;
|
let downloadThemeConfig: BaseUIElement = undefined;
|
||||||
if (layout.definitionRaw !== undefined) {
|
if (layout.definitionRaw !== undefined) {
|
||||||
downloadThemeConfig = new SubtleButton(Svg.download_svg(), new Combine([
|
const downloadThemeConfigAsJson = new SubtleButton(Svg.download_svg(), new Combine([
|
||||||
tr.downloadCustomTheme,
|
tr.downloadCustomTheme,
|
||||||
tr.downloadCustomThemeHelp.SetClass("subtle")
|
tr.downloadCustomThemeHelp.SetClass("subtle")
|
||||||
]).onClick(() => {
|
]).onClick(() => {
|
||||||
|
@ -201,6 +201,18 @@ export default class ShareScreen extends Combine {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.SetClass("flex flex-col"))
|
.SetClass("flex flex-col"))
|
||||||
|
let editThemeConfig: BaseUIElement = undefined
|
||||||
|
if (layout.definedAtUrl === undefined) {
|
||||||
|
const patchedDefinition = JSON.parse(layout.definitionRaw)
|
||||||
|
patchedDefinition["language"] = Object.keys(patchedDefinition.title)
|
||||||
|
editThemeConfig = new SubtleButton(Svg.pencil_svg(), "Edit this theme on the custom theme generator",
|
||||||
|
{
|
||||||
|
url: `https://pietervdvn.github.io/mc/legacy/070/customGenerator.html#${btoa(JSON.stringify(patchedDefinition))}`
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
downloadThemeConfig = new Combine([downloadThemeConfigAsJson, editThemeConfig]).SetClass("flex flex-col")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
super([
|
super([
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue