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

Development #163

Open
wants to merge 7 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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,7 @@ bower_components
build
cache
desktop-app/js/vendor
desktop-app/css/font-awesome.min.css
desktop-app/fonts/*
dist
*.DS_Store
155 changes: 153 additions & 2 deletions desktop-app/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ a {
text-decoration: none;
}

.pointer{
cursor: pointer;
}


/* General layout */

Expand Down Expand Up @@ -152,6 +156,13 @@ html, body, body > div.ng-scope {

}

@media (max-width: 1034px){
#common-connections-wrapper{
width: 400px;
margin: auto;
}
}

.main-photo-container {
flex: 0 0 640px;
order: 1;
Expand Down Expand Up @@ -235,12 +246,12 @@ html, body, body > div.ng-scope {
text-align: center;
}

.schoolwork {
.schoolwork, .common-connections, .common-interests {
display: block;
text-align: center;
}

.school, .work {
.school, .work, .common-connections, .common-interests{
display: block;
margin-top: 4px;
}
Expand Down Expand Up @@ -292,6 +303,146 @@ html, body, body > div.ng-scope {
border: 5px solid #DB6151;
}

/* Swipe Interests */

#common-interest-wrapper{
border-top: solid #eeeeee thin;
border-bottom: solid #eeeeee thin;
padding: 10px 0;
margin: 10px 0;
}

#common-interest-wrapper h4{
display: block;
border-bottom: #DB6151;
margin-top: 0;
margin-bottom: 5px;
text-transform: uppercase;
color: #DB6151;
}

#common-interest-wrapper .interest{
border-radius: 5px;
background: #DB6151;
padding: 5px;
color: white;
margin: 2px;
display: inline-block;
}

/* Swipe common connections*/

#common-connections{
margin: 10px 0;
padding: 10px 0;
border-top: solid thin #eeeeee;
border-bottom: solid thin #eeeeee;
}

#common-connections h4{
display: block;
border-bottom: #DB6151;
margin-top: 0;
margin-bottom: 5px;
text-transform: uppercase;
color: #DB6151;
}

/* Instagram photos */

#instagram-photos{
margin: 10px 0;
padding: 10px 0;
border-top: solid thin #eeeeee;
border-bottom: solid thin #eeeeee;
}

#instagram-photos .small-photos{
margin: auto;
}

#instagram-photos h4{
display: block;
border-bottom: #DB6151;
margin-top: 0;
margin-bottom: 5px;
text-transform: uppercase;
color: #DB6151;
}

.column-wrapper{
display: table;
width: 100%;
}

.column-wrapper .col{
width: 30%;
display: table-cell;
vertical-align: top;
}

.text-right{
text-align: right;
}

/* Spotify */

#spotify-wrapper h4{
display: block;
border-bottom: #DB6151;
margin-top: 0;
margin-bottom: 5px;
text-transform: uppercase;
color: #DB6151;
}

#spotify-wrapper #spotify-theme-track{
margin: auto;
}

#spotify-wrapper #spotify-theme-track .track-cover{
position: relative;
width: 200px;
float: left;
}

#spotify-wrapper #spotify-theme-track .track-meta{
width: 200px;
float: left;
padding-left: 10px;
}

#spotify-wrapper #spotify-theme-track img{
max-width: 100%;
}

/* Profile thumbnails */

.profile-thumbnail-wrapper{
display: flex;
width: 100%;
}

.profile-thumbnail-wrapper .profile-thumbnail{
display: inline-block;
margin: 0 5px;
text-decoration: none;
color: inherit;
}

.profile-thumbnail-wrapper .profile-thumbnail .thumbnail-image{
border-radius: 50%;
background-size: cover;
width: 90px;
height: 90px;
display: block;
}

.profile-thumbnail-wrapper .profile-thumbnail .thumbnail-name{
max-width: 90px;
text-align: center;
display: block;
}

/* Templates - login */

Expand Down
4 changes: 0 additions & 4 deletions desktop-app/css/font-awesome.min.css

This file was deleted.

Binary file removed desktop-app/fonts/fontawesome-webfont.eot
Binary file not shown.
685 changes: 0 additions & 685 deletions desktop-app/fonts/fontawesome-webfont.svg

This file was deleted.

Binary file removed desktop-app/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file removed desktop-app/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file removed desktop-app/fonts/fontawesome-webfont.woff2
Binary file not shown.
24 changes: 17 additions & 7 deletions desktop-app/js/tinder-desktop.swipe.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
$scope.allPeople = [];
$scope.peopleIndex = 0;
$scope.apiQueue = [];
$scope.instagramPhotosAtOnce = 10;
$scope.instagramPhotosMaxCount = $scope.instagramPhotosAtOnce;
var queueTimer = null;

API.getAccount().then(function(response){
Expand All @@ -28,6 +30,10 @@
initCards();
});

