| 1363 | } |
| 1364 | |
| 1365 | func DefaultSupportLinks(docsURL string) []LinkConfig { |
| 1366 | version := buildinfo.Version() |
| 1367 | buildInfo := fmt.Sprintf("Version: [`%s`](%s)", version, buildinfo.ExternalURL()) |
| 1368 | |
| 1369 | return []LinkConfig{ |
| 1370 | { |
| 1371 | Name: "Documentation", |
| 1372 | Target: docsURL, |
| 1373 | Icon: "docs", |
| 1374 | }, |
| 1375 | { |
| 1376 | Name: "Report a bug", |
| 1377 | Target: "https://github.com/coder/coder/issues/new?labels=needs+triage&body=" + buildInfo, |
| 1378 | Icon: "bug", |
| 1379 | }, |
| 1380 | { |
| 1381 | Name: "Join the Coder Discord", |
| 1382 | Target: "https://discord.gg/coder", |
| 1383 | Icon: "chat", |
| 1384 | }, |
| 1385 | { |
| 1386 | Name: "Star the Repo", |
| 1387 | Target: "https://github.com/coder/coder", |
| 1388 | Icon: "star", |
| 1389 | }, |
| 1390 | } |
| 1391 | } |
| 1392 | |
| 1393 | func removeTrailingVersionInfo(v string) string { |
| 1394 | // Strip build metadata (everything after '+'). |