Browse Source

updating

master
Jon Lambson 7 years ago
parent
commit
4e0545036d
  1. 34
      css/styles.css
  2. 1
      js/app.js
  3. 26
      js/controllers/login-controller.js
  4. 6
      js/controllers/website-controller.js
  5. 2
      js/www@daplie.com.js
  6. 57
      templates/home.html
  7. 9
      templates/widgets/referrer.html

34
css/styles.css

@ -759,3 +759,37 @@ multiselect .dropdown-menu > li > a {
width: 350px;
height: 350px;
}
.referrer-modal div {
position: relative;
background-color: #3D3D3D;
max-width: 600px;
min-width: 150px;
padding: 15px;
text-align: center;
margin: 50px auto 0 auto;
border-radius: 5px;
z-index: 9999;
cursor: pointer;
box-shadow: 0 0 5px 1px grey;
}
.referrer-modal div::before {
content: '';
background-color: rgba(0,0,0,0.5);
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: -1;
}
.referrer-modal h2 {
font-family: 'Montserrat', Verdana, Sans-Serif;
color: coral;
}
.referrer-modal p {
font-family: 'Source Sans Pro', Verdana, Sans-Serif;
color: white;
}

1
js/app.js

@ -168,6 +168,7 @@ app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $stat
fromPath: fromState.url
};
$rootScope.urlCrumbs.push(Crumbs);
console.log($rootScope.urlCrumbs);
if (requiresLogin && !Auth.isLoggedIn()) {
event.preventDefault();
$state.go('splash-page', { 'toState': toState.name });

26
js/controllers/login-controller.js

@ -1,3 +1,10 @@
app.directive('referrerNotification', [function () {
return {
restrict: 'EA',
templateUrl: '/templates/widgets/referrer.html',
};
}]);
app.controller('loginCtrl', [
'$scope', '$timeout', 'Auth', '$location', 'localStorageService', '$rootScope', 'azp@oauth3.org', '$stateParams'
, function ($scope, $timeout, Auth, $location, localStorageService, $rootScope, Oauth3, $stateParams) {
@ -16,6 +23,25 @@ app.controller('loginCtrl', [
vm.showAdvanced = true;
vm.hideReferrerNotification = 'hidden';
vm.referrerInit = function () {
vm.referrerAlert = {};
if ($location.hash() !== '') {
var str = $location.hash();
var domain = str.split('=')[1];
vm.referrerAlert.msg = domain + " has been created. What next?"
debugger
if (str.indexOf('referrer') === 0) {
vm.hideReferrerNotification = '';
vm.closeReferrerModal = function () {
var popup = document.querySelector('.referrer-pop-up');
popup.style.display = 'none';
};
}
}
};
vm.toggleAdvanced = function () {
vm.showAdvanced = !vm.showAdvanced;
vm.independentIssuer = !vm.independentIssuer;

6
js/controllers/website-controller.js

@ -559,13 +559,15 @@ app.controller('websiteCtrl', [
cleanPathQuery(vm.breadcrumbsPath.join('/'));
path = vm.cleanedPath;
}
debugger;
// FIXME: Figure out how to download specific folders
return pkg.archive({
hostname: r.domain
, domain: r.domain
, tld: r.tld
, sld: r.sld
// , sub: vm.record.sub
, path: r.domain + path
, sub: r.sub
, path: path
}).then(function (result) {
window.alert(JSON.stringify(result));
// TODO use iframe to initiate download?

2
js/www@daplie.com.js

@ -120,7 +120,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
method: 'POST'
, url: OAUTH3.url.normalize(providerUri)
+ '/api/www@daplie.com/acl/archives/' + opts.hostname
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, strip: opts.strip, path: opts.path })
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld, sub: opts.sub, strip: opts.strip, path: opts.path })
, session: session
}).then(function (result) {
return result;

57
templates/home.html

@ -1,35 +1,32 @@
<div class="panel panel-default">
<div class="panel-body">
<div class="media">
<h5 class="media-heading">System Message > <span ng-bind="vm.session.subject"></span></h5>
<hr>
<div class="media-left">
<div class="image-thing"><i class="fa fa-bullhorn fa-3x" aria-hidden="true"></i></div>
</div>
<div class="media-body">
<h3 class="media-heading">What to do?</h3>
<p>This is a prototype. It's essentially like a bunch of pictures that you can click through. You can type
in certain areas, but not all of the buttons "work". It's mostly just clickable "screenshots".</p>
<p>For this demo you are "Jane Smith".
As part of the setup for this device you chose
<a href="feed.html">https://jane.smith.net</a> as your personal page
and jane@smith.net as your messaging address.</p>
<p>Choose a few of these goals to "test out" in a few different ways:</p>
<ul>
<li>Share a photo with a family member</li>
<li>Send an email</li>
<li>Share a family vacation album with someone</li>
<li>Whatever reason you might have bought the Daplie personal server</li>
</ul>
<p>Your public feed is available at </p>
<div ng-controller="loginCtrl as vm" ng-init="vm.referrerInit()">
<referrer-notification></referrer-notification>
<div class="panel panel-default">
<div class="panel-body">
<div class="media">
<h5 class="media-heading">System Message > <span ng-bind="vm.session.subject"></span></h5>
<hr>
<div class="media-left">
<div class="image-thing"><i class="fa fa-bullhorn fa-3x" aria-hidden="true"></i></div>
</div>
<div class="media-body">
<h3 class="media-heading">What to do?</h3>
<p>This is a prototype. It's essentially like a bunch of pictures that you can click through. You can type in certain areas, but not all of the buttons "work". It's mostly just clickable "screenshots".</p>
<p>For this demo you are "Jane Smith".As part of the setup for this device you chose <a href="feed.html">https://jane.smith.net</a> as your personal page and jane@smith.net as your messaging address.</p>
<p>Choose a few of these goals to "test out" in a few different ways:</p>
<ul>
<li>Share a photo with a family member</li>
<li>Send an email</li>
<li>Share a family vacation album with someone</li>
<li>Whatever reason you might have bought the Daplie personal server</li>
</ul>
<p>Your public feed is available at </p>
</div>
</div>
</div>
</div>
<div class="panel-footer">
<div class="button-group flex-row space-around">
<button ng-click="vm.hide_welcome_msg = true" type="button" name="button" class="btn btn-default"><i class="fa fa-thumbs-up" aria-hidden="true"></i> Okay</button>
<div class="panel-footer">
<div class="button-group flex-row space-around">
<button ng-click="vm.hide_welcome_msg = true" type="button" name="button" class="btn btn-default"><i class="fa fa-thumbs-up" aria-hidden="true"></i> Okay</button>
</div>
</div>
</div>
</div>

9
templates/widgets/referrer.html

@ -0,0 +1,9 @@
<div class="referrer-modal">
<div class="referrer-pop-up">
<h2>{{ vm.referrerAlert.msg }}</h2>
<p>asdf</p>
<a class="btn btn-danger close-referrer-pop-up" ng-click="vm.closeReferrerModal()">Close</a>
<a class="btn btn-default">Maybe later</a>
<a class="btn btn-success">Do it now</a>
</div>
</div>
Loading…
Cancel
Save