Help forum
- Record Audio / Video
Flo@Vilosia
9 5 months ago
31 Aug 2024, 11:01
The AI sent me over so I give it a try in here 🙂 Is it possible to access the browser built -in getUserMedia api to record audio / video from within toddle ? I 've seen the custom -actions https://toddle.dev/docs/custom-actions documentation but I 'm not sure if this is the right path to go , or if there are any higher level concepts that provide this functionality ? best Flo - Can't read locally uploaded file in custom action
Tom Ireland
41 5 months ago
29 Aug 2024, 12:58
Over lunch , I 'm trying to get my app to read a locally uploaded file to display a preview prior to upload to the server , so I understand I need to use the FileReader API via a custom action . I can get event.target.files[0] via onchange event on my input (type is file and accepts jpg and png ) and store that into a variable but when passing it as an argument in my custom action , I 'm getting the following error : Error in Custom Action TypeError: Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'. I don 't see where I 'm going wrong because if I log my variable to console before I pass it to my custom action , I can see the files data . Here is the custom action : function fileReader(file) {
const reader = new FileReader();
reader.readAsDataURL(file);
}Any pointers ? Let me know if you want the branch (and component URL ) for a wee peek . - My app is laggy when I'm logged in
Armand
✅13 5 months ago
29 Aug 2024, 06:22
My app uses Supabase for auth and database . And the moment I log into it on the frontend it just becomes laggy , particularly on the input fields . When not logged in , it behaves normally . I am not loading a lot of data , 1 row from Table A and about 50ish rows from Table B , no images in either table 's column and less than 50kb in total . As far as I can tell from the Network tab in the inspector , there are no unnecessary calls to the API . I only see them pop -up when they should , so I don 't think I inadvertently created some call API loop . The above behavior (laggy when logged in , normal when not logged in ) is the same across different devices and browsers : 1 . MacOS (Safari /Firefox ) 2 . iOS (Safari ) The fact that it occurs when logged in indicates that it has something to do with Supabase or how I 've its API set up , but I can 't find it . Does anyone have any idea of where I should look to find the cause ? - Large Number of Items - API
TCG.Store
42 5 months ago
26 Aug 2024, 01:48
Hi team , Any way for me to fetch a specific number of results and lazy load the rest as a user scrolls ? or should i upgrade my plan ? The API returns over 22 ,000 + products for a tool i 'm building . I upgrade to scale up plan , but still having issues . - How are you gating pages?
Chris Laupama
6 5 months ago
21 Aug 2024, 09:21
Let 's say I have a login , signup and home page . I want the home page to be gated ( require a logged in user to see it ) Are you creating an "On load " lifecycle event ? ( if so , how are you doing this ? I keep getting stuck on a switch statement ) Or are you making an API call and having the success do nothing , or maybe just store something and have the error flow use the "Go to URL " action ? Thinking of the best way to do it , but interestingly I just can 't get my head around getting the "On load " even working as I 'm checking the session cookie and that doesn 't seem to be working . . . - Xano Session Logout
shihanms
👍15 5 months ago
20 Aug 2024, 18:32
I 'm using xano authentication and store the session cookie when logging in . After setting cookie redirect to the dashboard . In dashboard I have a button for logout . When clicking it I need to clear the session cookie and hence redirect back to the login screen . - Login component export
Marko
11 5 months ago
19 Aug 2024, 08:01
Hi there ! I ’ve created a component for logging users in using a standard email and password form , with Supabase as my backend auth . It works great in toddle , but when I export the component script and place it on my Webflow website , it doesn ’t seem to work ; error messages from the console below . I ’m aiming to create my own solution instead of using Memberstack or Outseta so I can have more freedom in how users log in and interact with their profile data . All the authenticated components will be made in toddle . The website is already built in Webflow , and the client is keen to stay with it . - Username via slug?
Patrick Mast
3 5 months ago
17 Aug 2024, 18:04
I have a sample app : https://slug_user.toddle.site/ It features a variable "slug " that is concatenated within the H1 string to display "Welcome User " . My goal is to use the slug as the username . For example : - https://slug_user.toddle.site/Andreas should show "Welcome Andreas " - https://slug_user.toddle.site/Kasper should show "Welcome Kasper " How can I do this ? - reading cookie value from API response and setting cookie in toddle.
chromonav
3 6 months ago
3 Aug 2024, 10:43
use -case brief : calling api /api /method /login with username and password . i recieve 201 response with empty body but cookie is set . Because of CORS restrictions i need to use toddle to proxy . How can i read the cookie and set it in the toddle site . - Has anyone been successful in making a date range picker similar to Airbnb's?
Lucifer
🤔2👍112 6 months ago
26 Jul 2024, 18:24
I 'm trying to do this with the vanilla calendar package and using 2 date entry fields but unsure if this is the right approach . How would you all build this ? I have an API connected to Xano that can accept 2 dates (start & end ) . - Not being able to use Bearer access_token after login with Supabase
roccons
14 6 months ago
25 Jul 2024, 18:51
I already have a succesuful login and I 'm getting my Bearer access _token within the response data , but I 'm not being suceessful at saving it as a Session cookie so when I try to use it in another API request using Bearer access _token for Authentication I get a 401 error with the message "This endpoint requires a Bearer token " . What I am missing ? I attach some images of the configuration of my two API requests . - Authorization header not being sent with API request to Xano
rhymes
11 6 months ago
23 Jul 2024, 06:33
Following the todo tutorial (thank you for the resources ! ) , but am having issues with authenticating requests to Xano . Upon investigating the requests received by Xano , it appears that the Authorization header is missing . I tried the same request with Postman (getting the token from my cookie ) and it worked . The Authorization in the Toddl API window is set to Bearer <access_token and Proxy has been checked . Am I missing a setting somewhere to get my project to send the Authorization header ? PS Unsure if it 's important , but I received a "error code : 521 " in the Toddl window a couple of times - but those requests never hit Xano . Much thanks ! - Changing default styles
Jax Wedel
13 6 months ago
18 Jul 2024, 11:28
I am working on how styling can be done efficiently in Toddle , and I am trying to find out how to do a stylesheet for all elements . I want to avoid having to change every component every time , because that will cause issues and mistakes . But it seems Toddle doesnt support stylesheets , and the advice seems to be to create every element as components , and then style all of those components every time , and then insert them into the app instead of using the basic toddle elements . Which seems a bit strange since you are basically building a stylesheet one by one as components . Is this correct ? Is there no other way to do a stylesheet ? And regarding light /dark mode , I watched the video called "Lights on " https://www.youtube.com/watch?v=_HKZGI6UW_g @Andreas Møller mentions there that there is an easier way to do this in larger apps , is that video out ? Because I would rather do two separate stylesheets than to build in this logic in every component . PS : I see a solution by creating a global variable like "light " and "dark " . But not sure where you do that in Toddle (on root page /homepage ? ) . - Conditional rendering based on the viewport size
Jax Wedel
77 6 months ago
16 Jul 2024, 19:13
How do I set an element to not render when the viewport is below 600px ? I have been looking everywhere for this solution . - How do I handle optional query parameter?
Dan
7 7 months ago
8 Jul 2024, 00:38
I have a button that populates a query parameter only on click . I have a variable with default value null that gets specific value "A " when the button is clicked which will be used as a query parameter in the API request . How do I make this query parameter optional so that when the button is not clicked this parameter is omitted in the request URL ?