Files
gerrit/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password.html
Ben Rohlfs 1daaca3694 Distinguish two monospace fonts: code and mono
Add new css vars to app-theme.

Set 12px default for code and 13px default for mono.

Use "code" just in gr-diff and gr-formatted-text, mono everywhere else.

Ensure that font-size and line-height are set whenever the mono/code
fonts are used.

Fixes the font in the reply dialog being too small.

Fixes the code font in the comment card being too large.

Prominently, the commit message will also use 13px instead of 14px.

Screenshots: https://imgur.com/a/HTHy9fp

Bug: Issue 11839
Change-Id: I4a23ac99233656465707a083428fbe05cb146c95
2019-11-01 21:40:12 +00:00

95 lines
3.2 KiB
HTML

<!--
@license
Copyright (C) 2016 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<link rel="import" href="/bower_components/polymer/polymer.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-overlay/gr-overlay.html">
<link rel="import" href="../../shared/gr-rest-api-interface/gr-rest-api-interface.html">
<link rel="import" href="../../../styles/shared-styles.html">
<dom-module id="gr-http-password">
<template>
<style include="shared-styles">
.password {
font-family: var(--monospace-font-family);
font-size: var(--font-size-mono);
line-height: var(--line-height-mono);
}
#generatedPasswordOverlay {
padding: var(--spacing-xxl);
width: 50em;
}
#generatedPasswordDisplay {
margin: var(--spacing-l) 0;
}
#generatedPasswordDisplay .value {
font-family: var(--monospace-font-family);
font-size: var(--font-size-mono);
line-height: var(--line-height-mono);
}
#passwordWarning {
font-style: italic;
text-align: center;
}
.closeButton {
bottom: 2em;
position: absolute;
right: 2em;
}
</style>
<style include="gr-form-styles"></style>
<div class="gr-form-styles">
<div hidden$="[[_passwordUrl]]">
<section>
<span class="title">Username</span>
<span class="value">[[_username]]</span>
</section>
<gr-button
id="generateButton"
on-click="_handleGenerateTap">Generate new password</gr-button>
</div>
<span hidden$="[[!_passwordUrl]]">
<a href$="[[_passwordUrl]]" target="_blank" rel="noopener">
Obtain password</a>
(opens in a new tab)
</span>
</div>
<gr-overlay
id="generatedPasswordOverlay"
on-iron-overlay-closed="_generatedPasswordOverlayClosed"
with-backdrop>
<div class="gr-form-styles">
<section id="generatedPasswordDisplay">
<span class="title">New Password:</span>
<span class="value">[[_generatedPassword]]</span>
</section>
<section id="passwordWarning">
This password will not be displayed again.<br>
If you lose it, you will need to generate a new one.
</section>
<gr-button
link
class="closeButton"
on-click="_closeOverlay">Close</gr-button>
</div>
</gr-overlay>
<gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
</template>
<script src="gr-http-password.js"></script>
</dom-module>