Compare commits

...

1 Commits

Author SHA1 Message Date
30f6dbdc1f Add copy button to version information 2022-05-04 16:10:50 -05:00
2 changed files with 20 additions and 2 deletions

View File

@ -123,4 +123,11 @@
h2 { h2 {
font-size: 1.5em; font-size: 1.5em;
} }
button {
color: #aaaaaa;
font-size: 0.7em;
}
button:active {
color: $colorBtnBgHov;
}
} }

View File

@ -23,8 +23,14 @@
<p>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.</p> <p>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.</p>
<p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a @click="showLicenses">click here for third party licensing information</a>.</p> <p>Open MCT includes source code licensed under additional open source licenses. See the Open Source Licenses file included with this distribution or <a @click="showLicenses">click here for third party licensing information</a>.</p>
</div> </div>
<h2>Version Information</h2> <h2>Version Information<button
<ul class="t-info l-info s-info"> class="icon-export"
@click="copyVersionToClipboard"
></button></h2>
<ul
ref="versionInformation"
class="t-info l-info s-info"
>
<li>Version: {{ buildInfo.version || 'Unknown' }}</li> <li>Version: {{ buildInfo.version || 'Unknown' }}</li>
<li>Build Date: {{ buildInfo.buildDate || 'Unknown' }}</li> <li>Build Date: {{ buildInfo.buildDate || 'Unknown' }}</li>
<li>Revision: {{ buildInfo.revision || 'Unknown' }}</li> <li>Revision: {{ buildInfo.revision || 'Unknown' }}</li>
@ -46,6 +52,11 @@ export default {
methods: { methods: {
showLicenses() { showLicenses() {
window.open('#/licenses'); window.open('#/licenses');
},
copyVersionToClipboard(e) {
const versionInfoElement = this.$refs.versionInformation;
const versionInfoText = versionInfoElement.innerHTML;
window.navigator.clipboard.writeText(versionInfoText);
} }
} }
}; };