Squashed commit of pull request #1954

This commit is contained in:
Dennis Wilson
2015-08-02 08:27:05 +02:00
committed by Jakob Borg
parent 19451e0654
commit 26d52bedb3
44 changed files with 934 additions and 800 deletions

View File

@@ -0,0 +1,7 @@
angular.module('syncthing.usagereport')
.directive('usageReportModal', function () {
return {
restrict: 'A',
templateUrl: 'scripts/syncthing/usagereport/views/directives/usageReportModalView.html'
};
});

View File

@@ -0,0 +1,7 @@
angular.module('syncthing.usagereport')
.directive('usageReportPreviewModal', function () {
return {
restrict: 'A',
templateUrl: 'scripts/syncthing/usagereport/views/directives/usageReportPreviewModalView.html'
};
});

View File

@@ -0,0 +1 @@
angular.module('syncthing.usagereport', []);

View File

@@ -0,0 +1,19 @@
<div id="ur" class="modal fade" data-backdrop="static" data-keyboard="false" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header alert alert-success">
<h4 translate class="modal-title">Allow Anonymous Usage Reporting?</h4>
</div>
<div class="modal-body">
<p translate>The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.</p>
<p translate translate-value-url="<a href=&quot;https://data.syncthing.net&quot; target=&quot;_blank&quot;>https://data.syncthing.net</a>">The aggregated statistics are publicly available at {%url%}.</p>
<button translate type="button" class="btn btn-default btn-sm" ng-show="!reportPreview" ng-click="showReportPreview()">Preview Usage Report</button>
<pre ng-if="reportPreview"><small>{{reportData | json}}</small></pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success btn-sm" ng-click="acceptUR()"><span class="glyphicon glyphicon-ok"></span>&nbsp;<span translate>Yes</span></button>
<button type="button" class="btn btn-danger btn-sm" ng-click="declineUR()"><span class="glyphicon glyphicon-remove"></span>&nbsp;<span translate>No</span></button>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,17 @@
<div id="urPreview" class="modal fade" tabindex="-1">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header alert alert-success">
<h4 translate class="modal-title">Anonymous Usage Reporting</h4>
</div>
<div class="modal-body">
<p translate>The encrypted usage report is sent daily. It is used to track common platforms, folder sizes and app versions. If the reported data set is changed you will be prompted with this dialog again.</p>
<p translate translate-value-url="<a href=&quot;https://data.syncthing.net&quot; target=&quot;_blank&quot;>https://data.syncthing.net</a>">The aggregated statistics are publicly available at {%url%}.</p>
<pre><small>{{reportData | json}}</small></pre>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-success btn-sm" data-dismiss="modal"><span class="glyphicon glyphicon-ok"></span>&nbsp;<span translate>OK</span></button>
</div>
</div>
</div>
</div>