Add an option to set the favicon and PWA icon, like --app-name

Offen
#8,145 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
51/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
typescript
Bereich
frontend, web-dev

Rechercherichtung

Start by reading the existing --app-name option and how src/browser/media/ assets are served. Trace the references to favicon-dark-support.svg, favicon.ico, manifest.json, pwa-icon-192.png, pwa-icon-512.png, and the apple-touch-icon links. Done means an accepted option name lets operators provide an SVG or PNG used for both the page favicon and PWA icons; confirm the expected behavior and tests with maintainers.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

What is your suggestion?

A flag to set the icon code-server serves for its pages, alongside the existing --app-name. For example --app-icon <path>, taking an SVG or PNG file, used for:

  • the page favicon (today favicon-dark-support.svg and favicon.ico)
  • the PWA icons referenced by manifest.json and the apple-touch-icon links (today pwa-icon-192.png and pwa-icon-512.png)

Why do you want this feature?

--app-name already lets an operator name the app, e.g. --app-name "VS Code" turns the tab title into <folder> — VS Code. The icon can't be changed the same way, so the tab and an installed PWA show the code-server logo next to that name.

When code-server runs as one app among several in a developer environment, users pick the editor out of their tabs and dock by its icon. A configurable icon would let operators match the name they set.

Are there any workarounds to get this functionality today?

Only replacing the files under src/browser/media/ in the installed release. That relies on the package's internal layout and silently breaks when an upgrade renames or adds icon files.

Are you interested in submitting a PR for this?

Possibly. Guidance on whether a flag like this would be accepted, and its preferred name, would help.

Vorherrschende Sprache
TypeScript
Sterne
79.9k
Forks
6.9k
Ø Merge
20 Std. 21 Min.
Gemergte PRs (30 T.)
51

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus coder/code-server

Alle Issues in coder/code-server

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.