Fix #715 (closed)
I started to work on this issue, and it starts to look good. Here is the TODO:
Move the form to switch the instance to a dedicated file (
Handle the case where the modal appears when there is no current instance
Replaced the bulleted list of suggested instances by buttons
Enhance the buttons (stand: not nice :/)
Add a link to the current instance
Remove deprecated code in App.vue and Footer.vue
Perform a check whether the given url is a running funkwhale server
Perform a check whether the suggested instances are running funkwhale servers or not, and adapt the color (?) of the button accordingly
<translate>tags including translation context (#662 (closed))
Add a changelog fragment
I would need your help though on how to check the status of a given url. The function
fetchDistantNodeInfo(givenurl.audio) should reach
https://givenurl.audio/api/v1/instance/nodeinfo/2.0/. Depending on the response, it should be quite easy to check if the server is a running funkwhale server or not.
I wanted to perform those requests with
axios, as it seems the dedicated tool to do so, however, the requested url is always
currentinstance.audio/givenurl.audio/api/v1/instance/nodeinfo/2.0/, I can't get it to work outside of the current instance. Even if I use a dedicated instance (see https://github.com/axios/axios#custom-instance-defaults), I still get a request inside the current instance.
How would you perform to make such a request? Is it a good practice to hard code
/api/v1/instance/nodeinfo/2.0/ here (is it really maintainable?)
Sorry for those beginners questions, but I think I could go further if I get some help at this point! Thanks a lot!