forked from openkylin/kylin-code
Revert "添加欢迎页面提示可能无法安装的插件信息和GetStart中添加步骤提示安装插件路径。"
This reverts commit 8715534d75
.
This commit is contained in:
parent
cce1685330
commit
0346c0c354
|
@ -144,7 +144,6 @@ export class GettingStartedPage extends EditorPane {
|
|||
private hasScrolledToFirstCategory = false;
|
||||
private recentlyOpenedList?: GettingStartedIndexList<RecentEntry>;
|
||||
private startList?: GettingStartedIndexList<IWelcomePageStartEntry>;
|
||||
private tipsList?: GettingStartedIndexList<RecentEntry>;
|
||||
private gettingStartedList?: GettingStartedIndexList<IResolvedWalkthrough>;
|
||||
|
||||
private stepsSlide!: HTMLElement;
|
||||
|
@ -374,10 +373,6 @@ export class GettingStartedPage extends EditorPane {
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'installExtension':{
|
||||
this.commandService.executeCommand('workbench.extensions.action.installVSIX');
|
||||
break;
|
||||
}
|
||||
case 'selectCategory': {
|
||||
const selectedCategory = this.gettingStartedCategories.find(category => category.id === argument);
|
||||
if (!selectedCategory) { throw Error('Could not find category with ID ' + argument); }
|
||||
|
@ -758,7 +753,6 @@ export class GettingStartedPage extends EditorPane {
|
|||
const rightColumn = $('.categories-column.categories-column-right', {},);
|
||||
|
||||
const startList = this.buildStartList();
|
||||
const tipsList = this.buildTipsList();
|
||||
const recentList = this.buildRecentlyOpenedList();
|
||||
const gettingStartedList = this.buildGettingStartedWalkthroughsList();
|
||||
|
||||
|
@ -771,13 +765,13 @@ export class GettingStartedPage extends EditorPane {
|
|||
const layoutLists = () => {
|
||||
if (gettingStartedList.itemCount) {
|
||||
this.container.classList.remove('noWalkthroughs');
|
||||
reset(leftColumn, startList.getDomElement(), tipsList.getDomElement(),recentList.getDomElement());
|
||||
reset(leftColumn, startList.getDomElement(), recentList.getDomElement());
|
||||
reset(rightColumn, gettingStartedList.getDomElement());
|
||||
recentList.setLimit(5);
|
||||
}
|
||||
else {
|
||||
this.container.classList.add('noWalkthroughs');
|
||||
reset(leftColumn, startList.getDomElement(),tipsList.getDomElement());
|
||||
reset(leftColumn, startList.getDomElement());
|
||||
reset(rightColumn, recentList.getDomElement());
|
||||
recentList.setLimit(10);
|
||||
}
|
||||
|
@ -924,42 +918,6 @@ export class GettingStartedPage extends EditorPane {
|
|||
return recentlyOpenedList;
|
||||
}
|
||||
|
||||
/**
|
||||
*build tips List
|
||||
*RecentEntry here is meaningless, just borrowed to display the contents of empty.
|
||||
*If you really want to display the tipslist as a list later, you need to create an entry to render the HTMLElement.
|
||||
*/
|
||||
private buildTipsList(): GettingStartedIndexList<RecentEntry> {
|
||||
//This code doesn't make sense
|
||||
const renderTips = (entry: RecentEntry) => {
|
||||
const li = $('li');
|
||||
const span = $('span');
|
||||
span.innerText = 'test';
|
||||
span.title = 'test2';
|
||||
li.appendChild(span);
|
||||
return li;
|
||||
};
|
||||
|
||||
if (this.tipsList) { this.tipsList.dispose(); }
|
||||
const tipsList = this.tipsList = new GettingStartedIndexList(// fit GettingStartedIndexList class
|
||||
{
|
||||
title: localize('tipsTitle', "Tips"),
|
||||
klass: 'tips-container',
|
||||
limit: 2,//Meaningless code
|
||||
empty: $('.empty-tips', {},
|
||||
localize('tipsMsg', "If the system creates a new user, some extensions of the new user cannot be installed. In this case, you need to manually install them.Yon can "),
|
||||
$('button.button-link', { 'x-dispatch': 'installExtension' }, localize('installExtension', "install extension")),
|
||||
localize('directory',"to choose extensions path:/usr/share/code-oss/vsix/")),
|
||||
renderElement: renderTips,//Meaningless code
|
||||
contextService: this.contextService
|
||||
});
|
||||
//register button click event
|
||||
tipsList.onDidChange(() => this.registerDispatchListeners());
|
||||
//Parameter array is empty, only display empty content
|
||||
tipsList.setEntries([]);
|
||||
return tipsList;
|
||||
}
|
||||
|
||||
private buildStartList(): GettingStartedIndexList<IWelcomePageStartEntry> {
|
||||
const renderStartEntry = (entry: IWelcomePageStartEntry): HTMLElement =>
|
||||
$('li',
|
||||
|
@ -1078,7 +1036,6 @@ export class GettingStartedPage extends EditorPane {
|
|||
this.detailsPageScrollbar?.scanDomNode();
|
||||
|
||||
this.startList?.layout(size);
|
||||
this.tipsList?.layout(size);
|
||||
this.gettingStartedList?.layout(size);
|
||||
this.recentlyOpenedList?.layout(size);
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/workbench/contrib/welcomeGettingStarted/common/media/extension_install';
|
||||
import 'vs/workbench/contrib/welcomeGettingStarted/common/media/theme_picker';
|
||||
import 'vs/workbench/contrib/welcomeGettingStarted/common/media/notebookProfile';
|
||||
import { localize } from 'vs/nls';
|
||||
|
@ -191,13 +190,6 @@ export const walkthroughs: GettingStartedWalkthroughContent = [
|
|||
content: {
|
||||
type: 'steps',
|
||||
steps: [
|
||||
{
|
||||
id: 'extensionTips',
|
||||
title: localize('gettingStarted.extensionTips.title', "Manual Extension Installation"),
|
||||
description: localize('gettingStarted.extensionTips.description', "If the system creates a new user, some extensions of the new user cannot be installed. In this case, you need to manually install them.\n{0}", Button(localize('installExtension', "Install Extension"), 'command:workbench.extensions.action.installVSIX')),
|
||||
completionEvents:['onCommand:workbench.extensions.action.installVSIX'],
|
||||
media: { type: 'markdown', path: 'extension_install', }
|
||||
},
|
||||
{
|
||||
id: 'pickColorTheme',
|
||||
title: localize('gettingStarted.pickColor.title', "Choose the look you want"),
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { escape } from 'vs/base/common/strings';
|
||||
import { localize } from 'vs/nls';
|
||||
|
||||
export default () => `
|
||||
<span>
|
||||
${escape(localize('directory', "Yon can install extensions path:/usr/share/code-oss/vsix/*.vsix"))}
|
||||
</span>
|
||||
<p>
|
||||
${escape(localize('install', "You can use command install extension:"))}
|
||||
</p>
|
||||
<p>
|
||||
${escape('code --install-extension /usr/share/code-oss/vsix/*.vsix')}
|
||||
</p>
|
||||
`;
|
Loading…
Reference in New Issue