Wellington Capoia
Wellington Capoia
Explore posts from servers
PD🧩 Plasmo Developers
Created by Wellington Capoia on 7/18/2024 in #👟framework
Refused to evaluate a string as JavaScript
Hello, I'm trying to use Vue with the Vuelidate library to validate my inputs, but when I try to validate it gives me the error: Refused to evaluate a string as JavaScript because 'unsafe-eval' is not an allowed source of script in the following Content Security Policy directive: "script-src 'self' http://localhost". How would I go about resolving this? If relevant, follow the code:
import { useVuelidate } from '@vuelidate/core'
import { email, required } from '@vuelidate/validators'

const form = reactive({
email: '',
password: '',
loading: false,
})
const rules = computed(() => {
return {
email: { required, email },
password: { required },
}
})
const $v = useVuelidate(rules, form)

async function login() {
$v.value.$validate()
....
}
import { useVuelidate } from '@vuelidate/core'
import { email, required } from '@vuelidate/validators'

const form = reactive({
email: '',
password: '',
loading: false,
})
const rules = computed(() => {
return {
email: { required, email },
password: { required },
}
})
const $v = useVuelidate(rules, form)

async function login() {
$v.value.$validate()
....
}
<template>

<div class="flex flex-col col-span-12">
<label class="mb-2">Email</label>
<InputText v-model="form.email" placeholder="Informe seu email" :class="{
'dark:!border-red-500 dark:!focus:border-red-500 !border-red-500 focus:border-red-500':
$v.email.$error,
}" @change="$v.email.$touch" @keyup.enter="login" />
<small id="text-error" class="mt-2 p-error">{{
$v.email.$errors[0]?.$message || "&nbsp;"
}}</small>
</div>
</template>
<template>

<div class="flex flex-col col-span-12">
<label class="mb-2">Email</label>
<InputText v-model="form.email" placeholder="Informe seu email" :class="{
'dark:!border-red-500 dark:!focus:border-red-500 !border-red-500 focus:border-red-500':
$v.email.$error,
}" @change="$v.email.$touch" @keyup.enter="login" />
<small id="text-error" class="mt-2 p-error">{{
$v.email.$errors[0]?.$message || "&nbsp;"
}}</small>
</div>
</template>
3 replies
TTypebot
Created by Wellington Capoia on 5/6/2024 in #help-and-questions
Correct way to upload a block to official git
Hello, I have a CRM and I ended up developing an integration between it and typebot (lead creation and updating), and I would like to make it available to the public. Reading the documentation it says to open an issue first, to check if everything is correct, but I don't know exactly what I need to put in this issue, and I'm afraid of opening it wrong. What do I need to inform in the issue? Where do I put my code for evaluation? Do I do PR first?
3 replies
TTypebot
Created by Wellington Capoia on 5/2/2024 in #help-and-questions
After reloading the page, the fetchers values come with the value, not the label.
No description
6 replies
TTypebot
Created by Wellington Capoia on 5/2/2024 in #help-and-questions
Is possible to change option value in fetcher?
No description
4 replies
TTypebot
Created by Wellington Capoia on 4/25/2024 in #help-and-questions
Error saving credential (Invalid discriminator value)
No description
8 replies
PD🧩 Plasmo Developers
Created by Wellington Capoia on 8/29/2023 in #👟framework
XMLHttpRequests
hello, I need to use a library to interact with the google sheet api, and it uses axios that uses XMLHttpRequests, how would I make it work inside the messages in background >messages ?!
2 replies
PD🧩 Plasmo Developers
Created by Wellington Capoia on 8/20/2023 in #👟framework
Watch STORAGE from CSUI or Send message from backgrounds to CSUI
Hello, I have a CSUI with these settings: { matches: ["https://web.whatsapp.com/"], all_frames: true, world: "MAIN", } What I need is that when changing something in the popup my CSUI is warned, I thought of solving this in two ways: watch storage or send messages from the popup/background to the CSUI. The problem is: I can only use the storage inside the backgrounds (message or port) and I couldn't in any way send a message from the backgrounds to the CSUI. Any suggestion?
3 replies
PD🧩 Plasmo Developers
Created by Wellington Capoia on 8/19/2023 in #🔰newbie
Extension runtime is not available
Hi when i try to send a message from a CSUI to a background throws an error "rror: Extension runtime is not available" How do I communicate from a csui with the rest of the application?
3 replies
PD🧩 Plasmo Developers
Created by Wellington Capoia on 8/16/2023 in #👟framework
Extension runtime is not available
Hi when i try to send a message from a CSUI to a background throws an error "rror: Extension runtime is not available" How do I communicate from a csui with the rest of the application?
3 replies
PD🧩 Plasmo Developers
Created by Wellington Capoia on 8/15/2023 in #👟framework
can i send a message from a CSUI directly to popup.ts and vice versa?
Hello, can I send messages directly from CSUI to popup.ts? or do I really need to create the message inside the background folder and then send it to where I want it?!
2 replies
PD🧩 Plasmo Developers
Created by Wellington Capoia on 8/14/2023 in #👟framework
How to use a component library on Contents?
Hello, I would like to use a component package (https://primevue.org/) inside the content folder files. To add to popup/options/newtab etc we have a defineOptions method:
defineOptions({
prepare(app: app) {
app.use(PrimeVue);
app.component("Button", Button)
}
})
defineOptions({
prepare(app: app) {
app.use(PrimeVue);
app.component("Button", Button)
}
})
Where can I setup primevue correctly. But within the files of the Content folder this does not work, I use the same code but the components do not appear. Would you have any practical examples of how to use the component library within the contents?
19 replies