Merge branch 'stable-3.0' into stable-3.1

* stable-3.0:
  Add copy-to-clipboard for generated password
  Fix assertions to use isEmpty() rather than hasSize(0)
  Fix gr-syntax-params css class
  ChangeUpdate#setStatus: Fix error message
  Enable doctag in syntax highlighter
  Use '2g' when referring to 2 Gigabytes of streamFileThreshold

Change-Id: I8b36bcf6e8ede46fd1572fc3f7a32407ef0ee3ba
This commit is contained in:
David Pursehouse
2019-11-22 14:58:16 +09:00
7 changed files with 22 additions and 7 deletions

View File

@@ -1670,7 +1670,7 @@ Setting this too high may cause the JVM to run out of heap space
when handling very big binary files, such as device firmware or when handling very big binary files, such as device firmware or
CD-ROM ISO images. CD-ROM ISO images.
+ +
Defaults to 25% of the available JVM heap, limited to 2048m. Defaults to 25% of the available JVM heap, limited to 2g.
+ +
Common unit suffixes of 'k', 'm', or 'g' are supported. Common unit suffixes of 'k', 'm', or 'g' are supported.

View File

@@ -216,7 +216,7 @@ public class ChangeUpdate extends AbstractChangeUpdate {
} }
public void setStatus(Change.Status status) { public void setStatus(Change.Status status) {
checkArgument(status != Change.Status.MERGED, "use merge(Iterable<SubmitRecord>)"); checkArgument(status != Change.Status.MERGED, "use merge(RequestId, Iterable<SubmitRecord>)");
this.status = status; this.status = status;
} }

View File

@@ -100,6 +100,7 @@
'gr-diff gr-syntax gr-syntax-attribute': true, 'gr-diff gr-syntax gr-syntax-attribute': true,
'gr-diff gr-syntax gr-syntax-built_in': true, 'gr-diff gr-syntax gr-syntax-built_in': true,
'gr-diff gr-syntax gr-syntax-comment': true, 'gr-diff gr-syntax gr-syntax-comment': true,
'gr-diff gr-syntax gr-syntax-doctag': true,
'gr-diff gr-syntax gr-syntax-function': true, 'gr-diff gr-syntax gr-syntax-function': true,
'gr-diff gr-syntax gr-syntax-keyword': true, 'gr-diff gr-syntax gr-syntax-keyword': true,
'gr-diff gr-syntax gr-syntax-link': true, 'gr-diff gr-syntax gr-syntax-link': true,

View File

@@ -99,8 +99,11 @@ limitations under the License.
.gr-syntax-template-tag { .gr-syntax-template-tag {
color: var(--syntax-template-tag-color); color: var(--syntax-template-tag-color);
} }
.gr-syntax-param { .gr-syntax-params {
color: var(--syntax-param-color); color: var(--syntax-params-color);
}
.gr-syntax-doctag {
font-weight: var(--syntax-doctag-weight);
} }
</style> </style>
</template> </template>

View File

@@ -18,6 +18,7 @@ limitations under the License.
<link rel="import" href="/bower_components/polymer/polymer.html"> <link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="../../../styles/gr-form-styles.html"> <link rel="import" href="../../../styles/gr-form-styles.html">
<link rel="import" href="../../shared/gr-button/gr-button.html"> <link rel="import" href="../../shared/gr-button/gr-button.html">
<link rel="import" href="../../shared/gr-copy-clipboard/gr-copy-clipboard.html">
<link rel="import" href="../../shared/gr-overlay/gr-overlay.html"> <link rel="import" href="../../shared/gr-overlay/gr-overlay.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html"> <link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../../../styles/shared-styles.html"> <link rel="import" href="../../../styles/shared-styles.html">
@@ -37,6 +38,9 @@ limitations under the License.
#generatedPasswordDisplay { #generatedPasswordDisplay {
margin: var(--spacing-l) 0; margin: var(--spacing-l) 0;
} }
#generatedPasswordDisplay .title {
width: unset;
}
#generatedPasswordDisplay .value { #generatedPasswordDisplay .value {
font-family: var(--monospace-font-family); font-family: var(--monospace-font-family);
font-size: var(--font-size-mono); font-size: var(--font-size-mono);
@@ -77,6 +81,12 @@ limitations under the License.
<section id="generatedPasswordDisplay"> <section id="generatedPasswordDisplay">
<span class="title">New Password:</span> <span class="title">New Password:</span>
<span class="value">[[_generatedPassword]]</span> <span class="value">[[_generatedPassword]]</span>
<gr-copy-clipboard
has-tooltip
button-title="Copy password to clipboard"
hide-input
text="[[_generatedPassword]]">
</gr-copy-clipboard>
</section> </section>
<section id="passwordWarning"> <section id="passwordWarning">
This password will not be displayed again.<br> This password will not be displayed again.<br>

