Show share link

This commit is contained in:
brantje 2016-10-03 12:55:18 +02:00
parent 9433c4571f
commit f44bef765f
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
3 changed files with 5 additions and 4 deletions

View file

@ -59,8 +59,8 @@ angular.module('passmanApp')
$location.path('/vault/' + $scope.storedCredential.vault_id); $location.path('/vault/' + $scope.storedCredential.vault_id);
}; };
console.log($location);
$scope.share_link = $location.$$protocol + '://'+ $location.$$host + OC.generateUrl('apps/passman/share/public#') + $scope.storedCredential.guid;
$scope.share_settings = { $scope.share_settings = {
linkSharing:{ linkSharing:{
enabled: false, enabled: false,

View file

@ -89,7 +89,7 @@ angular.module('views/partials/forms/share_credential/basics.html', []).run(['$t
angular.module('views/partials/forms/share_credential/expire_settings.html', []).run(['$templateCache', function($templateCache) { angular.module('views/partials/forms/share_credential/expire_settings.html', []).run(['$templateCache', function($templateCache) {
'use strict'; 'use strict';
$templateCache.put('views/partials/forms/share_credential/expire_settings.html', $templateCache.put('views/partials/forms/share_credential/expire_settings.html',
'<div class="row"><div class="col-xs-12 col-md-6"><input type="checkbox" ng-model="share_settings.linkSharing.enabled"> Enable link sharing.<div>Expire settings:<select ng-model="share_settings.linkSharing.settings.type"><option value="null">Does not expire</option><option value="view_amount">Expire after a certain amount of views</option><option value="date">Expire after a date</option></select></div><div ng-show="share_settings.linkSharing.settings.type == \'date\'">Share until date <span datetime-picker ng-model="share_settings.linkSharing.settings.value" class="link" future-only ng-show="!share_settings.linkSharing.settings.value" close-on-select="false">No expire date set</span></div><div ng-show="share_settings.linkSharing.settings.type == \'view_amount\'">Share until views <input type="number" ng-model="share_settings.linkSharing.settings.value"></div></div></div>'); '<div class="row"><div class="col-xs-12 col-md-6"><input type="checkbox" ng-model="share_settings.linkSharing.enabled"> Enable link sharing.<br><input type="text" ng-model="share_link" select-on-click ng-if="share_settings.linkSharing.enabled"><div>Expire settings:<select ng-model="share_settings.linkSharing.settings.type"><option value="null">Does not expire</option><option value="view_amount">Expire after a certain amount of views</option><option value="date">Expire after a date</option></select></div><div ng-show="share_settings.linkSharing.settings.type == \'date\'">Share until date <span datetime-picker ng-model="share_settings.linkSharing.settings.value" class="link" future-only ng-show="!share_settings.linkSharing.settings.value" close-on-select="false">No expire date set</span></div><div ng-show="share_settings.linkSharing.settings.type == \'view_amount\'">Share until views <input type="number" ng-model="share_settings.linkSharing.settings.value"></div></div></div>');
}]); }]);
angular.module('views/partials/password-meter.html', []).run(['$templateCache', function($templateCache) { angular.module('views/partials/password-meter.html', []).run(['$templateCache', function($templateCache) {

View file

@ -1,7 +1,8 @@
<div class="row"> <div class="row">
<div class="col-xs-12 col-md-6"> <div class="col-xs-12 col-md-6">
<input type="checkbox" ng-model="share_settings.linkSharing.enabled"> <input type="checkbox" ng-model="share_settings.linkSharing.enabled">
Enable link sharing. Enable link sharing.<br />
<input type="text" ng-model="share_link" select-on-click ng-if="share_settings.linkSharing.enabled">
<div> <div>
Expire settings: Expire settings:
<select ng-model="share_settings.linkSharing.settings.type"> <select ng-model="share_settings.linkSharing.settings.type">