Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d57c66492 | ||
|
|
1503056c65 | ||
|
|
df5819ee32 | ||
|
|
76d9d51e5a | ||
|
|
e06188d9c2 | ||
|
|
39b9dae216 | ||
|
|
655b3117b7 | ||
|
|
67c4e8663f | ||
|
|
057de03068 | ||
|
|
3bcc504ab2 | ||
|
|
d0ea91c0bb | ||
|
|
ab43fefc49 | ||
|
|
8d4337d091 | ||
|
|
a47b7ac969 | ||
|
|
574857233d | ||
|
|
4e0545036d | ||
|
|
efa628b099 | ||
|
|
132c4e9f35 | ||
|
|
4e5028dc0f | ||
|
|
d97c6ab369 | ||
|
|
b897d8275a | ||
|
|
e9d0ce0846 | ||
|
|
8f987882d2 | ||
|
|
9368a25fd2 | ||
|
|
b97bf25788 |
0
.gitmodules
vendored
Normal file
0
.gitmodules
vendored
Normal file
@ -1,7 +1,7 @@
|
|||||||
Daplie Web App
|
OAuth3 Web App
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
Prototype Daplie Web App.
|
Prototype OAuth3 Web App.
|
||||||
|
|
||||||
No build tools or fancy web server required.
|
No build tools or fancy web server required.
|
||||||
|
|
||||||
@ -9,7 +9,7 @@ Clone and load the HTML. That's all.
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
npm install -g serve-https
|
npm install -g serve-https
|
||||||
git clone git@git.daplie.com:Daplie/walnut_launchpad.git
|
git clone git@git.coolaj86.com:coolaj86/walnut_launchpad.html.git
|
||||||
|
|
||||||
# install oauth3 to /assets/oauth3.org
|
# install oauth3 to /assets/oauth3.org
|
||||||
pushd walnut_launchpad
|
pushd walnut_launchpad
|
||||||
@ -18,4 +18,4 @@ bash ./install.sh
|
|||||||
serve-https
|
serve-https
|
||||||
```
|
```
|
||||||
|
|
||||||
<https://localhost.daplie.me:8443>
|
<https://localhost.example.com:8443>
|
||||||
|
|||||||
@ -1 +0,0 @@
|
|||||||
Subproject commit db284fbf911dc4f9d0cb99bb512d9663dcfd0ece
|
|
||||||
@ -759,3 +759,37 @@ multiselect .dropdown-menu > li > a {
|
|||||||
width: 350px;
|
width: 350px;
|
||||||
height: 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 h4 {
|
||||||
|
font-family: 'Montserrat', Verdana, Sans-Serif;
|
||||||
|
color: coral;
|
||||||
|
}
|
||||||
|
|
||||||
|
.referrer-modal p {
|
||||||
|
font-family: 'Source Sans Pro', Verdana, Sans-Serif;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|||||||
32
js/app.js
32
js/app.js
@ -155,31 +155,23 @@ app.config([
|
|||||||
}]);
|
}]);
|
||||||
|
|
||||||
app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $state, Auth, $location) {
|
app.run(['$rootScope', '$state', 'Auth', '$location', function($rootScope, $state, Auth, $location) {
|
||||||
$rootScope.urlArray = [];
|
$rootScope.urlCrumbs = [];
|
||||||
$rootScope.urlInfo = {
|
|
||||||
url: $location.$$url,
|
|
||||||
path: $location.$$path,
|
|
||||||
params: $location.$$search
|
|
||||||
};
|
|
||||||
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
|
$rootScope.$on('$stateChangeStart', function(event, toState, toParams, fromState, fromParams) {
|
||||||
var requiresLogin = toState.data.requiresLogin;
|
var requiresLogin = toState.data.requiresLogin;
|
||||||
toState.data.session = $location.search();
|
var Crumbs = new Object();
|
||||||
$rootScope.redirectedURL = toState.url;
|
Crumbs = {
|
||||||
var query = $location.search();
|
absUrl: $location.$$absUrl,
|
||||||
$rootScope.urlArray.push($rootScope.redirectedURL);
|
url: $location.$$url,
|
||||||
|
path: $location.$$path,
|
||||||
|
params: $location.$$search,
|
||||||
|
toPath: toState.url,
|
||||||
|
fromPath: fromState.url
|
||||||
|
};
|
||||||
|
$rootScope.urlCrumbs.push(Crumbs);
|
||||||
if (requiresLogin && !Auth.isLoggedIn()) {
|
if (requiresLogin && !Auth.isLoggedIn()) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (!angular.equals(toState.data.session, {})) {
|
$state.go('splash-page', { 'toState': toState.name });
|
||||||
toState.data.session.token = OAUTH3.jwt.decode(query.access_token);
|
|
||||||
toState.data.session.refresh = OAUTH3.jwt.decode(query.refresh_token);
|
|
||||||
Auth.add(query);
|
|
||||||
$state.go('app.' + $rootScope.redirectedURL);
|
|
||||||
} else {
|
|
||||||
$state.go('splash-page', { 'toState': toState.name });
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
}]);
|
}]);
|
||||||
}());
|
}());
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
|
app.directive('referrerNotification', [function () {
|
||||||
|
return {
|
||||||
|
restrict: 'EA',
|
||||||
|
templateUrl: '/templates/widgets/referrer.html',
|
||||||
|
};
|
||||||
|
}]);
|
||||||
|
|
||||||
app.controller('loginCtrl', [
|
app.controller('loginCtrl', [
|
||||||
'$scope', '$timeout', 'Auth', '$location', 'localStorageService', '$rootScope', 'azp@oauth3.org', '$stateParams'
|
'$scope', '$timeout', 'Auth', '$location', 'localStorageService', '$rootScope', 'azp@oauth3.org', '$stateParams'
|
||||||
, function ($scope, $timeout, Auth, $location, localStorageService, $rootScope, Oauth3, $stateParams) {
|
, function ($scope, $timeout, Auth, $location, localStorageService, $rootScope, Oauth3, $stateParams) {
|
||||||
@ -16,6 +23,29 @@ app.controller('loginCtrl', [
|
|||||||
|
|
||||||
vm.showAdvanced = true;
|
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.title = domain + " has been created. What's next?";
|
||||||
|
vm.referrerAlert.msg = "Do this next... Or do this... Or this...";
|
||||||
|
if (str.indexOf('referrer') === 0) {
|
||||||
|
vm.hideReferrerNotification = '';
|
||||||
|
vm.closeReferrerModal = function () {
|
||||||
|
var popup = document.querySelector('.referrer-pop-up');
|
||||||
|
popup.style.display = 'none';
|
||||||
|
$location.url($location.path());
|
||||||
|
};
|
||||||
|
vm.sendToShares = function (){
|
||||||
|
$location.path('/website');
|
||||||
|
vm.hideReferrerNotification = 'hidden';
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
vm.toggleAdvanced = function () {
|
vm.toggleAdvanced = function () {
|
||||||
vm.showAdvanced = !vm.showAdvanced;
|
vm.showAdvanced = !vm.showAdvanced;
|
||||||
vm.independentIssuer = !vm.independentIssuer;
|
vm.independentIssuer = !vm.independentIssuer;
|
||||||
@ -105,12 +135,15 @@ app.controller('loginCtrl', [
|
|||||||
session.subject = subject;
|
session.subject = subject;
|
||||||
session.issuer = issuer;
|
session.issuer = issuer;
|
||||||
Auth.add(session);
|
Auth.add(session);
|
||||||
if ($rootScope.redirectedURL === '/splash-page') {
|
if (Auth.sessions.length === 1) {
|
||||||
debugger;
|
if ($rootScope.urlCrumbs[0].path === '/splash-page') {
|
||||||
$location.path('/home');
|
$location.path('/home');
|
||||||
|
} else {
|
||||||
|
window.location.replace($rootScope.urlCrumbs[0].absUrl);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
debugger;
|
location.reload();
|
||||||
$location.path('/' + $rootScope.redirectedURL);
|
// window.location.replace($rootScope.urlCrumbs[$rootScope.urlCrumbs.length -1].absUrl);
|
||||||
}
|
}
|
||||||
}, function (err) {
|
}, function (err) {
|
||||||
console.error('auth error');
|
console.error('auth error');
|
||||||
|
|||||||
@ -66,8 +66,8 @@ app.directive('notificationBar', [function () {
|
|||||||
}]);
|
}]);
|
||||||
|
|
||||||
app.controller('websiteCtrl', [
|
app.controller('websiteCtrl', [
|
||||||
'$scope', '$q', 'Auth', 'azp@oauth3.org', '$timeout', '$sce', '$rootScope',
|
'$scope', '$q', 'Auth', 'azp@oauth3.org', '$timeout', '$sce', '$rootScope', '$location',
|
||||||
function ($scope, $q, Auth, Oauth3, $timeout, $sce, $rootScope) {
|
function ($scope, $q, Auth, Oauth3, $timeout, $sce, $rootScope, $location) {
|
||||||
|
|
||||||
var vm = this;
|
var vm = this;
|
||||||
var angular = window.angular;
|
var angular = window.angular;
|
||||||
@ -75,6 +75,7 @@ app.controller('websiteCtrl', [
|
|||||||
vm.copyUploadPath = '';
|
vm.copyUploadPath = '';
|
||||||
vm.displaySpinner = '';
|
vm.displaySpinner = '';
|
||||||
vm.deleteAll = '';
|
vm.deleteAll = '';
|
||||||
|
vm.referrerSelectedDomain = false;
|
||||||
vm.alertNotification = {
|
vm.alertNotification = {
|
||||||
hidden: 'hidden'
|
hidden: 'hidden'
|
||||||
};
|
};
|
||||||
@ -175,31 +176,47 @@ app.controller('websiteCtrl', [
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vm.setRecordDomain = function(domain) {
|
||||||
|
vm.domain.sub = vm.newRecord || '';
|
||||||
|
if (vm.record !== undefined) {
|
||||||
|
domain.title = vm.record.host;
|
||||||
|
domain.description.domain = vm.record.host;
|
||||||
|
domain.originalObject.domain = vm.record.host;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
vm.setRecord = function () {
|
vm.setRecord = function () {
|
||||||
// TODO set record based on (record.host === sub + domain.domain)
|
// TODO set record based on (record.host === sub + domain.domain)
|
||||||
var sub = vm.newRecord;
|
var sub = vm.newRecord;
|
||||||
|
|
||||||
if ('@' === sub) {
|
if ('@' === sub || sub === undefined) {
|
||||||
sub = '';
|
sub = '';
|
||||||
}
|
}
|
||||||
vm.record = { sub: sub, host: (sub ? sub + '.' : '') + vm.domain.domain };
|
vm.record = { sub: sub, host: (sub ? sub + '.' : '') + vm.domain.domain };
|
||||||
vm.currentHost = vm.record.host;
|
vm.currentHost = vm.record.host;
|
||||||
|
|
||||||
console.log('[setRecord] vm.record:');
|
console.log('[setRecord] vm.record:');
|
||||||
console.log(vm.record);
|
console.log(vm.record);
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.shareInit = function () {
|
vm.paramInit = function () {
|
||||||
if ($rootScope.urlInfo.params.token !== undefined) {
|
// Share example -> ?token=fe8386d7ad6273bd9ca29864148c0d2d©
|
||||||
console.log('FISH STICKS', $rootScope.urlInfo);
|
if ($rootScope.urlCrumbs[$rootScope.urlCrumbs.length -1].params.token !== undefined) {
|
||||||
|
vm.Shares.inviteToken = $rootScope.urlCrumbs[$rootScope.urlCrumbs.length -1].params.token;
|
||||||
var result = { data: { info: true } };
|
var result = { data: { info: true } };
|
||||||
var msg = "You can only view inside the ";
|
var msg = "You have a new share.";
|
||||||
vm.buildNotification(result, msg);
|
vm.buildNotification(result, msg);
|
||||||
// debugger;
|
}
|
||||||
|
// Referrer example -> #referrer=daplieeleven.daplie.me
|
||||||
|
vm.referrerSelectedDomainName = $location.url().split('=')[1];
|
||||||
|
if ($location.url().includes('referrer')) {
|
||||||
|
$timeout(function() {
|
||||||
|
var el = document.querySelector('.create-share-btn');
|
||||||
|
el.click();
|
||||||
|
vm.referrerSelectedDomain = true;
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
vm.selectRecord = function (record) {
|
vm.selectRecord = function (record) {
|
||||||
vm.record = record;
|
vm.record = record;
|
||||||
vm.newRecord = record.sub;
|
vm.newRecord = record.sub;
|
||||||
@ -225,7 +242,7 @@ app.controller('websiteCtrl', [
|
|||||||
, domain: opts.domain
|
, domain: opts.domain
|
||||||
, tld: opts.tld
|
, tld: opts.tld
|
||||||
, sld: opts.sld
|
, sld: opts.sld
|
||||||
//, sub: opts.record.sub
|
, sub: opts.sub
|
||||||
, multipart: { site: opts.newFile }
|
, multipart: { site: opts.newFile }
|
||||||
, progress: function (ev) {
|
, progress: function (ev) {
|
||||||
// TODO must digest
|
// TODO must digest
|
||||||
@ -246,12 +263,15 @@ app.controller('websiteCtrl', [
|
|||||||
vm.uploadFileContainer = false;
|
vm.uploadFileContainer = false;
|
||||||
}
|
}
|
||||||
vm.buildNotification(result, msg);
|
vm.buildNotification(result, msg);
|
||||||
vm.cleanArrays();
|
if (vm.copyR !== undefined) {
|
||||||
var path = vm.breadcrumbsPath.join('/');
|
vm.cleanArrays();
|
||||||
cleanPathQuery(path);
|
var path = vm.breadcrumbsPath.join('/');
|
||||||
vm.Sites.contents(vm.copyR, vm.cleanedPath);
|
cleanPathQuery(path);
|
||||||
}, function (err) {
|
vm.Sites.contents(vm.copyR, vm.cleanedPath);
|
||||||
console.log(err);
|
} else {
|
||||||
|
$location.url($location.path());
|
||||||
|
vm.listSites();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -282,8 +302,7 @@ app.controller('websiteCtrl', [
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!vm.currentHost) {
|
if (!vm.currentHost) {
|
||||||
window.alert('No hostname chosen.');
|
vm.setRecord();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vm.domain) {
|
if (vm.domain) {
|
||||||
@ -294,6 +313,7 @@ app.controller('websiteCtrl', [
|
|||||||
} else {
|
} else {
|
||||||
sld = vm.domain.sld;
|
sld = vm.domain.sld;
|
||||||
tld = vm.domain.tld;
|
tld = vm.domain.tld;
|
||||||
|
sub = vm.domain.sub;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
parts = vm.currentHost.split('.');
|
parts = vm.currentHost.split('.');
|
||||||
@ -314,11 +334,12 @@ app.controller('websiteCtrl', [
|
|||||||
// (because two users could both claim a single domain)
|
// (because two users could both claim a single domain)
|
||||||
// We're claiming it at the top level (i.e. example.com)
|
// We're claiming it at the top level (i.e. example.com)
|
||||||
// but we could also claim it at the subdomain level (needs UI update)
|
// but we could also claim it at the subdomain level (needs UI update)
|
||||||
var domainReq = { sld: sld, tld: tld, sub: undefined };
|
var domainReq = { sld: sld, tld: tld, sub: sub };
|
||||||
return pkg.request(domainReq).then(function (result) {
|
return pkg.request(domainReq).then(function (result) {
|
||||||
var sess;
|
var sess;
|
||||||
var prom;
|
var prom;
|
||||||
var def;
|
var def;
|
||||||
|
var sub;
|
||||||
|
|
||||||
// can validate automatically
|
// can validate automatically
|
||||||
if (vm.domain.session && vm._isSubDomain(vm.currentHost, vm.domain.domain)) {
|
if (vm.domain.session && vm._isSubDomain(vm.currentHost, vm.domain.domain)) {
|
||||||
@ -332,7 +353,11 @@ app.controller('websiteCtrl', [
|
|||||||
|
|
||||||
if (sess) {
|
if (sess) {
|
||||||
prom = Auth.get(sess).then(function (oauth3) {
|
prom = Auth.get(sess).then(function (oauth3) {
|
||||||
return oauth3.api('dns.set', { sld: sld, tld: tld, sub: ('' + result.data.prefix), type: 'TXT', ttl: 300, value: result.data.challenge });
|
sub = result.data.prefix;
|
||||||
|
if (result.data.sub) {
|
||||||
|
sub += '.' + result.data.sub;
|
||||||
|
}
|
||||||
|
return oauth3.api('dns.set', { sld: sld, tld: tld, sub: sub, type: 'TXT', ttl: 5, value: result.data.challenge });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -379,19 +404,23 @@ app.controller('websiteCtrl', [
|
|||||||
, domain: r.domain
|
, domain: r.domain
|
||||||
, tld: r.tld
|
, tld: r.tld
|
||||||
, sld: r.sld
|
, sld: r.sld
|
||||||
//, sub: r.sub
|
, sub: r.sub
|
||||||
, path: r.shareAccess.path
|
, path: r.shareAccess.path
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
vm.cleanArrays();
|
if (result.data.error) {
|
||||||
vm.folderStructure = result;
|
vm.folderStructure = result;
|
||||||
result.data.forEach(function(data){
|
} else {
|
||||||
if (data.file) {
|
vm.cleanArrays();
|
||||||
vm.siteFiles.push(data.name);
|
vm.folderStructure = result;
|
||||||
}
|
result.data.forEach(function(data){
|
||||||
if (data.directory) {
|
if (data.file) {
|
||||||
vm.siteDirectories.push(data.name);
|
vm.siteFiles.push(data.name);
|
||||||
}
|
}
|
||||||
});
|
if (data.directory) {
|
||||||
|
vm.siteDirectories.push(data.name);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
vm.displaySpinner = 'hidden';
|
vm.displaySpinner = 'hidden';
|
||||||
vm.currentFolder = vm.breadcrumbs[vm.breadcrumbs.length - 1];
|
vm.currentFolder = vm.breadcrumbs[vm.breadcrumbs.length - 1];
|
||||||
});
|
});
|
||||||
@ -407,6 +436,24 @@ app.controller('websiteCtrl', [
|
|||||||
vm.uploadFileContainer = false;
|
vm.uploadFileContainer = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
vm.Sites.fileContents = function (file, r) {
|
||||||
|
var path = vm.breadcrumbsPath;
|
||||||
|
path.push(file);
|
||||||
|
path = path.join('/');
|
||||||
|
cleanPathQuery(path);
|
||||||
|
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||||
|
return pkg.contentRange({
|
||||||
|
hostname: r.domain,
|
||||||
|
domain: r.domain,
|
||||||
|
tld: r.tld,
|
||||||
|
sld: r.sld,
|
||||||
|
sub: r.sub,
|
||||||
|
path: vm.cleanedPath
|
||||||
|
}).then(function (result) {
|
||||||
|
vm.folderStructure = result;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
vm.Sites.contents = function (r, dir) {
|
vm.Sites.contents = function (r, dir) {
|
||||||
vm.siteFiles = [];
|
vm.siteFiles = [];
|
||||||
vm.siteDirectories = [];
|
vm.siteDirectories = [];
|
||||||
@ -421,7 +468,7 @@ app.controller('websiteCtrl', [
|
|||||||
domain: r.domain,
|
domain: r.domain,
|
||||||
tld: r.tld,
|
tld: r.tld,
|
||||||
sld: r.sld,
|
sld: r.sld,
|
||||||
// sub: r.sub,
|
sub: r.sub,
|
||||||
path: dir
|
path: dir
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
vm.cleanArrays();
|
vm.cleanArrays();
|
||||||
@ -529,12 +576,13 @@ app.controller('websiteCtrl', [
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||||
|
var removedPath = opts.path;
|
||||||
return pkg.remove({
|
return pkg.remove({
|
||||||
hostname: r.domain
|
hostname: r.domain
|
||||||
, domain: r.domain
|
, domain: r.domain
|
||||||
, tld: r.tld
|
, tld: r.tld
|
||||||
, sld: r.sld
|
, sld: r.sld
|
||||||
//, sub: vm.record.sub
|
, sub: r.sub
|
||||||
, path: opts.path || r.path
|
, path: opts.path || r.path
|
||||||
, confirm: opts.confirm || r.confirm
|
, confirm: opts.confirm || r.confirm
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
@ -546,18 +594,29 @@ app.controller('websiteCtrl', [
|
|||||||
cleanPathQuery(vm.breadcrumbsPath.join('/'));
|
cleanPathQuery(vm.breadcrumbsPath.join('/'));
|
||||||
vm.Sites.contents(vm.copyR, vm.cleanedPath);
|
vm.Sites.contents(vm.copyR, vm.cleanedPath);
|
||||||
}
|
}
|
||||||
|
var msg = 'Successfully deleted ' + "'" + removedPath + "'.";
|
||||||
|
vm.buildNotification(result, msg);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.Sites.archive = function (r) {
|
vm.Sites.archive = function (r) {
|
||||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||||
|
var path;
|
||||||
|
if (vm.breadcrumbsPath === undefined && vm.breadcrumbs === undefined) {
|
||||||
|
path = r.shareAccess.path;
|
||||||
|
} else {
|
||||||
|
cleanPathQuery(vm.breadcrumbsPath.join('/'));
|
||||||
|
path = vm.cleanedPath;
|
||||||
|
}
|
||||||
|
debugger;
|
||||||
|
// FIXME: Figure out how to download specific folders
|
||||||
return pkg.archive({
|
return pkg.archive({
|
||||||
hostname: r.domain
|
hostname: r.domain
|
||||||
, domain: r.domain
|
, domain: r.domain
|
||||||
, tld: r.tld
|
, tld: r.tld
|
||||||
, sld: r.sld
|
, sld: r.sld
|
||||||
//, sub: vm.record.sub
|
, sub: r.sub
|
||||||
//, path: vm.uploadPath
|
, path: path
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
window.alert(JSON.stringify(result));
|
window.alert(JSON.stringify(result));
|
||||||
// TODO use iframe to initiate download?
|
// TODO use iframe to initiate download?
|
||||||
@ -567,7 +626,9 @@ app.controller('websiteCtrl', [
|
|||||||
|
|
||||||
vm.shareFolderFrom = function (r, opts) {
|
vm.shareFolderFrom = function (r, opts) {
|
||||||
var sharePath;
|
var sharePath;
|
||||||
if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
|
if (vm.breadcrumbsPath === undefined && vm.breadcrumbs === undefined) {
|
||||||
|
sharePath = '/';
|
||||||
|
} else if (vm.breadcrumbsPath.join('/') === '' && vm.breadcrumbs.join('/') === '') {
|
||||||
sharePath = '/';
|
sharePath = '/';
|
||||||
} else {
|
} else {
|
||||||
sharePath = cleanPathQuery(vm.breadcrumbsPath.join('/'));
|
sharePath = cleanPathQuery(vm.breadcrumbsPath.join('/'));
|
||||||
@ -602,14 +663,17 @@ app.controller('websiteCtrl', [
|
|||||||
, domain: r.domain
|
, domain: r.domain
|
||||||
, tld: r.tld
|
, tld: r.tld
|
||||||
, sld: r.sld
|
, sld: r.sld
|
||||||
//, sub: r.sub
|
, sub: r.sub
|
||||||
, path: opts.sharePath || r.sharePath
|
, path: opts.sharePath || r.sharePath
|
||||||
, mode: opts.shareMode || r.shareMode
|
, mode: opts.shareMode || r.shareMode
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
var arr = r.sharedWith || [];
|
var arr = r.sharedWith || [];
|
||||||
arr.push(result.data);
|
arr.push(result.data);
|
||||||
r.sharedWith = arr;
|
r.sharedWith = arr;
|
||||||
window.alert(JSON.stringify(result.data));
|
var path = result.data.path;
|
||||||
|
var person = result.data.comment;
|
||||||
|
var msg = "You have shared " + "'" + path + "'" + ' with ' + person + ".";
|
||||||
|
vm.buildNotification(result, msg);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -618,8 +682,23 @@ app.controller('websiteCtrl', [
|
|||||||
return pkg.acceptInvite({
|
return pkg.acceptInvite({
|
||||||
token: vm.Shares.inviteToken
|
token: vm.Shares.inviteToken
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
window.alert(JSON.stringify(result));
|
if (result.data.error) {
|
||||||
vm.listSites();
|
var msg = result.data.error.message + '.';
|
||||||
|
vm.buildNotification(result, msg);
|
||||||
|
} else {
|
||||||
|
var person = result.data.comment;
|
||||||
|
var path = result.data.path;
|
||||||
|
var shareMode = result.data.mode;
|
||||||
|
var domain = result.data.domain;
|
||||||
|
var msg = 'You accepted a share ' + "'" + domain + "'" + ' from ' + person + '. Take a look at your verified websites below.';
|
||||||
|
vm.buildNotification(result, msg);
|
||||||
|
vm.listSites();
|
||||||
|
}
|
||||||
|
if ($location.$$search.token) {
|
||||||
|
delete $location.$$search.token;
|
||||||
|
vm.Shares.inviteToken = '';
|
||||||
|
$location.$$compose();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -630,7 +709,7 @@ app.controller('websiteCtrl', [
|
|||||||
, hostname: r.domain
|
, hostname: r.domain
|
||||||
, tld: r.tld
|
, tld: r.tld
|
||||||
, sld: r.sld
|
, sld: r.sld
|
||||||
//, sub: r.sub
|
, sub: r.sub
|
||||||
, path: r.sharePath
|
, path: r.sharePath
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
vm.displaySpinner = 'hidden';
|
vm.displaySpinner = 'hidden';
|
||||||
@ -645,18 +724,18 @@ app.controller('websiteCtrl', [
|
|||||||
if (!window.confirm("Delete this site?")) {
|
if (!window.confirm("Delete this site?")) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
s.sharePath = '/';
|
||||||
vm.Shares.remove(r, s);
|
vm.Shares.remove(r, s);
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.Shares.remove = function (r, s) {
|
vm.Shares.remove = function (r, s) {
|
||||||
console.log('Shares.remove');
|
|
||||||
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
var pkg = Auth.oauth3.pkg('www@daplie.com');
|
||||||
return pkg.removeShare({
|
return pkg.removeShare({
|
||||||
domain: s.domain
|
domain: s.domain
|
||||||
, hostname: s.domain
|
, hostname: s.domain
|
||||||
, tld: s.tld
|
, tld: s.tld
|
||||||
, sld: s.sld
|
, sld: s.sld
|
||||||
//, sub: r.sub
|
, sub: r.sub
|
||||||
, path: s.sharePath
|
, path: s.sharePath
|
||||||
, challenge: s.challenge
|
, challenge: s.challenge
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
@ -667,14 +746,16 @@ app.controller('websiteCtrl', [
|
|||||||
console.log(result);
|
console.log(result);
|
||||||
var index;
|
var index;
|
||||||
|
|
||||||
r.sharedWith.forEach(function (_s, i) {
|
if (r.sharedWith !== undefined) {
|
||||||
if (s.challenge === _s.challenge) {
|
r.sharedWith.forEach(function (_s, i) {
|
||||||
index = i;
|
if (s.challenge === _s.challenge) {
|
||||||
}
|
index = i;
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
r.sharedWith.splice(index, 1);
|
r.sharedWith.splice(index, 1);
|
||||||
//r.usersnames = r.sharedWith.map().join(',');
|
//r.usersnames = r.sharedWith.map().join(',');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -714,8 +795,17 @@ app.controller('websiteCtrl', [
|
|||||||
Auth.api('domains.list', {}).then(function (els) {
|
Auth.api('domains.list', {}).then(function (els) {
|
||||||
// console.log('[init] domains.list els:');
|
// console.log('[init] domains.list els:');
|
||||||
// console.log(els);
|
// console.log(els);
|
||||||
vm.domains = els;
|
if (vm.referrerSelectedDomain) {
|
||||||
$scope.domain = vm.domains;
|
Object.keys(els).forEach(function (key) {
|
||||||
|
if (els[key]['domain'] === vm.referrerSelectedDomainName) {
|
||||||
|
$scope.domain = [];
|
||||||
|
$scope.domain.push(els[key]);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
vm.domains = els;
|
||||||
|
$scope.domain = vm.domains;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
vm.listSites();
|
vm.listSites();
|
||||||
@ -743,9 +833,11 @@ app.controller('websiteCtrl', [
|
|||||||
vm.breadcrumbs.push(crumb);
|
vm.breadcrumbs.push(crumb);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (vm.copyR.shareAccess.path !== '/') {
|
if (vm.copyR !== undefined) {
|
||||||
} else {
|
if (vm.copyR.shareAccess.path !== '/') {
|
||||||
vm.breadcrumbs.unshift('root');
|
} else {
|
||||||
|
vm.breadcrumbs.unshift('root');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -773,7 +865,11 @@ app.controller('websiteCtrl', [
|
|||||||
$scope.$watch('vm.selectedDomain', function (domainSelected) {
|
$scope.$watch('vm.selectedDomain', function (domainSelected) {
|
||||||
if (domainSelected !== undefined) {
|
if (domainSelected !== undefined) {
|
||||||
vm.dom = domainSelected;
|
vm.dom = domainSelected;
|
||||||
vm.selectDomain(vm.selectedDomain.description);
|
if (domainSelected.description === undefined) {
|
||||||
|
vm.selectDomain(domainSelected);
|
||||||
|
} else {
|
||||||
|
vm.selectDomain(vm.selectedDomain.description);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -856,6 +952,7 @@ app.controller('websiteCtrl', [
|
|||||||
message: msg
|
message: msg
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
window.scrollTo(0, 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
vm.closeAllOpenActions = function () {
|
vm.closeAllOpenActions = function () {
|
||||||
@ -867,6 +964,8 @@ app.controller('websiteCtrl', [
|
|||||||
vm.websiteTiles = false;
|
vm.websiteTiles = false;
|
||||||
vm.showBackBtn = false;
|
vm.showBackBtn = false;
|
||||||
vm.autoPopulateWebPath = '';
|
vm.autoPopulateWebPath = '';
|
||||||
|
vm.displaySpinner = '';
|
||||||
|
vm.folderStructure = undefined;
|
||||||
}, 150);
|
}, 150);
|
||||||
};
|
};
|
||||||
}]);
|
}]);
|
||||||
|
|||||||
@ -13,7 +13,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/sites/' + opts.hostname
|
+ '/api/www@daplie.com/acl/sites/' + opts.hostname
|
||||||
+ '?' + OAUTH3.utils.query.stringify({
|
+ '?' + OAUTH3.utils.query.stringify({
|
||||||
tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, unzip: opts.unzip
|
tld: opts.tld, sld: opts.sld, sub: opts.sub, unzip: opts.unzip
|
||||||
, strip: opts.strip, path: opts.path
|
, strip: opts.strip, path: opts.path
|
||||||
})
|
})
|
||||||
, session: session
|
, session: session
|
||||||
@ -28,7 +28,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
|
|
||||||
return OAUTH3.url.normalize(providerUri.replace(/api\./, 'assets.'))
|
return OAUTH3.url.normalize(providerUri.replace(/api\./, 'assets.'))
|
||||||
+ '/assets/www@daplie.com/acl/archives/' + opts.hostname
|
+ '/assets/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 })
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
, listShares: function (opts) {
|
, listShares: function (opts) {
|
||||||
@ -40,7 +40,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/shares/' + (opts.domain || opts.hostname)
|
+ '/api/www@daplie.com/acl/shares/' + (opts.domain || opts.hostname)
|
||||||
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, path: opts.path })
|
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld, sub: opts.sub, path: opts.path })
|
||||||
, session: session
|
, session: session
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
@ -55,7 +55,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
method: 'DELETE'
|
method: 'DELETE'
|
||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/shares/' + (opts.domain || opts.hostname) + '/' + (opts.challenge || opts.token)
|
+ '/api/www@daplie.com/acl/shares/' + (opts.domain || opts.hostname) + '/' + (opts.challenge || opts.token)
|
||||||
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, path: opts.path })
|
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld, sub: opts.sub, path: opts.path })
|
||||||
, session: session
|
, session: session
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
@ -93,7 +93,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
method: 'POST'
|
method: 'POST'
|
||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/shares/accept/' + opts.token
|
+ '/api/www@daplie.com/acl/shares/accept/' + opts.token
|
||||||
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/ })
|
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld, sub: opts.sub })
|
||||||
, session: session
|
, session: session
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
@ -115,12 +115,11 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
, archive: function (opts) {
|
, archive: function (opts) {
|
||||||
var providerUri = opts.audience;
|
var providerUri = opts.audience;
|
||||||
var session = opts.session;
|
var session = opts.session;
|
||||||
|
|
||||||
return OAUTH3.request({
|
return OAUTH3.request({
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/archives/' + opts.hostname
|
+ '/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
|
, session: session
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
@ -134,7 +133,22 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/fs/' + opts.hostname
|
+ '/api/www@daplie.com/acl/fs/' + opts.hostname
|
||||||
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/, path: opts.path })
|
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld, sub: opts.sub, path: opts.path })
|
||||||
|
, session: session
|
||||||
|
}).then(function (result) {
|
||||||
|
return result;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
, contentRange: function (opts) {
|
||||||
|
var providerUri = opts.audience;
|
||||||
|
var session = opts.session;
|
||||||
|
|
||||||
|
return OAUTH3.request({
|
||||||
|
method: 'GET'
|
||||||
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
|
+ '/api/www@daplie.com/acl/fs/' + opts.hostname
|
||||||
|
+ '?' + OAUTH3.utils.query.stringify({ tld: opts.tld, sld: opts.sld, sub: opts.sub, path: opts.path
|
||||||
|
, offset: opts.offset, length: opts.length, json: true })
|
||||||
, session: session
|
, session: session
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
return result;
|
return result;
|
||||||
@ -149,7 +163,7 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
, url: OAUTH3.url.normalize(providerUri)
|
, url: OAUTH3.url.normalize(providerUri)
|
||||||
+ '/api/www@daplie.com/acl/sites/' + opts.hostname
|
+ '/api/www@daplie.com/acl/sites/' + opts.hostname
|
||||||
+ '?' + OAUTH3.utils.query.stringify({
|
+ '?' + OAUTH3.utils.query.stringify({
|
||||||
tld: opts.tld, sld: opts.sld/*, sub: opts.sub*/
|
tld: opts.tld, sld: opts.sld, sub: opts.sub
|
||||||
, path: opts.path, confirm: opts.confirm
|
, path: opts.path, confirm: opts.confirm
|
||||||
})
|
})
|
||||||
, session: session
|
, session: session
|
||||||
@ -187,7 +201,6 @@ OAUTH3._pkgs['www@daplie.com'] = {
|
|||||||
, session: session
|
, session: session
|
||||||
}).then(function (result) {
|
}).then(function (result) {
|
||||||
// result.data
|
// result.data
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,35 +1,32 @@
|
|||||||
<div class="panel panel-default">
|
<div ng-controller="loginCtrl as vm" ng-init="vm.referrerInit()">
|
||||||
<div class="panel-body">
|
<referrer-notification></referrer-notification>
|
||||||
<div class="media">
|
<div class="panel panel-default">
|
||||||
<h5 class="media-heading">System Message > <span ng-bind="vm.session.subject"></span></h5>
|
<div class="panel-body">
|
||||||
<hr>
|
<div class="media">
|
||||||
<div class="media-left">
|
<h5 class="media-heading">System Message > <span ng-bind="vm.session.subject"></span></h5>
|
||||||
<div class="image-thing"><i class="fa fa-bullhorn fa-3x" aria-hidden="true"></i></div>
|
<hr>
|
||||||
</div>
|
<div class="media-left">
|
||||||
<div class="media-body">
|
<div class="image-thing"><i class="fa fa-bullhorn fa-3x" aria-hidden="true"></i></div>
|
||||||
<h3 class="media-heading">What to do?</h3>
|
</div>
|
||||||
<p>This is a prototype. It's essentially like a bunch of pictures that you can click through. You can type
|
<div class="media-body">
|
||||||
in certain areas, but not all of the buttons "work". It's mostly just clickable "screenshots".</p>
|
<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".
|
<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>
|
||||||
As part of the setup for this device you chose
|
<p>Choose a few of these goals to "test out" in a few different ways:</p>
|
||||||
<a href="feed.html">https://jane.smith.net</a> as your personal page
|
<ul>
|
||||||
and jane@smith.net as your messaging address.</p>
|
<li>Share a photo with a family member</li>
|
||||||
|
<li>Send an email</li>
|
||||||
<p>Choose a few of these goals to "test out" in a few different ways:</p>
|
<li>Share a family vacation album with someone</li>
|
||||||
<ul>
|
<li>Whatever reason you might have bought the Daplie personal server</li>
|
||||||
<li>Share a photo with a family member</li>
|
</ul>
|
||||||
<li>Send an email</li>
|
<p>Your public feed is available at </p>
|
||||||
<li>Share a family vacation album with someone</li>
|
</div>
|
||||||
<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>
|
<div class="panel-footer">
|
||||||
<div class="panel-footer">
|
<div class="button-group flex-row space-around">
|
||||||
<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>
|
||||||
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<div class="container" ng-init="vm.shareInit()">
|
<div class="container" ng-init="vm.paramInit()">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<notification-bar></notification-bar>
|
<notification-bar></notification-bar>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<h1>Create Share</h1>
|
<h1>Create Share</h1>
|
||||||
<button class="btn btn-primary btn-lg" title="..." data-toggle="modal" data-target=".create-website-modal">
|
<button class="btn btn-primary btn-lg create-share-btn" title="..." data-toggle="modal" data-target=".create-website-modal">
|
||||||
Create Share
|
Create Share
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="form-control" placeholder="www" ng-model="vm.newRecord" ng-change="vm.setRecord()" />
|
<input type="text" class="form-control" placeholder="www" ng-model="vm.newRecord" ng-change="vm.setRecord()" ng-blur="vm.setRecordDomain(vm.selectedDomain)" />
|
||||||
<div class="input-group-btn">
|
<div class="input-group-btn">
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span>
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><span class="caret"></span>
|
||||||
@ -58,7 +58,7 @@
|
|||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div>
|
<div>
|
||||||
<label>Select .zip upload</label>
|
<label>Select .zip upload</label>
|
||||||
<input type="file" ng-model="vm.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(vm.dom)" />
|
<input type="file" ng-model="vm.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(vm.domain)" />
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="vm.isZip" >
|
<div ng-if="vm.isZip" >
|
||||||
<label>
|
<label>
|
||||||
@ -240,7 +240,7 @@
|
|||||||
<p><b>Invite:</b> <em ng-if="share.pending" class="text-muted">pending</em> <span ng-if="!share.pending" class="text-muted">Accepted</span></p>
|
<p><b>Invite:</b> <em ng-if="share.pending" class="text-muted">pending</em> <span ng-if="!share.pending" class="text-muted">Accepted</span></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="media-right align-self-center">
|
<div class="media-right align-self-center">
|
||||||
<button class="btn btn-danger" ng-click="vm.Shares.remove(r, share)">Remove Access</button>
|
<button ng-if="r.shareAccess.invite" class="btn btn-danger" ng-click="vm.Shares.remove(r, share)">Remove Access</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@ -19,17 +19,18 @@
|
|||||||
</ul>
|
</ul>
|
||||||
<ul class="tree files-only ls-none">
|
<ul class="tree files-only ls-none">
|
||||||
<li ng-repeat="file in vm.siteFiles track by $index">
|
<li ng-repeat="file in vm.siteFiles track by $index">
|
||||||
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file); vm.closeFileUploadsContainers();" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
|
<span class="tree_label filez">{{ file }}</span><span class="pull-right"><button ng-if="r.shareAccess.read" type="button" class="btn btn-default btn-xs" ng-click="vm.Sites.fileContents(file, r);" data="{{ file }}" ><i class="fa fa-code"></i></button> <button ng-if="r.shareAccess.write" type="button" class="btn btn-danger btn-xs" ng-click="vm.deleteFilesFrom(r, file); vm.closeFileUploadsContainers();" data="{{ file }}" ><i class="fa fa-trash"></i></button></span><br>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="folder-actions">
|
<div class="folder-actions">
|
||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
<button ng-if="r.shareAccess.invite" type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.showAction('invite');">Share folder</button>
|
<button ng-if="r.shareAccess.invite" type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.showAction('invite');">Share folder</button>
|
||||||
|
<button type="button" name="button" class="btn btn-block btn-primary" ng-click="vm.Sites.archive(r)">Download folder</button>
|
||||||
<ul class="ls-none folder-actions-list">
|
<ul class="ls-none folder-actions-list">
|
||||||
<li ng-if="r.shareAccess.write"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.autoPopulateFolderName(); vm.uploadFileContainer = true; vm.uploadFolderContainer = false; vm.cleanUploads(r);" class="cp">Upload files</a></span></li>
|
<li ng-if="r.shareAccess.write"><span><i class="fa fa-upload cp"></i> <a ng-click="vm.autoPopulateFolderName(); vm.uploadFileContainer = true; vm.uploadFolderContainer = false; vm.cleanUploads(r);" class="cp">Upload files</a></span></li>
|
||||||
<li ng-if="r.shareAccess.write"><span><i class="fa fa-folder cp"></i> <a ng-click="vm.uploadFolderContainer = true; vm.uploadFileContainer = false; vm.cleanUploads(r);" class="cp">New folder</a></span></li>
|
<li ng-if="r.shareAccess.write"><span><i class="fa fa-folder cp"></i> <a ng-click="vm.uploadFolderContainer = true; vm.uploadFileContainer = false; vm.cleanUploads(r);" class="cp">New folder</a></span></li>
|
||||||
<li ng-if="r.shareAccess.write"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.currentFolder, r); vm.cleanUploads(r);" data="{{ vm.currentFolder }}" class="cp">Delete {{ vm.currentFolder | capitalize }} Folder</a></span></li>
|
<li ng-if="r.shareAccess.write"><span><i class="fa fa-trash cp"></i> <a ng-click="vm.triggerDeleteFolder(vm.currentFolder, r); vm.cleanUploads(r);" data="{{ vm.currentFolder }}" class="cp">Delete {{ vm.currentFolder | capitalize }} folder</a></span></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -38,6 +39,8 @@
|
|||||||
<hr>
|
<hr>
|
||||||
<div>
|
<div>
|
||||||
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
|
<input type="file" ng-model="r.newFile" class="form-control" daplie-file-change="vm.Sites.setUpload(r)" />
|
||||||
|
<div ng-if="!r.isZip"><label><input type="checkbox" ng-model="r.indexableFile" /> Indexable?</label></div>
|
||||||
|
<div ng-if="!r.isZip"><label><input type="checkbox" ng-model="r.publicFile" /> Public?</label></div>
|
||||||
<div ng-if="r.isZip"><label><input type="checkbox" ng-model="r.unzip" /> Unpack .zip</label></div>
|
<div ng-if="r.isZip"><label><input type="checkbox" ng-model="r.unzip" /> Unpack .zip</label></div>
|
||||||
<div ng-if="r.unzip"><label><input type="checkbox" ng-model="r.stripZip" /> Strip zip directory root</label></div>
|
<div ng-if="r.unzip"><label><input type="checkbox" ng-model="r.stripZip" /> Strip zip directory root</label></div>
|
||||||
<div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div>
|
<div ng-if="vm.isZip" ><label>Unzip directory</label> <input type="text" ng-model="vm.unzipPath" /></div>
|
||||||
|
|||||||
9
templates/widgets/referrer.html
Normal file
9
templates/widgets/referrer.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<div class="referrer-modal {{ vm.hideReferrerNotification }}">
|
||||||
|
<div class="referrer-pop-up">
|
||||||
|
<h4>{{ vm.referrerAlert.title }}</h4>
|
||||||
|
<p>{{ vm.referrerAlert.msg }}</p>
|
||||||
|
<a class="btn btn-danger close-referrer-pop-up" ng-click="vm.closeReferrerModal()">Close</a>
|
||||||
|
<a class="btn btn-default" ng-click="vm.closeReferrerModal()">Maybe later</a>
|
||||||
|
<a class="btn btn-success" ng-click="vm.sendToShares()">Do it now</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
Loading…
x
Reference in New Issue
Block a user