thedevs-network / kutt-extension

🔗✂️ Cross-Browser URL Shortener Extension based on Kutt.it
MIT License
136 stars 37 forks source link

Custom Domains not displaying #119

Open enoy19 opened 3 years ago

enoy19 commented 3 years ago

The custom domains are not shown in the Dropdown. I am hosting Kutt myself on the latest docker image. image image

abhijithvijayan commented 3 years ago

You have to manually configure it in extension settings.

Just enable advance mode(in extension settings) and type in the custom domain. Thats it.

enoy19 commented 3 years ago

thanks for the rapid answer. I configured my kutt server in the advanced options. the problem is that the custom domains are invisible / "empty strings" in the dropdown.

abhijithvijayan commented 3 years ago

Try going to the extension settings page and see if the domain is still shown there.

enoy19 commented 3 years ago

my kutt works with 4 different domains. the default one and 3 extra. Do I need to reconfigure it to use one of the 3 custom domains? isnt that what the dropdown is for?

enoy19 commented 3 years ago

image

enoy19 commented 3 years ago

I've already set my custom host

enoy19 commented 3 years ago

I am able to create a link but I have to guess which one is the correct custom domain.

image

abhijithvijayan commented 3 years ago

So the only problem now is, you are seeing empty strings in the dropdown for all the domains you have configured, right?

And you are able to shorten using all the custom domains.

I will look into this later.

abhijithvijayan commented 3 years ago

Please acknowledge the above scenarios if it is right.

abhijithvijayan commented 3 years ago

Try validating the key once again or press the refresh icon in popup,

If it didnt work still, i will check

enoy19 commented 3 years ago

So the only problem now is, you are seeing empty strings in the dropdown for all the domains you have configured, right?

And you are able to shorten using all the custom domains.

I will look into this later.

correct

enoy19 commented 3 years ago

I tried refreshing but it didn't work. I also tried restarting chrome. didn't work either

eazyAlf commented 3 years ago

same here, empty strings

image

abhijithvijayan commented 3 years ago

Can you share a disposable credentials(api key & custom domain) for me to debug these?

Currently I dont have a custom host setup with custom domains.

abhijithvijayan commented 3 years ago

@enoy19

@eazyAlf

mimalef70 commented 3 years ago

I fix this issue, it's because you use {option} to the select box; I fix this with this code in line 225 ( Form.tsx )

{domainOptions.map(({id, value, disabled = false}) => {
  return (
    <option
      tw="bg-gray-200 "
      value={value}
      disabled={disabled}
      key={id}
    >
      {value.replace(/^(?:https?:\/\/)?(?:www\.)?/i, "").split('/')[0]}
    </option>
  ); 
})}