Skip to content
This repository has been archived by the owner on Oct 25, 2022. It is now read-only.

Commit

Permalink
feat(ui): More minimal buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
oliversalzburg committed Jul 17, 2021
1 parent 15b1d63 commit 21948c5
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/userscript/source/i18n/i18nData.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
"ui.itemsShow": "Show options",
"ui.disable.all": "disable all",
"ui.enable.all": "enable all",
"ui.craft.resources": "resources",
"ui.trigger": "trigger",
"ui.craft.resources": "Resources",
"ui.trigger": "",
"ui.trigger.set": "Enter a new trigger value for {0}. Should be in the range of 0 to 1.",
"ui.limit": "Limited",
"ui.trigger.crypto.set": "Enter a new trigger value for {0}. Corresponds to the amount of Relics needed before the exchange is made.",
Expand Down
5 changes: 2 additions & 3 deletions packages/userscript/source/ui/BonfireSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,8 @@ export class BonfireSettingsUi extends SettingsSectionUi<BonfireSettings> {

// Create "trigger" button in the item.
this._triggerButton = $("<div/>", {
id: "trigger-" + toggleName,
id: `trigger-${toggleName}`,
text: this._host.i18n("ui.trigger"),
//title: this._options.trigger,
css: {
cursor: "pointer",
display: "inline-block",
Expand Down Expand Up @@ -362,7 +361,7 @@ export class BonfireSettingsUi extends SettingsSectionUi<BonfireSettings> {
});

const maxButton = $("<div/>", {
id: "set-" + name + "-max",
id: `set-${name}-max`,
//text: this._host.i18n("ui.max", []),
//title: option.max,
css: {
Expand Down
5 changes: 3 additions & 2 deletions packages/userscript/source/ui/CraftSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ export class CraftSettingsUi extends SettingsSectionUi<CraftSettings> {

this._resourcesButton = $("<div/>", {
id: "toggle-resource-controls",
text: this._host.i18n("ui.craft.resources"),
text: "🛠",
title: this._host.i18n("ui.craft.resources"),
css: {
cursor: "pointer",
display: "inline-block",
Expand All @@ -245,8 +246,8 @@ export class CraftSettingsUi extends SettingsSectionUi<CraftSettings> {
});

element.append(this._itemsButton);
element.append(this._resourcesButton);
element.append(this._triggerButton);
element.append(this._resourcesButton);
element.append(list);
element.append(resourcesList);

Expand Down
9 changes: 5 additions & 4 deletions packages/userscript/source/ui/TimeControlSettingsUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ export class TimeControlSettingsUi extends SettingsSectionUi<TimeControlSettings
const itext = ucfirst(this._host.i18n("ui.timeCtrl"));

// Our main element is a list item.
const element = $("<li/>", { id: "ks-" + toggleName });
const element = $("<li/>", { id: `ks-${toggleName}` });

const label = $("<label/>", {
for: "toggle-" + toggleName,
for: `toggle-${toggleName}`,
text: itext,
});

const input = $("<input/>", {
id: "toggle-" + toggleName,
id: `toggle-${toggleName}`,
type: "checkbox",
});
this._options.$enabled = input;
Expand Down Expand Up @@ -978,7 +978,8 @@ export class TimeControlSettingsUi extends SettingsSectionUi<TimeControlSettings
});
const resourcesButton = $("<div/>", {
id: "toggle-reset-resources",
text: this._host.i18n("ui.craft.resources"),
text: "🛠",
title: this._host.i18n("ui.craft.resources"),
css: {
cursor: "pointer",
display: "inline-block",
Expand Down

0 comments on commit 21948c5

Please sign in to comment.