Skip to content

Commit 2c7f93b

Browse files
committed
feat: add Directory Score entry item
1 parent 71b58b3 commit 2c7f93b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/extension.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ export async function activate(context: ExtensionContext) {
131131
label: ENTRY_OPTION.CONFIG_PLUGIN,
132132
description: typeof selectedEntry.configPlugin === 'string' ? selectedEntry.configPlugin : 'included'
133133
},
134+
{
135+
label: ENTRY_OPTION.DIRECTORY_SCORE,
136+
description: `$(${selectedEntry.score >= 100 ? 'verified-filled' : 'verified'}) ${selectedEntry.score}/100`
137+
},
134138
...examplesActions,
135139
{ label: 'copy data', kind: QuickPickItemKind.Separator },
136140
!selectedEntry.template && { label: ENTRY_OPTION.COPY_NAME },
@@ -229,6 +233,10 @@ export async function activate(context: ExtensionContext) {
229233
}
230234
break;
231235
}
236+
case ENTRY_OPTION.DIRECTORY_SCORE: {
237+
env.openExternal(Uri.parse(`https://reactnative.directory/scoring`));
238+
break;
239+
}
232240
}
233241

234242
optionPick.hide();

src/utils.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ export enum ENTRY_OPTION {
2121
GO_BACK = '$(newline) Go back to search',
2222
PLATFORMS = 'Platforms',
2323
COMPATIBILITY = 'Compatibility',
24-
CONFIG_PLUGIN = 'Config plugin'
24+
CONFIG_PLUGIN = 'Config plugin',
25+
DIRECTORY_SCORE = 'Directory score'
2526
}
2627

2728
export enum STRINGS {

0 commit comments

Comments
 (0)