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

Ouverte
#8,145 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
51/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
Active
Stack technique
typescript
Domaine
frontend, web-dev

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
TypeScript
Étoiles
79.9k
Forks
6.9k
Merge moyen
20 h 21 min
PR mergées (30 j)
51

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de coder/code-server

Toutes les issues de coder/code-server

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.