mirror of
https://github.com/lights0123/n-link.git
synced 2025-01-03 15:15:26 +00:00
Always show copy button
This commit is contained in:
parent
d4a4930d94
commit
a405c79186
|
@ -36,10 +36,6 @@
|
|||
</button>
|
||||
<input v-if="nativeUpload" ref="upload" type="file" class="hidden" :accept="info.os_extension"
|
||||
@change="uploadNative"/>
|
||||
<button class="mt-4 button gray-button"
|
||||
@click="copyLogs">
|
||||
Copy logs
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
|
@ -39,6 +39,11 @@
|
|||
>
|
||||
</label>
|
||||
</div>
|
||||
<div v-if="calculator">
|
||||
<button class="mt-4 button gray-button" @click="copyLogs">
|
||||
Copy logs
|
||||
</button>
|
||||
</div>
|
||||
<div v-if="!(calculator && !calculator.info)" class="flex-grow" />
|
||||
<div class="mt-4 select-text">
|
||||
<p>
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in a new issue