Files
salvato.newfreeplanet/src/components/CCopyBtnSmall/CCopyBtnSmall.ts
Surya Paolo ec356c70d9 - Invia e Ricevi RIS (grafica aggiornata)
- Visualizzazione Movimenti (ultimi e successivi), per singolo e di tutti
2024-10-11 02:29:29 +02:00

57 lines
1.2 KiB
TypeScript
Executable File

import { tools } from '../../store/Modules/tools'
import { useQuasar } from 'quasar'
import { useI18n } from '@src/boot/i18n'
import { useUserStore } from '@store/UserStore'
import { useGlobalStore } from '@store/globalStore'
import { defineComponent } from 'vue'
import { shared_consts } from '@/common/shared_vuejs'
export default defineComponent({
name: 'CCopyBtnSmall',
props: {
texttocopy: {
type: String,
required: true,
},
title: {
type: String,
required: false,
default: '',
},
small: {
type: Boolean,
required: false,
default: false,
}
},
components: {},
setup(props) {
const $q = useQuasar()
const { t } = useI18n()
async function copytoclipandsend() {
tools.copyStringToClipboard($q, props.texttocopy, true)
let msg = 'Questo è il link che puoi condividere per farti inviare i RIS:<br><br>👉🏻 ' + props.texttocopy
tools.sendMsgTelegramCmd($q, t, shared_consts.MsgTeleg.SHARE_TEXT, false, msg)
}
function getclass() {
if (props.small) {
return 'text-h7'
} else {
return 'text-h5'
}
}
return {
copytoclipandsend,
tools,
getclass,
t,
}
},
})