fix: show current host if configured api url is /api/v1 instead of "" #994

Merged
konrad merged 2 commits from fix/show-current-host into main 2021-11-14 16:16:06 +00:00
Owner
No description provided.
konrad added 1 commit 2021-11-13 20:35:41 +00:00
Member

Hi konrad!

Thank you for creating a PR!

I've deployed the changes of this PR on a preview environment under this URL: https://994-fixshow-current-host--vikunja-frontend-preview.netlify.app

You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.

Have a nice day!

Beep boop, I'm a bot.

Hi konrad! Thank you for creating a PR! I've deployed the changes of this PR on a preview environment under this URL: https://994-fixshow-current-host--vikunja-frontend-preview.netlify.app You can use this url to view the changes live and test them out. You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/. Have a nice day! > Beep boop, I'm a bot.
dpschen requested changes 2021-11-14 12:57:43 +00:00
@ -69,2 +69,3 @@
apiDomain() {
return parseURL(this.apiUrl).host
const configuredHost = parseURL(this.apiUrl).host
if (configuredHost) {

Picky: return once and use ternary operator~

Maybe even better:

return parseURL(this.apiUrl).host || parseURL(window.location.href).host
Picky: ~~return once and use ternary operator~~~ Maybe even better: ```js return parseURL(this.apiUrl).host || parseURL(window.location.href).host ```
Author
Owner

That looks nice. Changed!

That looks nice. Changed!
konrad marked this conversation as resolved
konrad added 1 commit 2021-11-14 15:53:53 +00:00
continuous-integration/drone/pr Build is passing Details
e6e53d098b
chore: simplify check
dpschen approved these changes 2021-11-14 15:56:01 +00:00
konrad merged commit 31f344503c into main 2021-11-14 16:16:06 +00:00
konrad deleted branch fix/show-current-host 2021-11-14 16:16:06 +00:00
This repo is archived. You cannot comment on pull requests.
No description provided.