Skip to content
This repository has been archived by the owner on Jul 2, 2023. It is now read-only.

Commit

Permalink
Merge pull request #90 from AndresMorelos/v1.20.0
Browse files Browse the repository at this point in the history
V1.20.0
  • Loading branch information
AndresMorelos authored Jun 17, 2022
2 parents cf7c983 + 2a9b0ca commit 3d7d88e
Show file tree
Hide file tree
Showing 21 changed files with 86 additions and 21 deletions.
39 changes: 32 additions & 7 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,21 @@ function createMainWindow() {
mainWindow.on('close', (event) => {
event.preventDefault();
if (isDev || forceDevtools) mainWindow.webContents.closeDevTools();
app.isHidden = true;
if (process.platform !== 'darwin') {
mainWindow.setSkipTaskbar(true);

const needCloseApp =
appConfig.getSync('general.quitAtClose') || false;

if (!needCloseApp) {
app.isHidden = true;
if (process.platform !== 'darwin') {
mainWindow.setSkipTaskbar(true);
} else {
app.dock.hide();
}
mainWindow.hide();
} else {
app.dock.hide();
app.quit();
}
mainWindow.hide();
});
}

Expand Down Expand Up @@ -298,6 +306,7 @@ function setInitialValues() {
lastCheck: Date.now(),
enableMetrics: true,
openAtLogin: true,
quitAtClose: false,
},
invoice: {
exportDir: os.homedir(),
Expand Down Expand Up @@ -481,8 +490,8 @@ function migrateData() {
},
6: (configs) => {
// Return current configs if this is the first time install
const { trayIcon, enableMetrics } = configs.general;
if (trayIcon !== undefined && enableMetrics !== undefined) {
const { openAtLogin } = configs.general;
if (openAtLogin !== undefined) {
return configs;
}

Expand All @@ -495,6 +504,22 @@ function migrateData() {
},
};
},
7: (configs) => {
// Return current configs if this is the first time install
const { quitAtClose } = configs.general;
if (quitAtClose !== undefined) {
return configs;
}

// Update current configs
return {
...configs,
general: {
...configs.general,
quitAtClose: false,
},
};
},
};
// Get the current Config
const configs = appConfig.getSync();
Expand Down
7 changes: 4 additions & 3 deletions app/components/settings/General.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class General extends Component {
trayIcon,
enableMetrics,
openAtLogin,
quitAtClose,
} = this.state;
return (
<div>
Expand Down Expand Up @@ -213,13 +214,13 @@ class General extends Component {
<div className="col-md-3">
<div className="pageItem">
<label className="itemLabel">
{t('settings:fields:sendMetricsAnon')}
{t('settings:fields:quitAtClose')}
</label>
<label className="switch">
<input
name="enableMetrics"
name="quitAtClose"
type="checkbox"
checked={enableMetrics}
checked={quitAtClose}
onChange={this.handleInputChange}
/>
<span className="slider round" />
Expand Down
1 change: 1 addition & 0 deletions i18n/en/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"trayIcon": "Menu Bar Icon",
"sendMetricsAnon": "Send App Metrics Anonymously",
"openAtLogin": "Open at Login",
"quitAtClose": "Quit at Close",
"mute": "Mute",
"autoCheckUpdate": {
"name": "Auto Check for Update",
Expand Down
1 change: 1 addition & 0 deletions i18n/esES/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"requiredFields": "Campos requeridos",
"sound": "Sonido",
"mute": "Silenciar",
"quitAtClose": "Salir al cerrar",
"autoCheckUpdate": {
"name": "Buscar actualizaciones automáticamente",
"daily": "Diariamente (Recomendado)",
Expand Down
7 changes: 7 additions & 0 deletions i18n/nl/form.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"header": {
"contactEdit": "Contact aanpassen",
"new": "Nieuwe factuur aanmaken",
"edit": "Factuur bewerken",
"btns": {
Expand All @@ -20,6 +21,12 @@
"quantity": "Aantal",
"add": "Nieuw item toevoegen"
},
"paymentItems": {
"name": "Voorschot",
"description": "Beschrijving",
"value": "Bedrag",
"add": "Voeg een voorschot toe"
},
"recipient": {
"name": "Ontvanger",
"select": "Selecteer",
Expand Down
4 changes: 3 additions & 1 deletion i18n/nl/invoices.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"invoiceID": "Factuurnummer",
"createdDate": "Gemaakt op",
"dueDate": "Vervaldatum",
"total": "Totaal Bedrag"
"total": "Totaal Bedrag",
"prepaid": "Voorschot",
"remaining": "Resterend bedrag"
},
"status": {
"pending": "In behandeling",
Expand Down
1 change: 1 addition & 0 deletions i18n/nl/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"contact": {
"saved": "Uw contactpersoon is met succes opgeslagen",
"updated": "Contact succesvol aangepast",
"deleted": "Uw contactpersoon is met succes verwijderd"
},
"settings": {
Expand Down
2 changes: 2 additions & 0 deletions i18n/nl/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"sound": "Geluid",
"trayIcon": "Menubalkitem",
"sendMetricsAnon": "Stuur App Metrics Anoniem",
"openAtLogin": "Open at Login",
"quitAtClose": "Quit at Close",
"mute": "Dempen",
"autoCheckUpdate": {
"name": "Check automatisch voor updates",
Expand Down
2 changes: 1 addition & 1 deletion i18n/nl/tour.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"slides": {
"welcome": {
"heading": "👋 Hallo",
"description": "Bedankt voor het proberen van Invoncify. Graag laten wij zien hoe u een verbluffend factuur maakt met slechts 4 eenvoudige stappen"
"description": "Bedankt voor het proberen van Invoncify. Graag laten wij zien hoe u een verbluffende factuur maakt met slechts 4 eenvoudige stappen"
},
"create": {
"heading": "Stap 1. Aanmaken",
Expand Down
7 changes: 7 additions & 0 deletions i18n/ro/form.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"header": {
"contactEdit": "Editare contact",
"new": "Creează o factură nouă",
"edit": "Editează factură",
"btns": {
Expand All @@ -20,6 +21,12 @@
"quantity": "Cantitate",
"add": "Adaugă un element nou"
},
"paymentItems": {
"name": "Preplăți",
"description": "Descriere",
"value": "Valoare",
"add": "Adaugă un element nou de preplată"
},
"recipient": {
"name": "Destinatar",
"select": "Selectează",
Expand Down
4 changes: 3 additions & 1 deletion i18n/ro/invoices.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"invoiceID": "ID factură",
"createdDate": "Creat in data de",
"dueDate": "Dată scadentă",
"total": "Valoare totală"
"total": "Valoare totală",
"prepaid": "Preplătit",
"remaining": "Soldul rămas"
},
"status": {
"pending": "În așteptare",
Expand Down
1 change: 1 addition & 0 deletions i18n/ro/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"contact": {
"saved": "Contact salvat cu succes",
"updated": "Contact actualizat cu succes",
"deleted": "Contact șters cu succes"
},
"settings": {
Expand Down
2 changes: 2 additions & 0 deletions i18n/ro/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"sound": "Sunet",
"trayIcon": "Iconiță bară meniu",
"sendMetricsAnon": "Trimite valori aplicație anonim",
"openAtLogin": "Open at Login",
"quitAtClose": "Quit at Close",
"mute": "Mut",
"autoCheckUpdate": {
"name": "Verificare automată pentru actualizări",
Expand Down
2 changes: 1 addition & 1 deletion i18n/ro/tour.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"slides": {
"welcome": {
"heading": "👋 Salut!",
"description": "Mulțumesc pentru că îmi acordați o probă. Iată cum puteți crea facturi uimitoare în patru pași simpli"
"description": "Vă mulțumim pentru încercare. Permiteți-mi să vă arăt cum să creați facturi uimitoare în doar 4 pași simpli"
},
"create": {
"heading": "Pasul 1. Crează",
Expand Down
7 changes: 7 additions & 0 deletions i18n/sr/form.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"header": {
"contactEdit": "Ажурирајте Контакт",
"new": "Направи нову фактуру",
"edit": "Измени фактуру",
"btns": {
Expand All @@ -20,6 +21,12 @@
"quantity": "Количина",
"add": "Додај нову ставку"
},
"paymentItems": {
"name": "Претплате",
"description": "Опис",
"value": "Вредност",
"add": "Додајте нову ставку у претплати"
},
"recipient": {
"name": "Прималац",
"select": "Изабери",
Expand Down
4 changes: 3 additions & 1 deletion i18n/sr/invoices.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
"invoiceID": "ID фактуре",
"createdDate": "Креирано",
"dueDate": "Датум валуте",
"total": "Укупна вредност"
"total": "Укупна вредност",
"prepaid": "Претплата",
"remaining": "Преостало"
},
"status": {
"pending": "На чекању",
Expand Down
1 change: 1 addition & 0 deletions i18n/sr/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"contact": {
"saved": "Контакт је успешно сачуван",
"updated": "Контакт успешно ажуриран",
"deleted": "Контакт је успешно обрисан"
},
"settings": {
Expand Down
5 changes: 4 additions & 1 deletion i18n/sr/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
"sound": "Звук",
"trayIcon": "Иконица у менију",
"sendMetricsAnon": "Пошаљите анонимну статистику о коришћењу",
"openAtLogin": "Open at Login",
"quitAtClose": "Quit at Close",
"mute": "Нечујно",
"autoCheckUpdate": {
"name": "Аутоматска провера ажурирања",
Expand Down Expand Up @@ -63,7 +65,8 @@
"vi": "Вијетнамски",
"zh-CN": "Кинески (поједностављен)",
"zh-TW": "Кинески (традиционални)",
"ro": "Romanian"
"sr": "Српски (ћирилица)",
"ro": "Румунски"
},
"importExport": {
"name": "Увоз/Извоз",
Expand Down
2 changes: 1 addition & 1 deletion i18n/sr/tour.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"slides": {
"welcome": {
"heading": "Здраво!",
"description": "Хвала на проби. Показаћу ти како да направиш сјајне фактуре у 3 једноставна корака"
"description": "Хвала на проби. Показаћу ти како да направиш сјајне фактуре у 4 једноставна корака"
},
"create": {
"heading": "Први корак. Направи",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "invoncify",
"homepage": "https://invoncify.andresmorelos.me",
"productName": "Invoncify",
"version": "1.19.1",
"version": "1.20.0",
"license": "GPL-3.0",
"description": "Flexible invoicing desktop app with beautiful & customizable templates",
"author": {
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3537,9 +3537,9 @@ caniuse-api@^3.0.0:
lodash.uniq "^4.5.0"

caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001286:
version "1.0.30001291"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001291.tgz#08a8d2cfea0b2cf2e1d94dd795942d0daef6108c"
integrity sha512-roMV5V0HNGgJ88s42eE70sstqGW/gwFndosYrikHthw98N5tLnOTxFqMLQjZVRxTWFlJ4rn+MsgXrR7MDPY4jA==
version "1.0.30001355"
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001355.tgz"
integrity sha512-Sd6pjJHF27LzCB7pT7qs+kuX2ndurzCzkpJl6Qct7LPSZ9jn0bkOA8mdgMgmqnQAWLVOOGjLpc+66V57eLtb1g==

chai@4.3.4:
version "4.3.4"
Expand Down

0 comments on commit 3d7d88e

Please sign in to comment.