Skip to content

Commit

Permalink
hotfix: scaffolds is empty (#611)
Browse files Browse the repository at this point in the history
* fix: scaffold is empty

* fix: welcome page auto show logic

* docs: changelog for iceworks app

* fix: material sources duplicated (#613)

* fix: material sources duplicated

* chore: changelog

* fix: comment

Co-authored-by: Hengchang Lu <44047106+luhc228@users.noreply.github.com>
  • Loading branch information
alvinhui and luhc228 committed Oct 13, 2020
1 parent b2f0b83 commit 2d2595c
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 12 deletions.
4 changes: 4 additions & 0 deletions extensions/iceworks-app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 0.5.5

- fix: disable auto show welcome page when the application is new

## 0.5.4

- chore: sorting of quick entry
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Iceworks Application Viewer",
"description": "Quick view your Universal Application(React/Rax/Vue, etc).",
"publisher": "iceworks-team",
"version": "0.5.4",
"version": "0.5.5",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
11 changes: 5 additions & 6 deletions extensions/iceworks-app/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ import { showExtensionsQuickPickCommandId, projectExistsTime } from './constants
import showEntriesQuickPick from './quickPicks/showEntriesQuickPick';
import createEditorMenuAction from './utils/createEditorMenuAction';
import createExtensionsStatusBar from './statusBar/createExtensionsStatusBar';
import autoStart, { didShowWelcomePageBySidebarStateKey } from './utils/autoStart';
import autoStart from './utils/autoStart';
import i18n from './i18n';

// eslint-disable-next-line
const { name, version } = require('../package.json');
const recorder = new Recorder(name, version);

export async function activate(context: vscode.ExtensionContext) {
const { subscriptions, extensionPath, globalState } = context;
const { subscriptions, extensionPath } = context;

// auto set configuration & context
initExtension(context, name);
Expand Down Expand Up @@ -159,15 +159,14 @@ export async function activate(context: vscode.ExtensionContext) {
await createEditorMenuAction();
}

// auto start welcome page when the application is new
// TODO auto start welcome page when the application is new
const isNotTargetProject = await checkIsNotTarget();
// get showWelcomePage configuration from settings.json
const isShowWelcomePage = await getDataFromSettingJson('showWelcomePage', true);
if (projectPath && !isNotTargetProject && isShowWelcomePage && !vscode.window.activeTextEditor) {
const curProjectExistsTime = getFolderExistsTime(projectPath);
if (projectExistsTime > curProjectExistsTime) {
vscode.commands.executeCommand('iceworksApp.welcome.start');
globalState.update(didShowWelcomePageBySidebarStateKey, true);
// vscode.commands.executeCommand('iceworksApp.welcome.start');
// globalState.update(didShowWelcomePageBySidebarStateKey, true);
}
}
}
5 changes: 5 additions & 0 deletions extensions/iceworks-project-creator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

## 0.3.15

- fix: material sources display duplicated
- fix: scaffold is empty

## 0.3.14

- feat: custom material sources will be at first in the material sources list
Expand Down
2 changes: 1 addition & 1 deletion extensions/iceworks-project-creator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Iceworks Application Creator",
"description": "Quick create a Universal Application(React/Rax/Vue, etc).",
"publisher": "iceworks-team",
"version": "0.3.14",
"version": "0.3.15",
"engines": {
"vscode": "^1.41.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const ScaffoldMarket = ({
}
content={item.description}
media={item.screenshot}
selected={curProjectField.scaffold.name === item.name}
selected={curProjectField.scaffold && curProjectField.scaffold.name === item.name}
onClick={() => onScaffoldClick(item)}
/>
);
Expand Down Expand Up @@ -226,7 +226,7 @@ const ScaffoldMarket = ({
}
content={item.description}
media={item.screenshot}
selected={curProjectField.scaffold.name === item.name}
selected={curProjectField.scaffold && curProjectField.scaffold.name === item.name}
onClick={() => onScaffoldClick(item)}
/>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/material-service/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@iceworks/material-service",
"version": "0.1.14",
"version": "0.1.15",
"description": "Iceworks material service for VSCode extension.",
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion packages/material-service/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const getSourcesByProjectType = async function () {
return getSources(type);
};

export const getOfficalMaterialSources = () => OFFICAL_MATERIAL_SOURCES;
export const getOfficalMaterialSources = () => [].concat(OFFICAL_MATERIAL_SOURCES);

export const getUserSources = () => getDataFromSettingJson(CONFIGURATION_KEY_MATERIAL_SOURCES);

Expand Down

0 comments on commit 2d2595c

Please sign in to comment.