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

Đang mở
#8,145 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
51/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend, web-dev

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
79.9k
Fork
6.9k
Merge trung bình
20 giờ 21 phút
Pull request đã merge (30 ngày)
51

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của coder/code-server

Tất cả issue của coder/code-server

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.