Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit03b067b

Browse files
committed
add tasks-template to front of starter-templates page and featured templates
1 parent4048dec commit03b067b

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

‎site/src/pages/CreateTemplateGalleryPage/StarterTemplates.tsx‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,14 @@ const selectTags = (starterTemplatesByTag: StarterTemplatesByTag) => {
2222
:undefined;
2323
};
2424

25-
constsortVisibleTemplates=(templates:TemplateExample[])=>{
26-
// The docker template should be the first template in the list,
27-
// as it's the easiest way to get started with Coder.
28-
constdockerTemplateId="docker";
25+
constmoveTasksOnDockerTemplateToFront=(templates:TemplateExample[])=>{
26+
// The tasks-docker template should be the first template.
27+
consttasksOnDockerTemplateId="tasks-docker";
2928
return[...templates].sort((a,b)=>{
30-
if(a.id===dockerTemplateId){
29+
if(a.id===tasksOnDockerTemplateId){
3130
return-1;
3231
}
33-
if(b.id===dockerTemplateId){
32+
if(b.id===tasksOnDockerTemplateId){
3433
return1;
3534
}
3635
returna.name.localeCompare(b.name);
@@ -50,7 +49,7 @@ export const StarterTemplates: FC<StarterTemplatesProps> = ({
5049
:undefined;
5150
constactiveTag=urlParams.get("tag")??"all";
5251
constvisibleTemplates=starterTemplatesByTag
53-
?sortVisibleTemplates(starterTemplatesByTag[activeTag])
52+
?moveTasksOnDockerTemplateToFront(starterTemplatesByTag[activeTag])
5453
:undefined;
5554

5655
return(

‎site/src/pages/TemplatesPage/EmptyTemplates.tsx‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { docs } from "utils/docs";
1212

1313
// Those are from https://github.com/coder/coder/tree/main/examples/templates
1414
constfeaturedExampleIds=[
15+
"tasks-docker",
1516
"docker",
1617
"kubernetes",
1718
"aws-linux",

‎site/src/theme/icons.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@
108108
"slack.svg",
109109
"sourcegraph-amp.svg",
110110
"swift.svg",
111+
"tasks.svg",
111112
"tensorflow.svg",
112113
"terminal.svg",
113114
"theia.svg",

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp