Skip to content

Commit

Permalink
Merge branch 'email-notification'
Browse files Browse the repository at this point in the history
  • Loading branch information
ulver2812 committed Feb 25, 2019
2 parents 42abf47 + d44810c commit ba359a4
Show file tree
Hide file tree
Showing 13 changed files with 360 additions and 54 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This desktop app allow you to configure 3 different types of backup job (One tim

The app is designed with Electron and Angular so you can use it on Windows, Mac and Linux.

## Requirement:
## Requirement

This app rely on AWS CLI to use the efficient "sync" command, this mean that you need to install the AWS CLI on your own in order to use this app.

Expand All @@ -26,9 +26,15 @@ You can find the AWS CLI installer here: [Download AWS CLI](https://aws.amazon.c

## Windows executable latest version

[Portable](https://github.com/ulver2812/aws-s3-backup/raw/master/app-builds/AWS%20S3%20Backup%201.1.0.exe)
[Portable](https://github.com/ulver2812/aws-s3-backup/raw/master/app-builds/AWS%20S3%20Backup%201.2.0.exe)

[Setup](https://github.com/ulver2812/aws-s3-backup/raw/master/app-builds/AWS%20S3%20Backup%20Setup%201.1.0.exe)
[Setup](https://github.com/ulver2812/aws-s3-backup/raw/master/app-builds/AWS%20S3%20Backup%20Setup%201.2.0.exe)

## Changelog

- 1.2.0 Added email notifications
- 1.1.0 UI Enhancements
- 1.0.0 First release

## Getting Started

Expand Down
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {app, BrowserWindow, BrowserWindowConstructorOptions, screen, Tray, Menu,
import * as path from 'path';
import * as url from 'url';
import * as Splashscreen from '@trodi/electron-splashscreen';
import * as contextMenuInternal from 'electron-context-menu';

let win, serve, tray;
const args = process.argv.slice(1);
Expand Down Expand Up @@ -88,6 +89,12 @@ function createTray() {
});
}

function createContextMenuInternal() {
contextMenuInternal.default({
showInspectElement: false
});
}

try {

// This method will be called when Electron has finished
Expand All @@ -97,6 +104,8 @@ try {

app.on('ready', createTray);

app.on('ready', createContextMenuInternal);

// Quit when all windows are closed.
app.on('window-all-closed', () => {
// On OS X it is common for applications and their menu bar
Expand Down
157 changes: 118 additions & 39 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-s3-backup",
"version": "1.1.0",
"version": "1.2.0",
"description": "AWS S3 backup system",
"homepage": "https://github.com/ulver2812/aws-s3-backup",
"author": {
Expand Down Expand Up @@ -47,12 +47,14 @@
"@types/node-schedule": "^1.2.2",
"aws-sdk": "^2.335.0",
"chokidar": "^2.0.4",
"electron-context-menu": "^0.11.0",
"fs-extra": "^7.0.0",
"hammerjs": "^2.0.8",
"is-online": "^7.0.0",
"moment": "^2.22.2",
"ngx-electron": "^1.0.4",
"node-schedule": "^1.3.0",
"nodemailer": "^5.1.1",
"sugar": "^2.0.4"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import { S3ExplorerComponent } from './components/s3-explorer/s3-explorer.compon
import { JobAlertDialogComponent } from './components/dialogs/job-alert-dialog/job-alert-dialog.component';
import { JobBackupManuallyComponent } from './components/dialogs/job-backup-manually/job-backup-manually.component';
import { NoInternetConnectionComponent } from './components/dialogs/no-internet-connection/no-internet-connection.component';
import {NotificationsService} from './providers/notifications.service';


// AoT requires an exported function for factories
Expand Down Expand Up @@ -76,7 +77,7 @@ export function HttpLoaderFactory(http: HttpClient) {
}),
BrowserAnimationsModule
],
providers: [ElectronService, JobsService, JobSchedulerService],
providers: [ElectronService, JobsService, JobSchedulerService, NotificationsService],
bootstrap: [AppComponent],
entryComponents: [JobAlertDialogComponent, JobBackupManuallyComponent, NoInternetConnectionComponent]
})
Expand Down
48 changes: 48 additions & 0 deletions src/app/components/settings/settings.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,52 @@ <h2>{{'PAGES.SETTINGS.TITLE' | translate}}</h2>
</div>
</div>

<div class="flex-container" fxLayout fxLayoutGap="40px">
<div class="flex-element" fxFlex>
<mat-card>
<section class="mat-typography">
<h2>{{'PAGES.NOTIFICATIONS-SETTINGS.TITLE' | translate}}</h2>
</section>
<p>
<mat-checkbox [(ngModel)]="settings.allowNotifications"> {{ 'PAGES.NOTIFICATIONS-SETTINGS.ALLOW' | translate }}</mat-checkbox>
</p>
<mat-divider [inset]="true"></mat-divider>
<br>
<mat-form-field>
<input [(ngModel)]="settings.emailHost" matInput placeholder="{{'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.HOST' | translate}}">
</mat-form-field>
<mat-form-field>
<input [(ngModel)]="settings.emailPort" matInput type="number" min="0" placeholder="{{'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.PORT' | translate}}">
</mat-form-field>
<p>
<mat-checkbox [(ngModel)]="settings.emailSecure"> {{ 'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.SECURE' | translate }}</mat-checkbox>
</p>
<mat-form-field>
<input [(ngModel)]="settings.emailUser" matInput placeholder="{{'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.USER' | translate}}">
</mat-form-field>
<mat-form-field>
<input [(ngModel)]="settings.emailPassword" type="password" matInput placeholder="{{'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.PASSWORD' | translate}}">
</mat-form-field>
<mat-form-field>
<input [(ngModel)]="settings.emailSender" matInput placeholder="{{'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.SENDER' | translate}}">
</mat-form-field>
<mat-form-field class="example-chip-list">
<mat-chip-list #chipList>
<mat-chip *ngFor="let email of settings.emailReceivers" [selectable]="selectable"
[removable]="removable" (removed)="remove(email)">
{{email}}
<mat-icon matChipRemove *ngIf="removable">cancel</mat-icon>
</mat-chip>
<input placeholder="{{'PAGES.NOTIFICATIONS-SETTINGS.EMAIL.RECEIVERS' | translate}}"
[matChipInputFor]="chipList"
[matChipInputSeparatorKeyCodes]="separatorKeysCodes"
[matChipInputAddOnBlur]="addOnBlur"
(matChipInputTokenEnd)="add($event)">
</mat-chip-list>
</mat-form-field>

</mat-card>
</div>
</div>

<button mat-raised-button class="float-right" color="primary" (click)="save()">{{'PAGES.SETTINGS.SAVE' | translate}}</button>
Loading

0 comments on commit ba359a4

Please sign in to comment.