80 lines
3.9 KiB
HTML
80 lines
3.9 KiB
HTML
<div class="container user-admin">
|
|
<div class="loading" ng-show="planLoading || planChanging">
|
|
<i class="fa fa-spinner fa-spin fa-3x"></i>
|
|
</div>
|
|
<div class="row" ng-show="errorMessage">
|
|
<div class="col-md-12">
|
|
<div class="alert alert-danger">{{ errorMessage }}</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" ng-show="askForPassword">
|
|
<div class="col-md-12">
|
|
<div class="alert alert-warning">Your account does not currently have a password. You will need to create a password before you will be able to <strong>push</strong> or <strong>pull</strong> repositories.</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" ng-hide="planLoading">
|
|
<div class="col-md-3" ng-repeat='plan in plans'>
|
|
<div class="panel" ng-class="{'panel-success': subscription.plan == plan.stripeId, 'panel-default': subscription.plan != plan.stripeId}">
|
|
<div class="panel-heading">
|
|
{{ plan.title }}
|
|
<span class="pull-right" ng-show="subscription.plan == plan.stripeId">
|
|
<i class="fa fa-ok"></i>
|
|
Subscribed
|
|
</span>
|
|
</div>
|
|
<div class="panel-body panel-plan">
|
|
<div class="plan-price">${{ plan.price / 100 }}</div>
|
|
<div class="plan-description"><b>{{ plan.privateRepos }}</b> Private Repositories</div>
|
|
<div ng-switch='plan.stripeId'>
|
|
<div ng-switch-when='free'>
|
|
<button class="btn button-hidden">Hidden!</button>
|
|
</div>
|
|
<div ng-switch-default>
|
|
<button class="btn btn-primary" ng-show="subscription.plan === 'free'" ng-click="subscribe(plan.stripeId)">Subscribe</button>
|
|
<button class="btn btn-default" ng-hide="subscription.plan === 'free' || subscription.plan === plan.stripeId" ng-click="changeSubscription(plan.stripeId)">Change</button>
|
|
<button class="btn btn-danger" ng-show="subscription.plan === plan.stripeId" ng-click="cancelSubscription()">Cancel</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row" ng-show="subscription">
|
|
<div class="col-md-6">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
Plan Usage
|
|
</div>
|
|
<div class="panel-body">
|
|
<div class="used-description">
|
|
<b>{{ subscription.usedPrivateRepos }}</b> of <b>{{ subscribedPlan.privateRepos }}</b> private repositories used
|
|
</div>
|
|
<div class="progress">
|
|
<div ng-class="'progress-bar ' + (planUsagePercent > 90 ? 'progress-bar-danger' : '')" role="progressbar" aria-valuenow="{{ subscription.usedPrivateRepos }}" aria-valuemin="0" aria-valuemax="{{ subscribedPlan.privateRepos }}" style="width: {{ planUsagePercent }}%;">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="loading" ng-show="updatingUser">
|
|
<i class="fa fa-spinner fa-spin fa-3x"></i>
|
|
</div>
|
|
<div class="col-md-3">
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">
|
|
Change Password
|
|
</div>
|
|
<div class="panel-body">
|
|
<form class="form-change-pw" name="changePasswordForm" ng-submit="changePassword()" data-trigger="manual" data-content="{{ changePasswordError }}" data-placement="right" ng-show="!awaitingConfirmation && !registering">
|
|
<input type="password" class="form-control" placeholder="Your new password" ng-model="user.password" required>
|
|
<input type="password" class="form-control" placeholder="Verify your new password" ng-model="user.repeatPassword" match="user.password" required>
|
|
<button class="btn btn-danger" ng-disabled="changePasswordForm.$invalid" type="submit" analytics-on analytics-event="register">Change Password</button>
|
|
<span class="help-block" ng-show="changePasswordSuccess">Password changed successfully</span>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|