function resetInstagramMaxCount(){
$scope.instagramPhotosMaxCount = $scope.instagramPhotosAtOnce;
}

var getPeople = function() {
flushApiQueue();
API.people().then(setPeople);
Expand Down Expand Up @@ -76,6 +82,7 @@
};

$scope.undo = function() {
resetInstagramMaxCount();
$scope.apiQueue.pop();
$scope.peopleIndex--;
var cardEl = $scope.cards[$scope.cards.length - $scope.peopleIndex - 1];
Expand Down Expand Up @@ -104,6 +111,7 @@
});

window.stack.on('throwout', function (e) {
resetInstagramMaxCount();
var user = $scope.allPeople[$scope.peopleIndex];
var method;
if(superLike === true){
Expand Down Expand Up @@ -202,7 +210,7 @@
Mousetrap.bind('shift+right', function (evt) {
var location = $location.path()
if( location != '/swipe/' ) return

var user = $scope.allPeople[$scope.peopleIndex];

if($scope.superLikesRemaining == '0'){
Expand Down Expand Up @@ -239,38 +247,38 @@
var location = $location.path()
if( location != '/swipe/' ) return

// someone has said to go to the next picture,
// someone has said to go to the next picture,
// accomplish by increasing the current length by 1
var numberOfPhotos = $scope.allPeople[$scope.peopleIndex].photos.length
var photoIndex = $scope.allPeople[$scope.peopleIndex].photoIndex

// they clicked it while on the last photo, send it to the top
// they clicked it while on the last photo, send it to the top
if(photoIndex == 0){
$scope.allPeople[$scope.peopleIndex].photoIndex = numberOfPhotos - 1
} else {
$scope.allPeople[$scope.peopleIndex].photoIndex += -1
return
}
});
});

Mousetrap.bind('down', function(evt) {
evt.preventDefault();
var location = $location.path()
if( location != '/swipe/' ) return

// someone has said to go to the next picture,
// someone has said to go to the next picture,
// accomplish by increasing the current length by 1
var numberOfPhotos = $scope.allPeople[$scope.peopleIndex].photos.length
var photoIndex = $scope.allPeople[$scope.peopleIndex].photoIndex

// they clicked it while on the last photo, send it to the top
// they clicked it while on the last photo, send it to the top
if(photoIndex == numberOfPhotos - 1){
$scope.allPeople[$scope.peopleIndex].photoIndex = 0
} else {
$scope.allPeople[$scope.peopleIndex].photoIndex += 1
return
}
});
});

// randomize rotation
$timeout(function() {
Expand Down Expand Up @@ -325,4 +333,6 @@
applyEl.css('opacity', confidence * (2 / 3));
clearEl.css('opacity', 0);
}


})();
6 changes: 5 additions & 1 deletion desktop-app/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"LOADING": "Loading...",
"AWAY": "@:PROFILE.AWAY",
"ACTIVE": "@:PROFILE.ACTIVE",
"AT": "@:PROFILE.AT"
"AT": "@:PROFILE.AT",
"COMMON_INTERESTS": "common interests",
"COMMON_CONNECTIONS": "common connections",
"INSTAGRAM_PHOTOS": "photos",
"PREVIEW_SPOTIFY_TRACK": "preview spotify track"
}
}
6 changes: 5 additions & 1 deletion desktop-app/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"LOADING": "Chargement...",
"AWAY": "@:PROFILE.AWAY",
"ACTIVE": "@:PROFILE.ACTIVE",
"AT": "@:PROFILE.AT"
"AT": "@:PROFILE.AT",
"COMMON_INTERESTS": "common interests",
"COMMON_CONNECTIONS": "common connections",
"INSTAGRAM_PHOTOS": "photos",
"PREVIEW_SPOTIFY_TRACK": "preview spotify track"
}
}
6 changes: 5 additions & 1 deletion desktop-app/locales/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"LOADING": "Betöltés...",
"AWAY": "@:PROFILE.AWAY",
"ACTIVE": "@:PROFILE.ACTIVE",
"AT": "@:PROFILE.AT"
"AT": "@:PROFILE.AT",
"COMMON_INTERESTS": "közös érdeklődés",
"COMMON_CONNECTIONS": "közös ismerős",
"INSTAGRAM_PHOTOS": "kép",
"PREVIEW_SPOTIFY_TRACK": "hallgass bele"
}
}
6 changes: 5 additions & 1 deletion desktop-app/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
"LOADING": "Laden...",
"AWAY": "@:PROFILE.AWAY",
"ACTIVE": "@:PROFILE.ACTIVE",
"AT": "@:PROFILE.AT"
"AT": "@:PROFILE.AT",
"COMMON_INTERESTS": "common interests",
"COMMON_CONNECTIONS": "common connections",
"INSTAGRAM_PHOTOS": "photos",
"PREVIEW_SPOTIFY_TRACK": "preview spotify track"
}
}
Loading