From a405c791863c725a928d53e7837e2dc8b3e8ced3 Mon Sep 17 00:00:00 2001 From: lights0123 Date: Sun, 22 Nov 2020 13:29:51 -0500 Subject: [PATCH] Always show copy button --- n-link-core/components/CalcInfo.vue | 8 -------- web/pages/index.vue | 25 +++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 8 deletions(-) diff --git a/n-link-core/components/CalcInfo.vue b/n-link-core/components/CalcInfo.vue index 898cc86..f30684a 100644 --- a/n-link-core/components/CalcInfo.vue +++ b/n-link-core/components/CalcInfo.vue @@ -36,10 +36,6 @@ - @@ -77,10 +73,6 @@ export default class FileView extends Vue { const file = e.target.files?.[0]; if (file) this.$devices.uploadOsFile(this.dev, file); } - - copyLogs() { - navigator.clipboard.writeText(this.$devices.devices[this.dev].log).catch(alert); - } } diff --git a/web/pages/index.vue b/web/pages/index.vue index 509e411..ddf2670 100644 --- a/web/pages/index.vue +++ b/web/pages/index.vue @@ -39,6 +39,11 @@ > +
+ +

@@ -169,6 +174,10 @@ export default class Home extends Vue { installDrivers() { open('https://lights0123.com/n-link/#windows'); } + + copyLogs() { + navigator.clipboard.writeText(this.calculator?.log).catch(alert); + } } @@ -200,4 +209,20 @@ export default class Home extends Vue { transform: rotate(360deg); } } + +.button { + @apply bg-blue-500 text-white rounded px-6 py-2.5 font-bold; + &:disabled { + cursor: not-allowed; + opacity: 0.75; + } + + &:focus { + outline: none; + } +} + +.gray-button { + @apply bg-gray-400 text-gray-800; +}