-
Notifications
You must be signed in to change notification settings - Fork 180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: support hide treeview and entry #477
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
edba8bf
feat: support hide treeview and entry
luhc228 f7b6f08
fix: lint
luhc228 527d46b
chore: change log
luhc228 3df6de1
chore: project-service version
luhc228 aa9c8c3
feat: support status bar iceworks entry quickPick
luhc228 9f4520c
fix: comment
luhc228 02d4d6e
feat: add checkIsPegasusProject method
luhc228 26cd343
fix: comment
luhc228 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { getProjectFramework } from '@iceworks/project-service'; | ||
import i18n from './i18n'; | ||
|
||
const entries = [ | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.projectCreater.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.projectCreater.detail'), | ||
command: 'iceworks-project-creator.start', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.pageBuilder.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.pageBuilder.detail'), | ||
command: 'iceworks-ui-builder.generate-page', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.materialImport.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.materialImport.detail'), | ||
command: 'iceworks-material-helper.start', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.showMaterialDocs.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.showMaterialDocs.detail'), | ||
command: 'iceworks-material-helper.showMaterialDocs', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.runDebug.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.runDebug.detail'), | ||
command: 'iceworksApp.editorMenu.runDebug', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.runBuild.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.runBuild.detail'), | ||
command: 'iceworksApp.editorMenu.runBuild', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.reinstall.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.reinstall.detail'), | ||
command: 'iceworksApp.nodeDependencies.reinstall', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.addDepsAndDevDeps.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.addDepsAndDevDeps.detail'), | ||
command: 'iceworksApp.nodeDependencies.addDepsAndDevDeps', | ||
}, | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.openSettings.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.openSettings.detail'), | ||
command: 'iceworksApp.configHelper.start', | ||
}, | ||
]; | ||
|
||
const optionalEntries = [ | ||
{ | ||
label: i18n.format('extension.iceworksApp.showEntriesQuickPick.generateComponent.label'), | ||
detail: i18n.format('extension.iceworksApp.showEntriesQuickPick.generateComponent.detail'), | ||
command: 'iceworks-ui-builder.generate-component', | ||
}, | ||
]; | ||
|
||
export default async () => { | ||
const projectFramework = await getProjectFramework(); | ||
if (projectFramework === 'icejs') { | ||
const newEntries = [...entries]; | ||
newEntries.splice(1, 0, ...optionalEntries); | ||
return newEntries; | ||
} else { | ||
return entries; | ||
} | ||
}; |
5 changes: 3 additions & 2 deletions
5
extensions/iceworks-app/src/quickPicks/showEntriesQuickPick.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我觉得比较好的实现方式可能是:
这样?
当下可以先简单做。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK