Self-hosted: setting for the URL the app icon (logo) opens

Aperta
#5,846 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Funzionalità
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Start with src/main/webapp/js/diagramly/App.js and App.prototype.appIconClicked, where the issue identifies the current fallback links and existing GitLab setting. Trace how configuration values reach the app and how the Docker entrypoint exposes settings. Done means the device, browser, and no-file cases use the configured fallback URL when set, preserve current defaults when unset, and have coverage for both behaviors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement
Summary

In a self-hosted draw.io (Docker image jgraph/drawio), clicking the draw.io logo in the top-left corner opens https://www.drawio.com/ when no file is open, and https://get.draw.io/ when the file is saved to the device. For an internal deployment we want it to open our own instance, i.e. DRAWIO_BASE_URL. There is no setting for this.

Where

src/main/webapp/js/diagramly/App.js, App.prototype.appIconClicked (v31.4.5):

else if (mode == App.MODE_DEVICE)
{
this.openLink('https://get.draw.io/');
}
else
{
this.openLink('https://www.drawio.com/');
}

The same function already uses a setting for GitLab (DRAWIO_GITLAB_URL), and file/cloud cases open the file's own location, which is fine.

Request

A configuration option for the fallback link, for example a DRAWIO_CONFIG key or a window.DRAWIO_* variable (e.g. DRAWIO_APP_ICON_URL) that the Docker entrypoint can set from an env var. It would be used for the device/browser/no-file cases and default to today's behaviour when unset.

Workaround we use today

A snippet appended to js/PostConfig.js at container start that wraps App.prototype.appIconClicked and opens window.DRAWIO_BASE_URL for those cases. It works, but it depends on internal function names and can silently break on upgrade, so we'd prefer a supported setting.

Environment
  • jgraph/drawio:31.4.5 Docker image, served from our own domain, DRAWIO_BASE_URL set
Lingua principale
JavaScript
Stelle
9.4k
Fork
1.4k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di jgraph/drawio

Tutte le issue di jgraph/drawio

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.