Better UX for indicating upgrade is necessary to users

This commit is contained in:
Joseph Schorr 2017-04-04 16:15:33 -04:00
parent 1243350d30
commit 30d5f2a138
3 changed files with 59 additions and 86 deletions

View file

@ -1,26 +1,3 @@
.repo-count-checker .btn {
margin-top: 0px !important;
}
.repo-count-checker .co-alert {
margin-bottom: 6px !important;
padding-right: 120px;
}
.repo-count-checker .co-alert .btn {
position: absolute;
top: 10px;
right: 10px;
}
@media (max-width: 767px) {
.repo-count-checker .co-alert {
padding-right: 10px;
}
.repo-count-checker .co-alert .btn {
position: relative;
margin-top: 20px;
margin-bottom: 10px;
}
margin-bottom: 16px;
}

View file

@ -1,17 +1,13 @@
<div class="repo-count-checker-element">
<div class="required-plan" ng-show="isEnabled && planRequired && planRequired.title">
<div class="co-alert co-alert-info">
<div class="co-alert co-alert-warning thin">
In order to make this repository private under
<strong ng-if="isUserNamespace">your personal namespace</strong>
<strong ng-if="!isUserNamespace">organization <b>{{ repo.namespace }}</b></strong>, you will need to upgrade your plan to
<b style="border-bottom: 1px dotted black;" data-html="true"
data-title="{{ '<b>' + planRequired.title + '</b><br>' + planRequired.privateRepos + ' private repositories' }}" bs-tooltip>
{{ planRequired.title }}
</b>.
This will cost $<span>{{ planRequired.price / 100 }}</span>/month.
<a class="btn btn-primary" ng-click="upgradePlan()" ng-show="!planChanging">Upgrade now</a>
<strong ng-if="!isUserNamespace">{{ namespace }}</strong>, you will need to upgrade the namespace's plan to at least a
<b style="border-bottom: 1px dotted black; cursor: default" data-html="true"
data-title="{{ '<b>' + planRequired.title + '</b><br>' + planRequired.privateRepos + ' private repositories' }}" bs-tooltip>{{ planRequired.title }}</b> plan.
</div>
<span ng-if="isUserNamespace && user.organizations.length == 1" style="margin-left: 6px; display: inline-block;">or did you mean to have this repository under the <b>{{ user.organizations[0].name }}</b> namespace?</span>
<a class="btn btn-primary" ng-click="upgradePlan()" ng-show="!planChanging">Upgrade {{ namespace }} to {{ planRequired.title }}</a>
<div class="cor-loader-inline" ng-show="planChanging"></div>
</div>
<div class="cor-loader-inline" ng-show="isEnabled && checkingPlan"></div>

View file

@ -97,8 +97,8 @@
</div>
</div>
<div ng-show="repo.is_public == '1' || (!planRequired && !checkingPlan)">
<div class="row" ng-show="Features.BUILD_SUPPORT">
<div class="col-md-12">
<div class="section">
<div class="section-title">Initialize repository</div>
@ -158,7 +158,6 @@
</div>
<div class="row">
<div class="col-md-12">
<button class="btn btn-large btn-primary" type="submit"
ng-disabled="buildStarted || newRepoForm.$invalid || (repo.is_public == '0' && (planRequired || checkingPlan)) || ((repo.initialize == 'dockerfile' || repo.initialize == 'zipfile') && !hasDockerfile)">
@ -168,6 +167,7 @@
</button>
</div>
</div>
</div>
</form>
</div>