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>
|
</button>
|
||||||
<input v-if="nativeUpload" ref="upload" type="file" class="hidden" :accept="info.os_extension"
|
<input v-if="nativeUpload" ref="upload" type="file" class="hidden" :accept="info.os_extension"
|
||||||
@change="uploadNative"/>
|
@change="uploadNative"/>
|
||||||
<button class="mt-4 button gray-button"
|
|
||||||
@click="copyLogs">
|
|
||||||
Copy logs
|
|
||||||
</button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -77,10 +73,6 @@ export default class FileView extends Vue {
|
||||||
const file = e.target.files?.[0];
|
const file = e.target.files?.[0];
|
||||||
if (file) this.$devices.uploadOsFile(this.dev, file);
|
if (file) this.$devices.uploadOsFile(this.dev, file);
|
||||||
}
|
}
|
||||||
|
|
||||||
copyLogs() {
|
|
||||||
navigator.clipboard.writeText(this.$devices.devices[this.dev].log).catch(alert);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
>
|
>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</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 v-if="!(calculator && !calculator.info)" class="flex-grow" />
|
||||||
<div class="mt-4 select-text">
|
<div class="mt-4 select-text">
|
||||||
<p>
|
<p>
|
||||||
|
@ -169,6 +174,10 @@ export default class Home extends Vue {
|
||||||
installDrivers() {
|
installDrivers() {
|
||||||
open('https://lights0123.com/n-link/#windows');
|
open('https://lights0123.com/n-link/#windows');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
copyLogs() {
|
||||||
|
navigator.clipboard.writeText(this.calculator?.log).catch(alert);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -200,4 +209,20 @@ export default class Home extends Vue {
|
||||||
transform: rotate(360deg);
|
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>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue