# HG changeset patch # User Mathias Gebbe # Date 1402599070 -7200 # Node ID c5bf4e02958e538917829abf3401c7a317ea6f4d # Parent c1b736a859c9056166a9501c8b2c203234aae853 add/delete credentials, new layout, alpha version ribbon, contact diff -r c1b736a859c9 -r c5bf4e02958e index.js_to_pump.io-client-app_lib_routes --- a/index.js_to_pump.io-client-app_lib_routes Thu Jun 12 10:36:52 2014 +0200 +++ b/index.js_to_pump.io-client-app_lib_routes Thu Jun 12 20:51:10 2014 +0200 @@ -22,6 +22,7 @@ uuid = require("node-uuid"), User = require("../models/user"), Host = require("../models/host"), + Usermap = require("../../../../lib/usermap.js"), RequestToken = require("../models/requesttoken"), RememberMe = require("../models/rememberme"), site = require("../models/site"); @@ -41,7 +42,18 @@ var hosts, users, bank = Host.bank(); if (req.user) { - res.render('index', { pageTitle: "pumpbridge" , user: req.user}); + var fb=false, gp=false, tw=false; + Usermap.search({ + user_pumpio: req.user.id + }, function(err, result) { + if(err) res.render('login', { pageTitle: "pumpbridge" }); + _.each(result, function(um) { + if ( um.id.indexOf('@facebook') != -1 ) fb=true; + if ( um.id.indexOf('@twitter') != -1 ) tw=true; + if ( um.id.indexOf('@google') != -1 ) gp=true; + }); + res.render('index', { pageTitle: "pumpbridge" , user: req.user, usermapfb: fb, usermapgp: gp, usermaptw: tw}); + }); } else { res.render('login', { pageTitle: "pumpbridge" }); } diff -r c1b736a859c9 -r c5bf4e02958e public/contact.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/public/contact.html Thu Jun 12 20:51:10 2014 +0200 @@ -0,0 +1,44 @@ + + +pumpbridge + + + +Angaben gemäß § 5 TMG: + +
+ +

Contact:


+Type: PERSON
+Name: Mathias Gebbe
+Address: Quellwiese 47
+PostalCode: 49080
+City: Osnabrück
+CountryCode: DE
+Phone: +49.15150661709
+Email: mathias.gebbe@gmail.com
+Changed: 2013-10-01T21:23:02+02:00
+
+
+ + + + + + + + + + +
+

