Skip to content

Commit

Permalink
AB#32667: Add smaller TerminalPoster variant (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-halinen authored Apr 3, 2024
1 parent 5e77bff commit 6d07051
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/Generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,15 @@ const Generator = props => {
/>
</div>
)}
{generatorStore.component === 'TerminalPoster' && (
<div>
<Checkbox
label="70x100 Juliste"
defaultValueTrue={generatorStore.isSmallTerminalPoster}
onChange={() => generatorStore.setIsSmallTerminalPoster()}
/>
</div>
)}
</div>
</Column>

Expand Down
7 changes: 7 additions & 0 deletions src/stores/generatorStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ const store = observable({
minimapZones: true,
minimapZoneSymbols: true,
legend: true,
isSmallTerminalPoster: false,
get rows() {
let rows = [];

Expand Down Expand Up @@ -147,6 +148,10 @@ store.setLegend = () => {
store.legend = !store.legend;
};

store.setIsSmallTerminalPoster = () => {
store.isSmallTerminalPoster = !store.isSmallTerminalPoster;
};

store.generate = () => {
const user = commonStore.getUser();
const routeFilter = commonStore.routeFilter;
Expand Down Expand Up @@ -181,6 +186,8 @@ store.generate = () => {
legend: componentsWithMapOptions.includes(store.component) ? store.legend : null,
user,
routeFilter,
isSmallTerminalPoster:
store.isSmallTerminalPoster && store.component === componentsByLabel.Terminaalijuliste,
});

const props =
Expand Down

0 comments on commit 6d07051

Please sign in to comment.