added icons to notifications

This commit is contained in:
arnaucode
2017-07-13 20:39:19 +02:00
parent af912e3a3b
commit 73c386ff7f
5 changed files with 23 additions and 16 deletions

View File

@@ -1,16 +1,26 @@
# CarsInCommonServer
frontend app code: https://github.com/idoctnef/carsincommonApp
images server: https://github.com/arnaucode/goImgServer
- frontend app code: https://github.com/arnaucode/carsincommonApp
- images server: https://github.com/arnaucode/goImgServer
**Backend:**
Nodejs + Express + MongoDB
- Nodejs + Express + MongoDB
- Go --> for the images server
**Frontend:**
Angularjs + Ionic + MaterialDesign
- Angularjs + Ionic
App:
![carsincommon](https://raw.githubusercontent.com/arnaucode/carsincommonApp/master/carsincommon.png "carsincommon")
code: https://github.com/arnaucode/carsincommonApp
--------------------
**To Do Backend and Frontend:**
```
@@ -19,9 +29,6 @@ images server: https://github.com/arnaucode/goImgServer
```
--------------------
#### RESOURCES using:
initial avatars users: [http://www.flaticon.com/packs/animal-icon-collection](http://www.flaticon.com/packs/animal-icon-collection)

View File

@@ -5,5 +5,4 @@ module.exports = {
'database': 'mongodb://localhost/carsincommon',
"port" : process.env.PORT || 3000,
"pageSize": 20
};

View File

@@ -153,7 +153,7 @@ exports.addJoinPetition = function(req, res) {
concept: "join",
message: "user "+userJoining.username+" joins your travel "+travel.title,
date: new Date(),
icon: 'join.png',
icon: 'ion-person-add',
link: "travels/" + travel._id,
user: user._id
});
@@ -212,7 +212,7 @@ exports.unJoin = function(req, res) {
concept: "unjoin",
message: "user "+userJoining.username+" unjoins your travel "+travel.title,
date: new Date(),
icon: 'unjoin.png',
icon: 'ion-arrow-return-left',
link: "travels/" + travel._id,
user: user._id
});
@@ -281,7 +281,7 @@ exports.declineJoin = function(req, res) {
concept: "travel",
message: "user "+userOwner.username+" declines your petition for "+travel.title,
date: new Date(),
icon: 'travel.png',
icon: 'ion-close',
link: "travels/" + travel._id,
user: user._id
});
@@ -350,7 +350,7 @@ exports.acceptJoin = function(req, res) {
concept: "travel",
message: "user "+userOwner.username+" accepts your petition for "+travel.title,
date: new Date(),
icon: 'travel.png',
icon: 'ion-checkmark',
link: "travels/" + travel._id,
user: user._id
});
@@ -409,7 +409,7 @@ exports.leave = function(req, res) {
concept: "leave",
message: "user "+userLeaving.username+" leaves your travel "+travel.title,
date: new Date(),
icon: 'leave.png',
icon: 'ion-log-out',
link: "travels/" + travel._id,
user: user._id
});

View File

@@ -418,7 +418,7 @@ exports.likeUser = function(req, res) {
concept: "like",
message: "user " + userL.username + " adds a like to you",
date: new Date(),
icon: 'like.png',
icon: 'ion-heart',
link: "users/" + user._id,
user: user._id
});
@@ -469,7 +469,7 @@ exports.unlikeUser = function(req, res) {
concept: "like",
message: "user " + userL.username + " removes like on you",
date: new Date(),
icon: 'like.png',
icon: 'ion-heart-broken',
link: "users/" + user._id,
user: user._id
});

View File

@@ -14,7 +14,8 @@ var notificationSchema = new Schema({
message: {type: String},
link: {type: String},//aquí oju, a la app i a la web calen links diferents
date: {type: Date},
dateviewed: {type: Date}
dateviewed: {type: Date},
icon: {type: String}
})
notificationSchema.plugin(mongooseUniqueValidator);