Skip to content

Commit

Permalink
Merged release/0.0.2 into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Federico Iosue committed Jan 5, 2017
2 parents 2813fb4 + 9e761d0 commit a2b99ee
Show file tree
Hide file tree
Showing 16 changed files with 107 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ data/
omni-notes-desktop-*/
*.iml
.idea/
dist/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ After that simply run ```electron-packager .``` command from inside the project
Otherwise here the specific platform shortcuts for build commands (64bit architectures for Linux and MacOS, 32bit for Windows) that will prepare distributable folders into _dist_:

```
package-linux
npm run package-linux
```

```
package-mac
npm run package-mac
```

```
package-win
npm run package-win
```

## Developed with love and passion by
Expand Down
1 change: 1 addition & 0 deletions app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ var ONApp;
'LocalStorageModule',
'cfp.hotkeys',
'ngFileUpload',
'nsPopover',
'angularMoment'])
.config(['$routeProvider', function ($routeProvider) {
$routeProvider
Expand Down
7 changes: 5 additions & 2 deletions app/assets/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ md-toolbar.md-hue-1 md-input-container {

/*Sidenav*/

#sidenav {
height: 100%;
#drawer-container {
overflow-y: scroll;
}

Expand Down Expand Up @@ -170,3 +169,7 @@ md-fab-speed-dial.ng-hide-animate:not(.ng-hide) md-fab-trigger {
width: 100%;
height: 100%;
}

md-tooltip ._md-content {
height: auto;
}
21 changes: 20 additions & 1 deletion app/scripts/detail/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,35 @@
<div class="md-toolbar-tools">
<span>Edit</span>
<span flex></span>
<md-button id="add-attachment-button" class="md-icon-button" ngf-select="addAttachment($files)" ngf-multiple="true"
<md-button id="add-attachment-button" class="md-icon-button" ngf-select="addAttachment($files)"
ngf-multiple="true"
aria-label="Add attachments">
<ng-md-icon icon="attachment"/>
</md-button>
<md-button class="md-icon-button" ng-click="setCategory()" aria-label="Change category">
<ng-md-icon ng-if="!note.category" icon="label_outline"/>
<ng-md-icon ng-if="note.category" icon="label" style="fill: {{note.category.color}}"/>
</md-button>
<md-button class="md-icon-button" aria-label="Info" ng-if="note.creation"
ns-popover
ns-popover-template="info-popover"
ns-popover-trigger="click"
ns-popover-placement="bottom|right"
ns-popover-timeout="0.1">
<ng-md-icon icon="info"/>
</md-button>
</div>
</md-toolbar>

<script type="text/ng-template" id="info-popover">
<ul>
<li><a>Created <span am-time-ago="note.creation / 1000 | amFromUnix"/></a></li>
<li><a>Modified <span am-time-ago="note.lastModification / 1000 | amFromUnix"/></a></li>
<li><a>{{countChars()}} chars</a></li>
<li ng-if="note.attachmentsList.length"><a>{{note.attachmentsList.length}} attachments</a></li>
</ul>
</script>

<md-dialog-content layout="column" class="md-dialog-content">

<md-input-container class="md-icon-float note-title">
Expand All @@ -36,6 +54,7 @@
</md-dialog-content>

<md-dialog-actions>
<md-button ng-click="close()">Close</md-button>
<md-button class="md-primary" style="margin-right:20px;" ng-click="saveNote()">Save</md-button>
</md-dialog-actions>

Expand Down
20 changes: 18 additions & 2 deletions app/scripts/detail/detailController.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
description: "Leaves note editing",
allowIn: ['INPUT', 'SELECT', 'TEXTAREA'],
callback: function () {
confirmClosingModifiedNote();
$scope.close();
}
}).add({
combo: "ctrl+c",
Expand All @@ -34,7 +34,14 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
}
});

var confirmClosingModifiedNote = function () {
$scope.createNote = function () {
let note = {};
note.title = "";
note.content = "";
return note;
};

$scope.close = function () {
if (_.isEqual($scope.note, $scope.originalNote)) {
$mdDialog.hide();
return;
Expand All @@ -45,6 +52,9 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
this.confirm = function () {
$mdDialog.hide();
};
this.cancel = function () {
$mdDialog.cancel();
};
},
preserveScope: true,
autoWrap: true,
Expand Down Expand Up @@ -128,4 +138,10 @@ angular.module('ONApp').controller('detailController', ['$rootScope', '$scope',
});
};

$scope.countChars = function () {
var titleSize = $scope.note.title && $scope.note.title.length;
var contentSize = $scope.note.content && $scope.note.content.length;
return titleSize + contentSize
};

}]);
4 changes: 4 additions & 0 deletions app/scripts/detail/info.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div layout="column" class="note-date">
<div>Created <span am-time-ago="note.creation / 1000 | amFromUnix"/></div>
<div>Modified <span am-time-ago="note.lastModification / 1000 | amFromUnix"/></div>
</div>
1 change: 1 addition & 0 deletions app/scripts/detail/undoChangesDialog.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<h3 class="md-title">Note has been changed</h3>
</md-content>
<md-dialog-actions>
<md-button ng-click="dialogCtrl.cancel()">Cancel</md-button>
<md-button class="md-warn" ng-click="dialogCtrl.confirm()">Close it anyway</md-button>
</md-dialog-actions>
</md-dialog>
1 change: 0 additions & 1 deletion app/scripts/drawer/drawer.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
</md-list-item>