+ + + diff -r c1b736a859c9 -r c5bf4e02958e public/images/ribbon.png Binary file public/images/ribbon.png has changed diff -r c1b736a859c9 -r c5bf4e02958e public/images/ribbonl.png Binary file public/images/ribbonl.png has changed diff -r c1b736a859c9 -r c5bf4e02958e public/stylesheets/style.css --- a/public/stylesheets/style.css Thu Jun 12 10:36:52 2014 +0200 +++ b/public/stylesheets/style.css Thu Jun 12 20:51:10 2014 +0200 @@ -4,7 +4,7 @@ text-align: left; padding-top: 80px; color: silver; - font: 14px "Lucida Grande", Helvetica, Arial, sans-serif!important; + font: 16x "Lucida Grande", Helvetica, Arial, sans-serif!important; } a { @@ -16,8 +16,8 @@ } .login { + font: 16x "Lucida Grande", Helvetica, Arial, sans-serif!important; color: black!important; - font-family: "lucida grande", tahoma, verdana, arial, sans-serif; } #gp, #tw, #fb{ @@ -30,7 +30,12 @@ text-align: center; } -.headline { +.headlinebox { + display: inline-block; + position: relative; +} + +.headline{ font-size: 50px; } @@ -59,3 +64,9 @@ .footer a { color: silver!important; } + +.ribbon { + position: absolute; + top: 6px; + left: -25px; +} diff -r c1b736a859c9 -r c5bf4e02958e views/index.jade --- a/views/index.jade Thu Jun 12 10:36:52 2014 +0200 +++ b/views/index.jade Thu Jun 12 20:51:10 2014 +0200 @@ -37,12 +37,12 @@ gapi.signin.render('gp-root', { 'callback': 'signinCallback', - 'clientid': 'GOOGLEPLUSCLIENTID.apps.googleusercontent.com', + 'clientid': 'GOOGLEPLUSID.apps.googleusercontent.com', 'redirecturi': 'postmessage', 'response_type' : 'code', 'accesstype': 'offline', 'approvalprompt': 'force', - 'cookiepolicy': "https://pumpbridge.me", + 'cookiepolicy': "https://server.example", 'requestvisibleactions': 'http://schemas.google.com/AddActivity', 'scope': 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email' }); @@ -96,10 +96,34 @@ } - // load facebook api script. $(document).ready(function () { + var usermapfb="#{usermapfb}"; + var usermaptw="#{usermaptw}"; + var usermapgp="#{usermapgp}"; + + if(usermapfb == 'true'){ + $('#fbloginbutton2').addClass('hide'); + $('#fbdeletebutton').removeClass('hide'); + }else{ + $('#fbloginbutton2').removeClass('hide'); + $('#fbdeletebutton').addClass('hide'); + } + if(usermaptw == 'true'){ + $('#twloginbutton2').addClass('hide'); + $('#twdeletebutton').removeClass('hide'); + }else{ + $('#twloginbutton2').removeClass('hide'); + $('#twdeletebutton').addClass('hide'); + } + if(usermapgp == 'true'){ + $('#gploginbutton2').addClass('hide'); + $('#gpdeletebutton').removeClass('hide'); + }else{ + $('#gploginbutton2').removeClass('hide'); + $('#gpdeletebutton').addClass('hide'); + } var twstatus = getCookie('twitterid') if (twstatus != "") $('#twstatus').html(' ' + getCookie('twitteruser') + ''); @@ -110,7 +134,7 @@ $.getScript('//connect.facebook.net/de_DE/all.js', function () { FB.init({ - appId: 'FACEBOOKCLIENTID', + appId: 'FACEBOOKID', status: true }); @@ -161,10 +185,12 @@ body block content .main - h1(class='headline') pumpbridge.
connecting social networks + .headlinebox + img(class="ribbon", src="/images/ribbonl.png") + h1(class='headline') pumpbridge.
connecting social networks #pump-root.pump-root h4 - | logged in as: + | logged in as:  a(id='pumpstatus',class='pumpstatus',href=user.homepage)=user.id #fb.fb #fb-root.fb-root @@ -174,8 +200,10 @@ br form(class='',action='/bridge',method='post') input(id='fbdeleted',name='fbdelete',hidden='true',value=user.id) - button(type='submit',class='btn btn-default btn-xs') + button(id='fbdeletebutton',type='submit',class='btn btn-default btn-xs',hidden='true') | delete credentials + button(id='fbloginbutton2',name='fbloginbutton2',class='btn btn-default btn-xs',onClick='$("#fbloginbutton").click()') + | add credentials #gp.gp #gp-root.gp-root input(id='gploginbutton',type='image',class='gploginbutton',value='gpLogin',src='images/gp.svg',width='100px',height='100px') @@ -184,8 +212,10 @@ br form(class='',action='/bridge',method='post') input(id='gpdeleted',name='gpdelete',hidden='true',value=user.id) - button(type='submit',class='btn btn-default btn-xs') + button(name='gpdeletebutton',id='gpdeletebutton',type='submit',class='btn btn-default btn-xs') | delete credentials + button(id='gploginbutton2',name='gploginbutton2',class='btn btn-default btn-xs',onClick='$("#gploginbutton").click()') + | add credentials #tw.tw #tw-root.tw-root a(href='/add-account'): input(type='image',value='twitterlogin',src='images/twitter.svg',width='100px',height='100px') @@ -194,8 +224,10 @@ br form(class='',action='/bridge',method='post') input(id='twdeleted',name='twdelete',hidden='true',value=user.id) - button(type='submit',class='btn btn-default btn-xs') + button(id='twdeletebutton',type='submit',class='btn btn-default btn-xs') | delete credentials + button(id='twloginbutton2',name='twloginbutton2',type='submit',class='btn btn-default btn-xs',onClick='location.href="/add-account"') + | add credentials form(class='',action='/bridge',method='post') input(id='pumpid',name='pumpid',hidden='true',value=user.id) input(id='pumptoken',name='pumptoken',hidden='true', value=user.token) @@ -206,6 +238,10 @@ input(id='gpid',name='gpid',hidden='true') input(id='gptoken',name='gptoken',hidden='true',size=100) br + | you need to extra save the credentials + br + | for facebook and googleplus + br input(type='submit',class='btn btn-default',value='save credentials') .footer #logout.logout @@ -214,6 +250,8 @@ input(type='submit',class='btn btn-default',value='logout') br p. - here our bridge will be. -
visit https://wald.intevation.org/projects/pumpbridge/ - + pumpbridge is Free Software and available under the Apache License 2.0. +
+ visit https://wald.intevation.org/projects/pumpbridge for more informations! +
+ pumpbridge is hosted and operated by Mathias Gebbe (Contact)
diff -r c1b736a859c9 -r c5bf4e02958e views/login.jade --- a/views/login.jade Thu Jun 12 10:36:52 2014 +0200 +++ b/views/login.jade Thu Jun 12 20:51:10 2014 +0200 @@ -9,9 +9,24 @@ body block content .main - h1(class='headline') pumpbridge.
connecting social networks - form(action='/login', method='post') - input(class='login',id='webfinger',name='webfinger',size=30,type='text',placeholder='user@pumpnetwork.com') - br - br - input(type='submit',class='btn btn-primary',value='Login') + .headlinebox + img(class="ribbon", src="/images/ribbonl.png") + h1(class='headline') pumpbridge.
connecting social networks + form(action='/login', method='post') + |Login with your pump.io account (WebFinger ID) to get started. + br + |(No pump.io account yet? Try it!) + br + input(class='login',id='webfinger',name='webfinger',size=30,type='text',placeholder='user@server.example') + br + br + input(type='submit',class='btn btn-primary',value='Login') + br + br + .footer + p. + pumpbridge is Free Software and available under the Apache License 2.0. +
+ visit https://wald.intevation.org/projects/pumpbridge for more informations! +
+ pumpbridge is hosted and operated by Mathias Gebbe (Contact)