diff --git a/css/styles.css b/css/styles.css index 10fe174..a548e1d 100644 --- a/css/styles.css +++ b/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; +} diff --git a/js/app.js b/js/app.js index 666dc8e..a81e87e 100644 --- a/js/app.js +++ b/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 }); diff --git a/js/controllers/login-controller.js b/js/controllers/login-controller.js index 8a6a4a8..55e58f7 100644 --- a/js/controllers/login-controller.js +++ b/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; diff --git a/js/controllers/website-controller.js b/js/controllers/website-controller.js index 5b207b6..41a4ec2 100644 --- a/js/controllers/website-controller.js +++ b/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? diff --git a/js/www@daplie.com.js b/js/www@daplie.com.js index c3d9537..d906d16 100644 --- a/js/www@daplie.com.js +++ b/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; diff --git a/templates/home.html b/templates/home.html index fdd98aa..68c8344 100644 --- a/templates/home.html +++ b/templates/home.html @@ -1,35 +1,32 @@ -
-
-
-
System Message >
-
-
-
-
-
-

What to do?

-

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".

- -

For this demo you are "Jane Smith". - As part of the setup for this device you chose - https://jane.smith.net as your personal page - and jane@smith.net as your messaging address.

- -

Choose a few of these goals to "test out" in a few different ways:

-
    -
  • Share a photo with a family member
  • -
  • Send an email
  • -
  • Share a family vacation album with someone
  • -
  • Whatever reason you might have bought the Daplie personal server
  • -
-

Your public feed is available at

+
+ +
+
+
+
System Message >
+
+
+
+
+
+

What to do?

+

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".

+

For this demo you are "Jane Smith".As part of the setup for this device you chose https://jane.smith.net as your personal page and jane@smith.net as your messaging address.

+

Choose a few of these goals to "test out" in a few different ways:

+
    +
  • Share a photo with a family member
  • +
  • Send an email
  • +
  • Share a family vacation album with someone
  • +
  • Whatever reason you might have bought the Daplie personal server
  • +
+

Your public feed is available at

+
-
- diff --git a/templates/widgets/referrer.html b/templates/widgets/referrer.html new file mode 100644 index 0000000..cd7d42d --- /dev/null +++ b/templates/widgets/referrer.html @@ -0,0 +1,9 @@ +
+
+

{{ vm.referrerAlert.msg }}

+

asdf

+ Close + Maybe later + Do it now +
+