Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nb cards to print #297

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ function App() {
// Settings: Portrait orientation
portrait: false,
// Settings: Additional cards
additionalCards: 0,
additionalCards: 1,
// Settings: Show tip (legend) on card
hideTip: false,
});
Expand Down Expand Up @@ -126,7 +126,7 @@ function App() {
};
const onAdditionalCardsChange = (additionalCardsStr) => {
const amount = parseInt(additionalCardsStr);
amount >= 0 && setSettings({ ...settings, additionalCards: amount });
amount >= 1 && setSettings({ ...settings, additionalCards: amount });
};
const onHideTipChange = (hideTip) => {
setSettings({ ...settings, hideTip });
Expand Down Expand Up @@ -200,8 +200,8 @@ function App() {
{t('button.print')}
</Button>
<Pane id="print-area">
{settings.additionalCards >= 0 &&
[...Array(settings.additionalCards + 1)].map((el, idx) => (
{settings.additionalCards >= 1 &&
[...Array(settings.additionalCards)].map((el, idx) => (
<WifiCard
key={`card-nr-${idx}`}
settings={settings}
Expand Down
3 changes: 2 additions & 1 deletion src/translations.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const Translations = [
'wifi.login': 'WiFi Login',
'wifi.name': 'Network name',
'wifi.name.hiddenSSID': 'Hidden SSID',
'cards.additional': 'Additional cards to print',
'cards.additional': 'Number of cards to print',
'cards.tip.hide': 'Hide tip (legend)',
'wifi.name.placeholder': 'WiFi Network name',
'wifi.password': 'Password',
Expand Down Expand Up @@ -576,6 +576,7 @@ export const Translations = [
'Le mot de passe doit au moins faire 8 caractères, ou changez le chiffrement en "Aucun"',
'button.rotate': 'Pivoter',
'button.print': 'Imprimer',
'cards.additional': 'Nombre de cartes a imprimer',
select: 'Choisir la langue',
},
},
Expand Down
Loading