Skip to content

Commit

Permalink
fix(bundle): remove v clipboard (#3214)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephmcg committed May 18, 2022
1 parent d851377 commit 7361d25
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
3 changes: 1 addition & 2 deletions components/views/navigation/sidebar/status/Status.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
/>
<div
class="user-info has-tooltip has-tooltip-top has-tooltip-primary"
v-on:click="$toast.show($t('ui.copied'))"
:data-tooltip="$t('controls.copy_id')"
v-clipboard:copy="accounts.active"
@click="copyId"
>
<TypographyTitle
data-cy="user-name"
Expand Down
13 changes: 11 additions & 2 deletions components/views/navigation/sidebar/status/Status.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
<template src="./Status.html" />
<template src="./Status.html"></template>

<script lang="ts">
import Vue from 'vue'
import { mapState } from 'vuex'
import { RootState } from '~/types/store/store'
export default Vue.extend({
computed: {
...mapState(['accounts']),
...mapState({
accounts: (state) => (state as RootState).accounts,
}),
src(): string {
const hash = this.accounts.details.profilePicture
return hash ? `${this.$Config.textile.browser}/ipfs/${hash}` : ''
},
},
methods: {
copyId() {
navigator.clipboard.writeText(this.accounts.active)
this.$toast.show(this.$t('ui.copied') as string)
},
},
})
</script>

Expand Down
1 change: 0 additions & 1 deletion nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default defineNuxtConfig({
plugins: [
// Third Party
{ src: '~/plugins/thirdparty/vscrolllock.ts', ssr: false },
{ src: '~/plugins/thirdparty/clipboard.ts' },
{ src: '~/plugins/thirdparty/clickoutside.ts' },
{ src: '~/plugins/thirdparty/filesize.ts' },
{ src: '~/plugins/thirdparty/persist.ts', ssr: false },
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@
"v-click-outside": "^3.1.2",
"v-scroll-lock": "^1.3.1",
"vue-awesome-swiper": "^4.1.1",
"vue-clipboard2": "^0.3.3",
"vue-croppie": "^2.0.2",
"vue-custom-scrollbar": "^1.4.3",
"vue-emoji-picker": "git+https://git@github.com/Satellite-im/vue-emoji-picker#build-satellite",
Expand Down Expand Up @@ -216,4 +215,4 @@
"node": "16.14.0",
"yarn": "1.22.17"
}
}
}
4 changes: 0 additions & 4 deletions plugins/thirdparty/clipboard.ts

This file was deleted.

0 comments on commit 7361d25

Please sign in to comment.