提交 d928313d 编写于 作者: P pi1024e

Revert "Fixed formatting"

This reverts commit 30d7dc8a3f5ef8a8d8a702da2dc4517a0f64f1d4.
上级 afcd2bc3
...@@ -821,13 +821,13 @@ export class ExtensionEditor extends BaseEditor { ...@@ -821,13 +821,13 @@ export class ExtensionEditor extends BaseEditor {
if (contrib.length) { if (contrib.length) {
const details = $('details', { open: true, ontoggle: onDetailsToggle }, const details = $('details', { open: true, ontoggle: onDetailsToggle },
$('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)), $('summary', undefined, localize('colorThemes', "Color Themes ({0})", contrib.length)),
$('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label)))
); );
append(container, details); append(container, details);
return true; return true;
} return false; } return false;
} }
...@@ -838,13 +838,13 @@ export class ExtensionEditor extends BaseEditor { ...@@ -838,13 +838,13 @@ export class ExtensionEditor extends BaseEditor {
if (contrib.length) { if (contrib.length) {
const details = $('details', { open: true, ontoggle: onDetailsToggle }, const details = $('details', { open: true, ontoggle: onDetailsToggle },
$('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)), $('summary', undefined, localize('iconThemes', "Icon Themes ({0})", contrib.length)),
$('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label))) $('ul', undefined, ...contrib.map(theme => $('li', undefined, theme.label)))
); );
append(container, details); append(container, details);
return true; return true;
} }
return false; return false;
} }
...@@ -970,33 +970,33 @@ export class ExtensionEditor extends BaseEditor { ...@@ -970,33 +970,33 @@ export class ExtensionEditor extends BaseEditor {
if (commands.length) { if (commands.length) {
const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => { const renderKeybinding = (keybinding: ResolvedKeybinding): HTMLElement => {
const element = $(''); const element = $('');
new KeybindingLabel(element, OS).set(keybinding); new KeybindingLabel(element, OS).set(keybinding);
return element; return element;
}; };
const details = $('details', { open: true, ontoggle: onDetailsToggle }, const details = $('details', { open: true, ontoggle: onDetailsToggle },
$('summary', undefined, localize('commands', "Commands ({0})", commands.length)), $('summary', undefined, localize('commands', "Commands ({0})", commands.length)),
$('table', undefined, $('table', undefined,
$('tr', undefined, $('tr', undefined,
$('th', undefined, localize('command name', "Name")), $('th', undefined, localize('command name', "Name")),
$('th', undefined, localize('description', "Description")), $('th', undefined, localize('description', "Description")),
$('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")), $('th', undefined, localize('keyboard shortcuts', "Keyboard Shortcuts")),
$('th', undefined, localize('menuContexts', "Menu Contexts")) $('th', undefined, localize('menuContexts', "Menu Contexts"))
), ),
...commands.map(c => $('tr', undefined, ...commands.map(c => $('tr', undefined,
$('td', undefined, $('code', undefined, c.id)), $('td', undefined, $('code', undefined, c.id)),
$('td', undefined, c.title), $('td', undefined, c.title),
$('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))), $('td', undefined, ...c.keybindings.map(keybinding => renderKeybinding(keybinding))),
$('td', undefined, ...c.menus.map(context => $('code', undefined, context))) $('td', undefined, ...c.menus.map(context => $('code', undefined, context)))
)) ))
) )
); );
append(container, details); append(container, details);
return true; return true;
} return false; } return false;
} }
private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean { private renderLanguages(container: HTMLElement, manifest: IExtensionManifest, onDetailsToggle: Function): boolean {
...@@ -1043,28 +1043,28 @@ export class ExtensionEditor extends BaseEditor { ...@@ -1043,28 +1043,28 @@ export class ExtensionEditor extends BaseEditor {
if (languages.length) { if (languages.length) {
const details = $('details', { open: true, ontoggle: onDetailsToggle }, const details = $('details', { open: true, ontoggle: onDetailsToggle },
$('summary', undefined, localize('languages', "Languages ({0})", languages.length)), $('summary', undefined, localize('languages', "Languages ({0})", languages.length)),
$('table', undefined, $('table', undefined,
$('tr', undefined, $('tr', undefined,
$('th', undefined, localize('language id', "ID")), $('th', undefined, localize('language id', "ID")),
$('th', undefined, localize('language name', "Name")), $('th', undefined, localize('language name', "Name")),
$('th', undefined, localize('file extensions', "File Extensions")), $('th', undefined, localize('file extensions', "File Extensions")),
$('th', undefined, localize('grammar', "Grammar")), $('th', undefined, localize('grammar', "Grammar")),
$('th', undefined, localize('snippets', "Snippets")) $('th', undefined, localize('snippets', "Snippets"))
), ),
...languages.map(l => $('tr', undefined, ...languages.map(l => $('tr', undefined,
$('td', undefined, l.id), $('td', undefined, l.id),
$('td', undefined, l.name), $('td', undefined, l.name),
$('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')), $('td', undefined, ...join(l.extensions.map(ext => $('code', undefined, ext)), ' ')),
$('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '')), $('td', undefined, document.createTextNode(l.hasGrammar ? '✔︎' : '')),
$('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : '')) $('td', undefined, document.createTextNode(l.hasSnippets ? '✔︎' : ''))
)) ))
) )
); );
append(container, details); append(container, details);
return true; return true;
} return false; } return false;
} }
...@@ -1084,6 +1084,7 @@ export class ExtensionEditor extends BaseEditor { ...@@ -1084,6 +1084,7 @@ export class ExtensionEditor extends BaseEditor {
return null; return null;
} }
private loadContents<T>(loadingTask: () => CacheResult<T>): Promise<T> { private loadContents<T>(loadingTask: () => CacheResult<T>): Promise<T> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册