From 5e94d73d1f7573fa25e93ba2f5cf77540cc2db3a Mon Sep 17 00:00:00 2001 From: petersutter Date: Fri, 15 Nov 2024 16:54:53 +0100 Subject: [PATCH] "Copied!" now theme dependant --- frontend/src/components/GCodeBlock.vue | 50 ++++++++++++++++---------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/frontend/src/components/GCodeBlock.vue b/frontend/src/components/GCodeBlock.vue index a856c7f5a4..eee5772265 100644 --- a/frontend/src/components/GCodeBlock.vue +++ b/frontend/src/components/GCodeBlock.vue @@ -230,35 +230,47 @@ export default { position: absolute; top: 14px; left: 14px; - background-color: rgba(#000, .87); border-radius: 2px; transform: translate3d(0, -48px, 0); transition: $swift-ease-in-out; - color: #fff; font-family: Roboto, sans-serif; font-size: 14px; line-height: 1em; - &.active { - transition : $swift-ease-out; - transform : translate3d(0,0,0); - } - } + &.active { + transition: $swift-ease-out; + transform: translate3d(0, 0, 0); + } + } - .v-theme--light .code-block { - background-color : rgba(0,0,0,.02); - } + .v-theme--light { + .code-block { + background-color: rgba(0, 0, 0, .02); + } + + .copied { + background-color: rgba(0, 0, 0, .87); + color: #fff; + } + } - .v-theme--dark .code-block { - background-color : rgba(0,0,0,.2); + .v-theme--dark { + .code-block { + background-color: rgba(0, 0, 0, .2); - &:after { - color : rgba(#fff,.26) !important; - } + &:after { + color: rgba(#fff, .26) !important; + } - code.hljs { - color : map.get(vuetify.$grey, 'lighten-4') !important; - } - } + code.hljs { + color: map.get(vuetify.$grey, 'lighten-4') !important; + } + } + .copied { + background-color: rgba(255, 255, 255, .87); + color: #000; + } + } +