modernxmpp / easy-xmpp-invitation

Easy XMPP Invitation Landing Page
MIT License
41 stars 19 forks source link

Fast-link to web based client #38

Open sjehuda opened 2 years ago

sjehuda commented 2 years ago

Clients: Candy, Converse.js, JabberWebChat (JWChat), JSXC, Kaiwa, Movim, Speeqe, XMPP Web (1, 2)

We could link https://conversejs.org/fullscreen.html or https://inverse.chat/ where you can login with any account on any server.

Source: @Perflyst at https://github.com/ge0rg/easy-xmpp-invitation/issues/18#issuecomment-570235190

Web-admins will be able to choose a web based client of their choice and enable it, if they choose so.

Configuration file might be as follows:

// If URL set, display button for web client
{client-web: URL}
licaon-kter commented 2 years ago

Also https://github.com/ge0rg/easy-xmpp-invitation/issues/18#issuecomment-570241398

sjehuda commented 1 year ago

Clickable text: "Web clients" "Looking for web based clients?" "Try XMPP without installing" "XMPP inside your browser"

Upon click (using event onclick), the current selection will be replaced by web clients.

sjehuda commented 1 year ago

I've got thiis error for the following code. I've checked the JS code and it works when replacing "#webui > a" by something else (e.g. "body") or when locating the code somewhere else than function load_done().

Error:

Uncaught TypeError: Cannot read property 'addEventListener' of null
    at load_done (main.js:170)
    at HTMLDocument.document.onreadystatechange (main.js:180)

index.html

  <p class="lead text-center" id="clients"></p>
+ <p class="lead text-center" id="webui"></p>
  <p class="lead text-center" id="recommend"></p>

en.json

  "webui": "You can also access from a <a>web client</a> (no installation).",

clients_Web.json

[
    "<a href=\"https://jwchat.org/kaiwa/login.html\"><img src=\"assets/kaiwa.svg\" height=\"60\">Kaiwa</a>",
    "<a href=\"https://movim.hmm.st/\"><img src=\"assets/movim.svg\" height=\"60\">Movim</a>",
    "<a href=\"https://www.libervia.org/\"><img src=\"assets/libervia.svg\" height=\"60\">Libervia</a>",
    "<a href=\"https://conversejs.org/\"><img src=\"assets/conversejs.svg\" height=\"60\">Converse</a>",
    "<a href=\"https://web.xabber.com/\"><img src=\"assets/xabber.svg\" height=\"60\">Xabber</a>"
]

main.js

document.querySelector("#webui > a").addEventListener("click", function() {
    for (const item of document.querySelectorAll("#client_list > div")) {
        item.remove()
    }
    load_clients("clients_Web.json");
});
sjehuda commented 1 year ago

@Perflyst @licaon-kter please help me here.

I don't know what to do in this case of UI design.

sjehuda commented 1 year ago

@strugee

I was just looking at your #1 and #2 PRs. Thank you for your work.

I'd be pleased if you'd kindly look into the recent issues we have posted here. It seems that we are heading to a complete refinement of the current design.