resolved conflicts with master branch

This commit is contained in:
alecmerdler 2017-01-19 12:21:22 -08:00
commit 01f99f6133
8 changed files with 43 additions and 39 deletions

View file

@ -9,14 +9,12 @@
<form class="form-signup" name="signupForm" ng-submit="register()" ng-show="!awaitingConfirmation && !registering">
<label for="username">Username:</label>
<span class="namespace-input" binding="newUser.username" is-back-incompat="isBackIncompat" namespace-title="Requested username"></span>
<span class="namespace-input" binding="newUser.username" back-incompat-message="backIncompatMessage" namespace-title="Requested username"></span>
<div class="expandable" ng-class="{'expanded': isBackIncompat || (!signupForm.namespaceField.$error.required && signupForm.namespaceField.$invalid)}">
<div class="co-alert co-alert-warning thin" ng-show="isBackIncompat">
Usernames with dots or dashes are incompatible with Docker version 1.8 or older
</div>
<div class="expandable" ng-class="{'expanded': backIncompatMessage || (!signupForm.namespaceField.$error.required && signupForm.namespaceField.$invalid)}">
<div class="co-alert co-alert-warning thin" ng-show="backIncompatMessage">{{ backIncompatMessage }}</div>
<div class="co-alert co-alert-danger thin" ng-show="!signupForm.namespaceField.$error.required && signupForm.namespaceField.$invalid">
Usernames must be alphanumeric and between four and thirty characters in length
Usernames must be alphanumeric and between 2 and 255 characters in length
</div>
</div>

View file

@ -1,5 +1,5 @@
export default {
TEAM_PATTERN: '^[a-z][a-z0-9]+$',
ROBOT_PATTERN: '^[a-z][a-z0-9_]{3,29}$',
USERNAME_PATTERN: '^(?=.{4,30}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
ROBOT_PATTERN: '^[a-z][a-z0-9_]{1,254}$',
USERNAME_PATTERN: '^(?=.{2,255}$)([a-z0-9]+(?:[._-][a-z0-9]+)*)$',
};

View file

@ -10,7 +10,7 @@ angular.module('quay').directive('namespaceInput', function () {
restrict: 'C',
scope: {
'binding': '=binding',
'isBackIncompat': '=isBackIncompat',
'backIncompatMessage': '=backIncompatMessage',
'hasExternalError': '=?hasExternalError',
'namespaceTitle': '@namespaceTitle',
@ -21,11 +21,17 @@ angular.module('quay').directive('namespaceInput', function () {
$scope.$watch('binding', function(binding) {
if (!binding) {
$scope.isBackIncompat = false;
$scope.backIncompatMessage = null;
return;
}
$scope.isBackIncompat = (binding.indexOf('-') > 0 || binding.indexOf('.') > 0);
if (binding.indexOf('-') > 0 || binding.indexOf('.') > 0) {
$scope.backIncompatMessage = 'Namespaces with dashes or dots are only compatible with Docker 1.9+';
} else if (binding.length < 4 || binding.length > 30) {
$scope.backIncompatMessage = 'Namespaces less than 4 or more than 30 characters are only compatible with Docker 1.6+';
} else {
$scope.backIncompatMessage = null;
}
})
}
};

View file

@ -42,16 +42,14 @@
<label for="orgName">Organization Name</label>
<div class="field-row">
<span class="field-container">
<span class="namespace-input" binding="org.name" is-back-incompat="isBackIncompat" namespace-title="Organization name"></span>
</span>
<span class="co-alert co-alert-warning thin" ng-show="isBackIncompat">
Organization names with dots or dashes are incompatible with Docker version 1.8 or older
<span class="namespace-input" binding="org.name" back-incompat-message="backIncompatMessage" namespace-title="Organization name"></span>
</span>
<span class="co-alert co-alert-warning thin" ng-show="backIncompatMessage">{{ backIncompatMessage }}</span>
<span class="co-alert co-alert-danger thin" ng-show="!newOrgForm.namespaceField.$error.required && newOrgForm.namespaceField.$invalid">
Organization names must be alphanumeric, be at least four characters in length and max thirty characters in length
Organization names must be alphanumeric, be at least 2 characters in length and max 255 characters in length
</span>
</div>
<span class="description">This will also be the namespace for your repositories. Must be alphanumeric, all lowercase, at least four characters long and at most thirty characters long.</span>
<span class="description">This will also be the namespace for your repositories. Must be alphanumeric, all lowercase, at least 2 characters long and at most 255 characters long.</span>
</div>
<div class="form-group nested" quay-require="['MAILING']">

View file

@ -9,7 +9,7 @@
</p>
<p>Please confirm the selected username or enter a different username below:</p>
<form name="usernameForm" ng-submit="updateUser({'username': username})">
<div class="namespace-input" binding="username" is-back-incompat="isBackIncompat"
<div class="namespace-input" binding="username" back-incompat-message="backIncompatMessage"
namespace-title="Username" style="margin-bottom: 20px;"
has-external-error="state == 'existing'"></div>
@ -17,7 +17,7 @@
ng-disabled="usernameForm.$invalid || state != 'confirmed'"
value="Confirm Username">
<span class="cor-loader-inline" ng-show="state == 'confirming'"></span>
<span class="username-status" ng-show="state == 'confirmed' && !isBackIncompat">
<span class="username-status" ng-show="state == 'confirmed' && !backIncompatMessage">
<i class="fa fa-check-circle"></i> Username valid
</span>
<span class="username-status" ng-show="state == 'existing'">
@ -29,8 +29,8 @@
<span class="username-status" ng-show="state == 'editing' && usernameForm.$invalid">
Usernames must be alphanumeric and be at least four characters in length
</span>
<span class="username-status" ng-show="state == 'confirmed' && isBackIncompat">
<i class="fa fa-exclamation-triangle"></i> Note: Usernames with dots or dashes are incompatible with Docker version 1.8 or older
<span class="username-status" ng-show="state == 'confirmed' && backIncompatMessage">
<i class="fa fa-exclamation-triangle"></i>{{ backIncompatMessage }}
</span>
</form>
</div>