From 97af7abc4c04ad3e655d04eaaa4ff0234704c4bf Mon Sep 17 00:00:00 2001 From: phl0 Date: Wed, 28 Sep 2022 15:41:08 +0200 Subject: [PATCH] Add shortcut for copying api keys --- application/views/api/help.php | 3 ++- application/views/interface_assets/footer.php | 17 +++++++++++++ assets/css/general.css | 25 +++++++++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) diff --git a/application/views/api/help.php b/application/views/api/help.php index 700ec1c6..50ec2cf8 100644 --- a/application/views/api/help.php +++ b/application/views/api/help.php @@ -32,7 +32,7 @@ result() as $row) { ?> - key; ?> + key; ?> description; ?> key); ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure you want delete API Key key; ?>?');">Delete + diff --git a/application/views/interface_assets/footer.php b/application/views/interface_assets/footer.php index 2eff6f66..75585cd4 100644 --- a/application/views/interface_assets/footer.php +++ b/application/views/interface_assets/footer.php @@ -89,6 +89,23 @@ function load_was_map() { +uri->segment(1) == "api" && $this->uri->segment(2) == "help") { ?> + + uri->segment(1) == "search" && $this->uri->segment(2) == "filter") { ?> diff --git a/assets/css/general.css b/assets/css/general.css index 676c1aac..6c163ebf 100644 --- a/assets/css/general.css +++ b/assets/css/general.css @@ -362,3 +362,28 @@ div#station_logbooks_linked_table_paginate { height: calc(100vh - 380px) !important; max-height: 900px !important; } + +.copy-icon { + display: block; + cursor: pointer; + padding-left: 0.5em; +} + +.flash-copy { + animation-name: flash; + animation-timing-function: ease-out; + animation-duration: 1s; +} + +@keyframes flash { + 0% { + background: #28a745; + } + 100% { + background: transparent; + } +} + +.api-key { + font-family: Monospace; +}