nioc / xmpp-web

Lightweight web chat client for XMPP server
GNU Affero General Public License v3.0
142 stars 20 forks source link

Default logo reference should not be absolute #119

Closed guusdk closed 6 months ago

guusdk commented 6 months ago

Describe the bug

I'm trying to deploy xmpp-web in a context root of my webserver (eg: https://example/xmppweb).

On the login screen, I'm greeted with a broken image.

It appears that the default location of the image that is used, (when the logoUrl option is left empty) is absolute: /img/icons/android-chrome-192x192.png. This causes the breaking image, as the webapp attempts to download:

https://example/img/icons/android-chrome-192x192.png

instead of:

https://example/xmppweb/img/icons/android-chrome-192x192.png

It is easily worked-around by configuring the relative path in local.js, like this:

  logoUrl: "./img/icons/android-chrome-192x192.png",

... but it'd be nice if this would work out of the box.

Steps to reproduce

No response

Expected behavior

Without specifying a logoUrl, the image that is used by default should be loaded based on a relative, not absolute location.

Relevant log

No response

local.js configuration

No response

XMPP-web version

0.10.0

Installation

Github release archive

XMPP server(s)

Openfire

Browser(s)

Chrome

Device(s)

desktop

Other information

No response

virtadpt commented 6 months ago

Yes, please. This is a problem that's been keeping me from using this application.

guusdk commented 6 months ago

Does the workaround that I described not work for you?

nioc commented 6 months ago

Hi, yes the problem is here: https://github.com/nioc/xmpp-web/blob/master/src%2Fcomponents%2FLogin.vue#L99

I can fix it, do you have any others issues with subfolder usage?

guusdk commented 6 months ago

It is still early days, but I have not found any other of these issues yet!