View File

@@ -140,6 +140,7 @@ html {
--syntax-built_in-color: #30a; --syntax-built_in-color: #30a;
--syntax-comment-color: #3f7f5f; --syntax-comment-color: #3f7f5f;
--syntax-default-color: var(--primary-text-color); --syntax-default-color: var(--primary-text-color);
--syntax-doctag-weight: bold;
--syntax-function-color: var(--primary-text-color); --syntax-function-color: var(--primary-text-color);
--syntax-keyword-color: #9e0069; --syntax-keyword-color: #9e0069;
--syntax-link-color: #219; --syntax-link-color: #219;
@@ -147,7 +148,7 @@ html {
--syntax-meta-color: #ff1717; --syntax-meta-color: #ff1717;
--syntax-meta-keyword-color: #219; --syntax-meta-keyword-color: #219;
--syntax-number-color: #164; --syntax-number-color: #164;
--syntax-param-color: var(--primary-text-color); --syntax-params-color: var(--primary-text-color);
--syntax-regexp-color: #fa8602; --syntax-regexp-color: #fa8602;
--syntax-selector-attr-color: #fa8602; --syntax-selector-attr-color: #fa8602;
--syntax-selector-class-color: #164; --syntax-selector-class-color: #164;
@@ -160,7 +161,6 @@ html {
--syntax-title-color: #0000c0; --syntax-title-color: #0000c0;
--syntax-type-color: #2a66d9; --syntax-type-color: #2a66d9;
--syntax-variable-color: var(--primary-text-color); --syntax-variable-color: var(--primary-text-color);
/* misc */ /* misc */
--border-radius: 4px; --border-radius: 4px;
--reply-overlay-z-index: 1000; --reply-overlay-z-index: 1000;

View File

@@ -110,6 +110,7 @@ limitations under the License.
--syntax-built_in-color: #f7c369; --syntax-built_in-color: #f7c369;
--syntax-comment-color: var(--deemphasized-text-color); --syntax-comment-color: var(--deemphasized-text-color);
--syntax-default-color: var(--primary-text-color); --syntax-default-color: var(--primary-text-color);
--syntax-doctag-weight: bold;
--syntax-function-color: var(--primary-text-color); --syntax-function-color: var(--primary-text-color);
--syntax-keyword-color: #cd4cf0; --syntax-keyword-color: #cd4cf0;
--syntax-link-color: #c792ea; --syntax-link-color: #c792ea;
@@ -117,7 +118,7 @@ limitations under the License.
--syntax-meta-color: #6d7eee; --syntax-meta-color: #6d7eee;
--syntax-meta-keyword-color: #eefff7; --syntax-meta-keyword-color: #eefff7;
--syntax-number-color: #00998a; --syntax-number-color: #00998a;
--syntax-param-color: var(--primary-text-color); --syntax-params-color: var(--primary-text-color);
--syntax-regexp-color: #f77669; --syntax-regexp-color: #f77669;
--syntax-selector-attr-color: #80cbbf; --syntax-selector-attr-color: #80cbbf;
--syntax-selector-class-color: #ffcb68; --syntax-selector-class-color: #ffcb68;