<!-- Categories -->
<md-divider ng-if="categories.length"/>
<md-list-item class="menu-item md-2-line" ng-repeat="(key, category) in categories" role="link"
ng-click="filterCategory(category)" ng-right-click="editCategory(category)"
ng-class="{'nav-active': isCurrentNavigation(category)}">
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/list/list.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div ng-controller="listController" layout="column" class="relative list-root">
<div ng-controller="listController" layout="column" class="relative list-root" flex>

<md-fab-speed-dial id="fab" ng-show="isFabVisible()" class="md-scale md-fab-bottom-right">
<md-fab-trigger>
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/services/hotkeysRegistrationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ angular.module('ONApp').service('hotkeysRegistrationService', ['hotkeys', functi
});
};

addHotkey("ctrl+n", "New note");
// addHotkey("ctrl+n", "New note");
addHotkey("ctrl+s", "Save note or category");
addHotkey("esc", "Leaves note editing");
addHotkey("ctrl+c", "Set category during note editing");
Expand Down
26 changes: 26 additions & 0 deletions app/scripts/settings/changelog.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<md-dialog flex="70">

<md-dialog-content layout="column" class="md-dialog-content">

<h3>Changelog</h3>

<h4>Version 0.0.2</h4>
<ul>
<li>Added changelog</li>
<li>Added note info to detail toolbar</li>
<li>Fixed sidebar scrolling</li>
<li>Fixed new note keyboard hotkey</li>
</ul>

<h4>Version 0.0.1</h4>
<ul>
<li>First preview release</li>
</ul>

</md-dialog-content>

<!--<md-dialog-actions>-->
<!--<md-button class="md-primary" ng-click="closeSettings()">Close</md-button>-->
<!--</md-dialog-actions>-->

</md-dialog>
5 changes: 4 additions & 1 deletion app/scripts/settings/settings.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@

<md-dialog-content layout="column" class="md-dialog-content">

<h3>Omni Notes backup folder</h3>
<h4>Omni Notes backup folder</h4>
<material-file-input notes-folder="{{notesFolder}}" />

<md-divider/>
<md-button ng-click="showChangelog()">Changelog</md-button>

</md-dialog-content>

<md-dialog-actions>
Expand Down
15 changes: 15 additions & 0 deletions app/scripts/settings/settingsController.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,19 @@ angular.module('ONApp').controller('settingsController', ['$rootScope', '$scope'
$mdDialog.hide();
};

$scope.showChangelog = function() {
$mdDialog.show({
controllerAs: 'dialogCtrl',
controller: function ($mdDialog) {
this.confirm = function () {
$mdDialog.hide();
};
},
autoWrap: true,
skipHide: true,
clickOutsideToClose: true,
templateUrl: 'app/scripts/settings/changelog.html'
});
}

}]);
6 changes: 4 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
<link rel="stylesheet" href="./node_modules/angular-material/angular-material.min.css" />
<link rel="stylesheet" href="./node_modules/angular-bootstrap-colorpicker/css/colorpicker.min.css" />
<link rel="stylesheet" href="./node_modules/angular-hotkeys/build/hotkeys.min.css" />
<link rel="stylesheet" href="./node_modules/nx-popover/dist/nsPopover.css" />
</head>

<body ng-app="ONApp" layout="column">

<div ng-include="'app/scripts/toolbar/toolbar.html'"></div>
<div role="main" layout="row">
<div ng-include="'app/scripts/drawer/drawer.html'"></div>
<div role="main" layout="row" flex>
<div ng-include="'app/scripts/drawer/drawer.html'" id="drawer-container"></div>
<ng-view id="rootView" ng-cloak></ng-view>
</div>

Expand All @@ -37,6 +38,7 @@
<script src="./node_modules/ng-file-upload/dist/ng-file-upload.min.js"></script>
<script src="./node_modules/moment/moment.js"></script>
<script src="./node_modules/angular-moment/angular-moment.js"></script>
<script src="./node_modules/nx-popover/dist/nsPopover.js"></script>

<script src="./app/app.js"></script>
<script src="./app/scripts/Constants.js"></script>
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "omni-notes-desktop",
"version": "0.0.1",
"version": "0.0.2",
"description": "Omni Notes desktop application",
"main": "main.js",
"scripts": {
"start": "electron main.js",
"package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=icons/mac/logo.icns --prune=true --out=dist",
"package-win": "electron-packager . --overwrite --asar=true --platform=win32 --arch=ia32 --icon=icons/win/logo.ico --prune=true --out=dist --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Omni Notes\"",
"package-linux" : "electron-packager . --overwrite --platform=linux --arch=x64 --icon=icons/png/512x512.png --prune=true --out=dist"
"package-linux": "electron-packager . --overwrite --platform=linux --arch=x64 --icon=icons/png/512x512.png --prune=true --out=dist"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,6 +44,7 @@
"lodash": "^4.17.2",
"moment": "^2.17.1",
"ng-file-upload": "^12.2.13",
"nx-popover": "^0.6.12",
"pdfjs-dist": "^1.6.348",
"svg-morpheus": "^0.3.0"
}
Expand Down

0 comments on commit a2b99ee

Please sign in to comment.