JavascriptMick
Explore posts from serversmulti-version rest api
@kapa.ai none of your solutions work. I have updated the discussion here (https://github.com/nitrojs/nitro/discussions/2413#discussioncomment-11601171) in the hope of getting a response from the Nitro team
20 replies
multi-version rest api
@kapa.ai ok so this nearly works, let me explain. This route rules configuration proxys all v2 routes to the base versions...
But what if I have a route that is implemented differently for V2? (e.g. /api/v2/stoopid) the above configuration ensures that the V2 version of the handler is ignored. Is it possible to have a catch all like above but somehow exclude specific routes from the catch all, something like this...
Alternatively, I will need to individually specify proxies for all default routes that have no v2 version. this is simple but tedious.
Here is a discussion that I think is relevant although it is not resolved very clearly (https://github.com/nitrojs/nitro/discussions/2413)
so, I guess my question is, is it possible to include a 'catch all' glob based route in nuxtConfig but also have exclusions to the catch all for specific routes that have V2 version?
20 replies
PPrisma
•Created by JavascriptMick on 11/14/2024 in #help-and-questions
gin index
FTR, this worked
4 replies
PPrisma
•Created by JavascriptMick on 4/21/2024 in #help-and-questions
children and favourite child (ambiguous relation)
ok, never mind I figured it out. I want to apologise to anybody who is triggered by this example. I know these type of relationships can be fraught and vexxed. I only seek to understand.
2 replies
Use onError to change an application error into a TRPCError?
See example in my boilerplate repo here https://github.com/JavascriptMick/nuxt3-boilerplate/blob/master/server/trpc/trpc.ts
8 replies
What are people using for Toasts?
I also wrote a simple wrapper for the DaisyUI Modal that makes it nicer to use https://gist.github.com/JavascriptMick/77838a21d4ec1b5606dd5ae09ad21a67
10 replies
What are people using for Toasts?
oh, also, the creator of DaisyUI has indicated that the suboptimal behaviour of modal will be fixed in version 3 by using the html dialog element https://github.com/saadeghi/daisyui/issues/1341#issuecomment-1504395570
10 replies
What are people using for Toasts?
Got it working, it's not too ugly.. no additional libraries, just Pinia and DaisyUI https://gist.github.com/JavascriptMick/d2830e8703e706fe0a0f6703b0877f3f
10 replies
What are people using for Toasts?
thanks @ven yep I saw this.... and I am concerned about the accessibility aspects that were mentioned e.g. modals not really being modal etc. The consensus though in the comments for that video seemed to be that Daisy didn't have behaviour (js) so it was unreasonable to expect it to do stuff like limiting the tab context. Again, I feel like headless ui has the right approach in that it only does the behaviour and lets you style as you wish.. but headless.ui doesn't have toasts and they apparently don't intend to support them either.
10 replies
What are people using for Toasts?
I think I'm just going to integrate notifications into my Pinia state and use DaisyUI to style them. I looked at all the component libraries and they all feel a bit heavy and when it comes to actually doing the toast behaviours, they don't actually have them (e.g. headless UI and FlowbiteI usually like to get a bit funky with notification state anyway e.g. keeping around a list of notifications that have already 'closed' in case you want to go back to them. If I get this working, will post a link to the source here.
10 replies
Nuxt & Supabase Auth
I don't have your exact problem but I have my supabase auth and guards working pretty good here https://github.com/JavascriptMick/nuxt3-boilerplate hth
7 replies
Global onMounted for Pinia initialisation?
for now I have resolved this by specifying onMounted for every page where the user needs to be initialised. The store function is idempotent and does no work if it is not required. This seems to work.
Thanks for your help @chakraecho
8 replies
Global onMounted for Pinia initialisation?
ok so I did the plugin and it does invoke my store function but now inside the store function, the trpc client supplied by trpc-nuxt is not available via useNuxtApp
[nuxt] [request error] [unhandled] [500] Cannot read properties of undefined (reading 'auth')
8 replies