mirror of
https://github.com/EvolutionAPI/evolution-manager.git
synced 2025-07-13 07:04:50 -06:00
expand copy compatibility
This commit is contained in:
parent
3663968a1d
commit
c6b743a9b8
@ -31,7 +31,24 @@
|
||||
@click="copyApikey"
|
||||
>
|
||||
<v-icon start size="small">mdi-key</v-icon>
|
||||
{{ (instance.instance?.apikey || "").slice(0, 10) }}...
|
||||
{{
|
||||
(instance.instance?.apikey || "").slice(
|
||||
0,
|
||||
apikeyReveled ? undefined : 7
|
||||
)
|
||||
}}{{ apikeyReveled ? "" : "..." }}
|
||||
<v-btn
|
||||
icon
|
||||
@click.stop="toggleReveled"
|
||||
density="comfortable"
|
||||
class="ml-1"
|
||||
variant="text"
|
||||
size="x-small"
|
||||
>
|
||||
<v-icon size="small">
|
||||
{{ apikeyReveled ? "mdi-eye-off" : "mdi-eye" }}
|
||||
</v-icon>
|
||||
</v-btn>
|
||||
<v-icon end size="small">
|
||||
{{ copied ? "mdi-check" : "mdi-content-copy" }}
|
||||
</v-icon>
|
||||
@ -95,6 +112,7 @@ export default {
|
||||
restart: { loading: false, success: false },
|
||||
reload: false,
|
||||
copied: false,
|
||||
apikeyReveled: false,
|
||||
statusMapper: statusMapper,
|
||||
AppStore: useAppStore(),
|
||||
}),
|
||||
@ -153,11 +171,17 @@ export default {
|
||||
this.disconnect.loading = false;
|
||||
}
|
||||
},
|
||||
toggleReveled() {
|
||||
this.apikeyReveled = !this.apikeyReveled;
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
owner() {
|
||||
if (!this.instance?.instance?.owner)
|
||||
return this.$t(`status.${this.instance.instance.status}`) || this.$t("unknown");
|
||||
return (
|
||||
this.$t(`status.${this.instance.instance.status}`) ||
|
||||
this.$t("unknown")
|
||||
);
|
||||
|
||||
return (this.instance?.instance?.owner || "").split("@")[0];
|
||||
},
|
||||
|
@ -9,6 +9,7 @@ export default (value) => {
|
||||
el.style.left = "-9999px";
|
||||
document.body.appendChild(el);
|
||||
el.select();
|
||||
el.setSelectionRange(0, 99999);
|
||||
document.execCommand("copy");
|
||||
document.body.removeChild(el);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user