Compare commits
13 Commits
1.868-vsc1
...
1.939-vsc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bc6e1a457 | ||
|
|
e61ea796c6 | ||
|
|
d073622629 | ||
|
|
5f40ebb845 | ||
|
|
c56e2797cc | ||
|
|
166efcb17e | ||
|
|
206e107a9a | ||
|
|
12c8b5d337 | ||
|
|
4aa20fd864 | ||
|
|
0cd4e46055 | ||
|
|
f51823b51f | ||
|
|
55bfeab208 | ||
|
|
309d15cefd |
@@ -23,6 +23,10 @@ docker run -it -p 127.0.0.1:8443:8443 -v "${PWD}:/home/coder/project" codercom/c
|
|||||||
|
|
||||||
## Getting Started
|
## Getting Started
|
||||||
|
|
||||||
|
### Run over SSH
|
||||||
|
|
||||||
|
Use [sshcode](https://github.com/codercom/sshcode) for a simple setup.
|
||||||
|
|
||||||
### Docker
|
### Docker
|
||||||
|
|
||||||
See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile).
|
See docker oneliner mentioned above. Dockerfile is at [/Dockerfile](/Dockerfile).
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Options:
|
|||||||
--cert <value>
|
--cert <value>
|
||||||
--cert-key <value>
|
--cert-key <value>
|
||||||
-e, --extensions-dir <dir> Set the root path for extensions.
|
-e, --extensions-dir <dir> Set the root path for extensions.
|
||||||
-d --user-data-dir <dir> Specifies the directory that user data is kept in, useful when running as root.
|
-d --user-data-dir <dir> Specifies the directory that user data is kept in, useful when running as root.
|
||||||
--data-dir <value> DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.
|
--data-dir <value> DEPRECATED: Use '--user-data-dir' instead. Customize where user-data is stored.
|
||||||
-h, --host <value> Customize the hostname. (default: "0.0.0.0")
|
-h, --host <value> Customize the hostname. (default: "0.0.0.0")
|
||||||
-o, --open Open in the browser on startup.
|
-o, --open Open in the browser on startup.
|
||||||
@@ -52,7 +52,7 @@ Options:
|
|||||||
-H, --allow-http Allow http connections.
|
-H, --allow-http Allow http connections.
|
||||||
-P, --password <value> Specify a password for authentication.
|
-P, --password <value> Specify a password for authentication.
|
||||||
--disable-telemetry Disables ALL telemetry.
|
--disable-telemetry Disables ALL telemetry.
|
||||||
-h, --help output usage information
|
--help output usage information
|
||||||
```
|
```
|
||||||
|
|
||||||
### Data Directory
|
### Data Directory
|
||||||
|
|||||||
@@ -28,8 +28,9 @@ commander.version(process.env.VERSION || "development")
|
|||||||
.option("-p, --port <number>", "Port to bind on.", parseInt(process.env.PORT!, 10) || 8443)
|
.option("-p, --port <number>", "Port to bind on.", parseInt(process.env.PORT!, 10) || 8443)
|
||||||
.option("-N, --no-auth", "Start without requiring authentication.", undefined)
|
.option("-N, --no-auth", "Start without requiring authentication.", undefined)
|
||||||
.option("-H, --allow-http", "Allow http connections.", false)
|
.option("-H, --allow-http", "Allow http connections.", false)
|
||||||
.option("-P, --password <value>", "Specify a password for authentication.")
|
.option("-P, --password <value>", "DEPRECATED: Use the PASSWORD environment variable instead. Specify a password for authentication.")
|
||||||
.option("--disable-telemetry", "Disables ALL telemetry.", false)
|
.option("--disable-telemetry", "Disables ALL telemetry.", false)
|
||||||
|
.option("--socket <value>", "Listen on a UNIX socket. Host and port will be ignored when set.")
|
||||||
.option("--install-extension <value>", "Install an extension by its ID.")
|
.option("--install-extension <value>", "Install an extension by its ID.")
|
||||||
.option("--bootstrap-fork <name>", "Used for development. Never set.")
|
.option("--bootstrap-fork <name>", "Used for development. Never set.")
|
||||||
.option("--extra-args <args>", "Used for development. Never set.")
|
.option("--extra-args <args>", "Used for development. Never set.")
|
||||||
@@ -63,6 +64,7 @@ const bold = (text: string | number): string | number => {
|
|||||||
readonly open?: boolean;
|
readonly open?: boolean;
|
||||||
readonly cert?: string;
|
readonly cert?: string;
|
||||||
readonly certKey?: string;
|
readonly certKey?: string;
|
||||||
|
readonly socket?: string;
|
||||||
|
|
||||||
readonly installExtension?: string;
|
readonly installExtension?: string;
|
||||||
|
|
||||||
@@ -209,7 +211,11 @@ const bold = (text: string | number): string | number => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
let password = options.password;
|
if (options.password) {
|
||||||
|
logger.warn('"--password" is deprecated. Use the PASSWORD environment variable instead.');
|
||||||
|
}
|
||||||
|
|
||||||
|
let password = options.password || process.env.PASSWORD;
|
||||||
if (!password) {
|
if (!password) {
|
||||||
// Generate a random password with a length of 24.
|
// Generate a random password with a length of 24.
|
||||||
const buffer = Buffer.alloc(12);
|
const buffer = Buffer.alloc(12);
|
||||||
@@ -263,7 +269,11 @@ const bold = (text: string | number): string | number => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
logger.info("Starting webserver...", field("host", options.host), field("port", options.port));
|
logger.info("Starting webserver...", field("host", options.host), field("port", options.port));
|
||||||
app.server.listen(options.port, options.host);
|
if (options.socket) {
|
||||||
|
app.server.listen(options.socket);
|
||||||
|
} else {
|
||||||
|
app.server.listen(options.port, options.host);
|
||||||
|
}
|
||||||
let clientId = 1;
|
let clientId = 1;
|
||||||
app.wss.on("connection", (ws, req) => {
|
app.wss.on("connection", (ws, req) => {
|
||||||
const id = clientId++;
|
const id = clientId++;
|
||||||
@@ -280,7 +290,11 @@ const bold = (text: string | number): string | number => {
|
|||||||
});
|
});
|
||||||
app.wss.on("error", (err: NodeJS.ErrnoException) => {
|
app.wss.on("error", (err: NodeJS.ErrnoException) => {
|
||||||
if (err.code === "EADDRINUSE") {
|
if (err.code === "EADDRINUSE") {
|
||||||
logger.error(`Port ${bold(options.port)} is in use. Please free up port ${options.port} or specify a different port with the -p flag`);
|
if (options.socket) {
|
||||||
|
logger.error(`Socket ${bold(options.socket)} is in use. Please specify a different socket.`);
|
||||||
|
} else {
|
||||||
|
logger.error(`Port ${bold(options.port)} is in use. Please free up port ${options.port} or specify a different port with the -p flag`);
|
||||||
|
}
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -270,9 +270,12 @@ class Dialog {
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If it's a directory, we want to navigate to it. If it's a file, then we
|
||||||
|
// only want to open it if opening files is supported.
|
||||||
if (element.isDirectory) {
|
if (element.isDirectory) {
|
||||||
this.path = element.fullPath;
|
this.path = element.fullPath;
|
||||||
} else if (!(this.options as OpenDialogOptions).properties.openDirectory) {
|
} else if ((this.options as OpenDialogOptions).properties.openFile) {
|
||||||
this.selectEmitter.emit(element.fullPath);
|
this.selectEmitter.emit(element.fullPath);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -288,16 +291,18 @@ class Dialog {
|
|||||||
});
|
});
|
||||||
buttonsNode.appendChild(cancelBtn);
|
buttonsNode.appendChild(cancelBtn);
|
||||||
const confirmBtn = document.createElement("button");
|
const confirmBtn = document.createElement("button");
|
||||||
const openFile = (this.options as OpenDialogOptions).properties.openFile;
|
const openDirectory = (this.options as OpenDialogOptions).properties.openDirectory;
|
||||||
confirmBtn.innerText = openFile ? "Open" : "Confirm";
|
confirmBtn.innerText = this.options.buttonLabel || "Confirm";
|
||||||
confirmBtn.addEventListener("click", () => {
|
confirmBtn.addEventListener("click", () => {
|
||||||
if (this._path && !openFile) {
|
if (this._path && openDirectory) {
|
||||||
this.selectEmitter.emit(this._path);
|
this.selectEmitter.emit(this._path);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// Since a single click opens a file, the only time this button can be
|
// Disable if we can't open directories, otherwise you can open a directory
|
||||||
// used is on a directory, which is invalid for opening files.
|
// as a file which won't work. This is because our button currently just
|
||||||
if (openFile) {
|
// always opens whatever directory is opened and will not open selected
|
||||||
|
// files. (A single click on a file is used to open it instead.)
|
||||||
|
if (!openDirectory) {
|
||||||
confirmBtn.disabled = true;
|
confirmBtn.disabled = true;
|
||||||
}
|
}
|
||||||
buttonsNode.appendChild(confirmBtn);
|
buttonsNode.appendChild(confirmBtn);
|
||||||
@@ -407,8 +412,9 @@ class Dialog {
|
|||||||
isDirectory: stat.isDirectory(),
|
isDirectory: stat.isDirectory(),
|
||||||
lastModified: stat.mtime.toDateString(),
|
lastModified: stat.mtime.toDateString(),
|
||||||
size: stat.size,
|
size: stat.size,
|
||||||
// If we are opening a directory, show files as disabled.
|
// If we can't open files, show them as disabled.
|
||||||
isDisabled: !stat.isDirectory() && (this.options as OpenDialogOptions).properties.openDirectory,
|
isDisabled: !stat.isDirectory()
|
||||||
|
&& !(this.options as OpenDialogOptions).properties.openFile,
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,17 @@ import * as vscodeTextmate from "../../../../lib/vscode/node_modules/vscode-text
|
|||||||
|
|
||||||
const target = vscodeTextmate as typeof vscodeTextmate;
|
const target = vscodeTextmate as typeof vscodeTextmate;
|
||||||
|
|
||||||
|
const ctx = (require as any).context("../../../../lib/extensions", true, /.*\.tmLanguage.json$/);
|
||||||
|
// Maps grammar scope to loaded grammar
|
||||||
|
const scopeToGrammar = {} as any;
|
||||||
|
|
||||||
|
ctx.keys().forEach((key: string) => {
|
||||||
|
const value = ctx(key);
|
||||||
|
if (value.scopeName) {
|
||||||
|
scopeToGrammar[value.scopeName] = value;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
target.Registry = class Registry extends vscodeTextmate.Registry {
|
target.Registry = class Registry extends vscodeTextmate.Registry {
|
||||||
public constructor(opts: vscodeTextmate.RegistryOptions) {
|
public constructor(opts: vscodeTextmate.RegistryOptions) {
|
||||||
super({
|
super({
|
||||||
@@ -21,6 +32,13 @@ target.Registry = class Registry extends vscodeTextmate.Registry {
|
|||||||
}).catch(reason => rej(reason));
|
}).catch(reason => rej(reason));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
loadGrammar: async (scopeName: string) => {
|
||||||
|
if (scopeToGrammar[scopeName]) {
|
||||||
|
return scopeToGrammar[scopeName];
|
||||||
|
}
|
||||||
|
|
||||||
|
return opts.loadGrammar(scopeName);
|
||||||
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -142,8 +142,8 @@ export class WindowsService implements IWindowsService {
|
|||||||
return [await showOpenDialog({
|
return [await showOpenDialog({
|
||||||
...(options || {}),
|
...(options || {}),
|
||||||
properties: {
|
properties: {
|
||||||
openDirectory: true,
|
openDirectory: options && options.properties && options.properties.includes("openDirectory") || false,
|
||||||
openFile: true,
|
openFile: options && options.properties && options.properties.includes("openFile") || false,
|
||||||
},
|
},
|
||||||
})];
|
})];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,3 +53,7 @@
|
|||||||
width: 56px !important;
|
width: 56px !important;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.window-controls-container {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
@@ -175,7 +175,7 @@ index 1f8b17a..2a875f9 100644
|
|||||||
+ await cli.main(args);
|
+ await cli.main(args);
|
||||||
+ return; // Always just do this for now.
|
+ return; // Always just do this for now.
|
||||||
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
|
diff --git a/src/vs/editor/browser/config/configuration.ts b/src/vs/editor/browser/config/configuration.ts
|
||||||
index f97a692..0206957 100644
|
index f97a692..8059a67 100644
|
||||||
--- a/src/vs/editor/browser/config/configuration.ts
|
--- a/src/vs/editor/browser/config/configuration.ts
|
||||||
+++ b/src/vs/editor/browser/config/configuration.ts
|
+++ b/src/vs/editor/browser/config/configuration.ts
|
||||||
@@ -10 +9,0 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
@@ -10 +9,0 @@ import { Disposable } from 'vs/base/common/lifecycle';
|
||||||
@@ -187,9 +187,6 @@ index f97a692..0206957 100644
|
|||||||
@@ -367 +366 @@ export class Configuration extends CommonEditorConfiguration {
|
@@ -367 +366 @@ export class Configuration extends CommonEditorConfiguration {
|
||||||
- if (platform.isMacintosh) {
|
- if (platform.isMacintosh) {
|
||||||
+ if (browser.isMacintosh) {
|
+ if (browser.isMacintosh) {
|
||||||
@@ -378 +377 @@ export class Configuration extends CommonEditorConfiguration {
|
|
||||||
- emptySelectionClipboard: browser.isWebKit || browser.isFirefox,
|
|
||||||
+ emptySelectionClipboard: false, // browser.isWebKit || browser.isFirefox,
|
|
||||||
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
|
diff --git a/src/vs/editor/browser/controller/mouseHandler.ts b/src/vs/editor/browser/controller/mouseHandler.ts
|
||||||
index b3b4472..f888d63 100644
|
index b3b4472..f888d63 100644
|
||||||
--- a/src/vs/editor/browser/controller/mouseHandler.ts
|
--- a/src/vs/editor/browser/controller/mouseHandler.ts
|
||||||
@@ -250,32 +247,57 @@ index c69ea3f..b8d87f7 100644
|
|||||||
-const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;
|
-const GOLDEN_LINE_HEIGHT_RATIO = platform.isMacintosh ? 1.5 : 1.35;
|
||||||
+const GOLDEN_LINE_HEIGHT_RATIO = browser.isMacintosh ? 1.5 : 1.35;
|
+const GOLDEN_LINE_HEIGHT_RATIO = browser.isMacintosh ? 1.5 : 1.35;
|
||||||
diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts
|
diff --git a/src/vs/editor/contrib/clipboard/clipboard.ts b/src/vs/editor/contrib/clipboard/clipboard.ts
|
||||||
index 990be3a..8a326c6 100644
|
index 990be3a..4bec789 100644
|
||||||
--- a/src/vs/editor/contrib/clipboard/clipboard.ts
|
--- a/src/vs/editor/contrib/clipboard/clipboard.ts
|
||||||
+++ b/src/vs/editor/contrib/clipboard/clipboard.ts
|
+++ b/src/vs/editor/contrib/clipboard/clipboard.ts
|
||||||
@@ -29 +29,2 @@ const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE)
|
@@ -18,0 +19 @@ import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegis
|
||||||
|
+import { clipboard } from 'electron';
|
||||||
|
@@ -29 +30,2 @@ const supportsCopyWithSyntaxHighlighting = (supportsCopy && !browser.isEdgeOrIE)
|
||||||
-const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
|
-const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
|
||||||
+// const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
|
+// const supportsPaste = (platform.isNative || (!browser.isChrome && document.queryCommandSupported('paste')));
|
||||||
+const supportsPaste = true;
|
+const supportsPaste = true;
|
||||||
@@ -176,0 +178 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
@@ -54,0 +57 @@ abstract class ExecCommandAction extends EditorAction {
|
||||||
|
+ console.log(document.activeElement!.cloneNode(true));
|
||||||
|
@@ -71 +74 @@ class ExecCommandCutAction extends ExecCommandAction {
|
||||||
|
- kbOpts = null;
|
||||||
|
+ // kbOpts = null;
|
||||||
|
@@ -119 +122 @@ class ExecCommandCopyAction extends ExecCommandAction {
|
||||||
|
- kbOpts = null;
|
||||||
|
+ // kbOpts = null;
|
||||||
|
@@ -174 +177 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
||||||
|
- kbOpts = null;
|
||||||
|
+ // kbOpts = null;
|
||||||
|
@@ -176,0 +180 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
||||||
+ const { workbench } = require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench');
|
+ const { workbench } = require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench');
|
||||||
@@ -181 +183 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
@@ -181 +185 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
||||||
- precondition: EditorContextKeys.writable,
|
- precondition: EditorContextKeys.writable,
|
||||||
+ precondition: (require('vs/platform/contextkey/common/contextkey') as typeof import('vs/platform/contextkey/common/contextkey')).ContextKeyExpr.and(EditorContextKeys.writable, workbench.clipboardContextKey),
|
+ precondition: (require('vs/platform/contextkey/common/contextkey') as typeof import('vs/platform/contextkey/common/contextkey')).ContextKeyExpr.and(EditorContextKeys.writable, workbench.clipboardContextKey),
|
||||||
@@ -191 +193,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
@@ -191 +195,2 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
||||||
- order: 3
|
- order: 3
|
||||||
+ order: 3,
|
+ order: 3,
|
||||||
+ when: workbench.clipboardContextKey,
|
+ when: workbench.clipboardContextKey,
|
||||||
@@ -194,0 +198,14 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
@@ -194,0 +200,26 @@ class ExecCommandPasteAction extends ExecCommandAction {
|
||||||
+
|
+
|
||||||
+ public async run(accessor, editor: ICodeEditor): Promise<void> {
|
+ public async run(accessor, editor: ICodeEditor): Promise<void> {
|
||||||
+ if (editor instanceof (require('vs/editor/browser/widget/codeEditorWidget') as typeof import('vs/editor/browser/widget/codeEditorWidget')).CodeEditorWidget) {
|
+ if (editor instanceof (require('vs/editor/browser/widget/codeEditorWidget') as typeof import('vs/editor/browser/widget/codeEditorWidget')).CodeEditorWidget) {
|
||||||
+ try {
|
+ try {
|
||||||
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
|
+ editor.focus();
|
||||||
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
|
+ const textInput = document.activeElement! as HTMLTextAreaElement;
|
||||||
|
+ const dataTransfer = new DataTransfer();
|
||||||
|
+ const value = await clipboard.readText();
|
||||||
|
+ dataTransfer.setData("text/plain", value);
|
||||||
|
+ const pasteEvent = new ClipboardEvent("paste", {
|
||||||
|
+ clipboardData: dataTransfer,
|
||||||
+ });
|
+ });
|
||||||
|
+ textInput.dispatchEvent(pasteEvent);
|
||||||
+ } catch (ex) {
|
+ } catch (ex) {
|
||||||
+ super.run(accessor, editor);
|
+ try {
|
||||||
|
+ editor.trigger('', (require('vs/editor/common/editorCommon') as typeof import ('vs/editor/common/editorCommon')).Handler.Paste, {
|
||||||
|
+ text: await (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.clipboardText,
|
||||||
|
+ });
|
||||||
|
+ } catch (ex) {
|
||||||
|
+ super.run(accessor, editor);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ } else {
|
+ } else {
|
||||||
+ super.run(accessor, editor);
|
+ super.run(accessor, editor);
|
||||||
@@ -398,19 +420,35 @@ index 7b6ad89..3190356 100644
|
|||||||
- return;
|
- return;
|
||||||
+ return (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex);
|
+ return (require('vs/../../../../packages/vscode/src/workbench') as typeof import ('vs/../../../../packages/vscode/src/workbench')).workbench.handleDrop(event, resolveTargetGroup, afterDrop, targetIndex);
|
||||||
diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts
|
diff --git a/src/vs/workbench/browser/layout.ts b/src/vs/workbench/browser/layout.ts
|
||||||
index c25c940..9f11d98 100644
|
index c25c940..f2004f8 100644
|
||||||
--- a/src/vs/workbench/browser/layout.ts
|
--- a/src/vs/workbench/browser/layout.ts
|
||||||
+++ b/src/vs/workbench/browser/layout.ts
|
+++ b/src/vs/workbench/browser/layout.ts
|
||||||
@@ -12 +12 @@ import { Registry } from 'vs/platform/registry/common/platform';
|
@@ -12 +12 @@ import { Registry } from 'vs/platform/registry/common/platform';
|
||||||
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
|
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
|
||||||
+import { isWindows, isLinux, isMacintosh, isNative, isWeb } from 'vs/base/common/platform';
|
+import { isWindows, isLinux, isMacintosh, isNative } from 'vs/base/common/platform';
|
||||||
@@ -210 +210 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
@@ -210 +210 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
- if ((isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
|
- if ((isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
|
||||||
+ if ((isWeb || isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
|
+ // if ((isWeb || isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
|
||||||
@@ -535 +535 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
@@ -212 +212 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
|
- }
|
||||||
|
+ // }
|
||||||
|
@@ -219 +219 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
|
- if (this.state.fullscreen && (this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default')) {
|
||||||
|
+ if ((this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default')) {
|
||||||
|
@@ -531 +531,5 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
|
- if (getTitleBarStyle(this.configurationService, this.environmentService) === 'native') {
|
||||||
|
+ if (this.state.menuBar.visibility === 'hidden') {
|
||||||
|
+ return false;
|
||||||
|
+ } else if (this.state.menuBar.visibility === 'toggle') {
|
||||||
|
+ return this.state.menuBar.toggled;
|
||||||
|
+ } else if (getTitleBarStyle(this.configurationService, this.environmentService) === 'native') {
|
||||||
|
@@ -535 +539 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
- } else if (isMacintosh) {
|
- } else if (isMacintosh) {
|
||||||
+ } else if (isNative && isMacintosh) {
|
+ } else if (isNative && isMacintosh) {
|
||||||
@@ -567 +567 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
@@ -539,2 +542,0 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
|
- } else if (this.state.menuBar.visibility === 'toggle' || this.state.menuBar.visibility === 'default') {
|
||||||
|
- return this.state.menuBar.toggled;
|
||||||
|
@@ -567 +569 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
||||||
- if (isMacintosh || this.state.menuBar.visibility === 'hidden') {
|
- if (isMacintosh || this.state.menuBar.visibility === 'hidden') {
|
||||||
+ if ((isNative && isMacintosh) || this.state.menuBar.visibility === 'hidden') {
|
+ if ((isNative && isMacintosh) || this.state.menuBar.visibility === 'hidden') {
|
||||||
diff --git a/src/vs/workbench/browser/legacyLayout.ts b/src/vs/workbench/browser/legacyLayout.ts
|
diff --git a/src/vs/workbench/browser/legacyLayout.ts b/src/vs/workbench/browser/legacyLayout.ts
|
||||||
@@ -522,7 +560,7 @@ index a822341..43b882a 100644
|
|||||||
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
|
- if (!isMacintosh && this.currentTitlebarStyleSetting === 'custom') {
|
||||||
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
|
+ if (!(isNative && isMacintosh) && this.currentTitlebarStyleSetting === 'custom') {
|
||||||
diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
|
diff --git a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
|
||||||
index 028f375..4bfe956 100644
|
index 028f375..f740471 100644
|
||||||
--- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
|
--- a/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
|
||||||
+++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
|
+++ b/src/vs/workbench/browser/parts/titlebar/titlebarPart.ts
|
||||||
@@ -11 +11 @@ import { ITitleService, ITitleProperties } from 'vs/workbench/services/title/com
|
@@ -11 +11 @@ import { ITitleService, ITitleProperties } from 'vs/workbench/services/title/com
|
||||||
@@ -536,7 +574,10 @@ index 028f375..4bfe956 100644
|
|||||||
+ if (!(isNative && isMacintosh)) {
|
+ if (!(isNative && isMacintosh)) {
|
||||||
@@ -343 +343 @@ export class TitlebarPart extends Part implements ITitleService {
|
@@ -343 +343 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||||
- if (!isMacintosh) {
|
- if (!isMacintosh) {
|
||||||
+ if (!(isNative && isMacintosh)) {
|
+ // if (!(isNative && isMacintosh)) {
|
||||||
|
@@ -346 +346 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||||
|
- }
|
||||||
|
+ // }
|
||||||
@@ -549 +549 @@ export class TitlebarPart extends Part implements ITitleService {
|
@@ -549 +549 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||||
- if (!isMacintosh &&
|
- if (!isMacintosh &&
|
||||||
+ if (!(isNative && isMacintosh) &&
|
+ if (!(isNative && isMacintosh) &&
|
||||||
@@ -752,11 +793,14 @@ index 1f8088e..f5b0551 100644
|
|||||||
- included: platform.isMacintosh
|
- included: platform.isMacintosh
|
||||||
+ included: platform.isNative && platform.isMacintosh
|
+ included: platform.isNative && platform.isMacintosh
|
||||||
diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
|
diff --git a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
|
||||||
index 24ba122..fca7faf 100644
|
index 24ba122..3ab8804 100644
|
||||||
--- a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
|
--- a/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
|
||||||
+++ b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
|
+++ b/src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
|
||||||
@@ -12,0 +13 @@ import * as nls from 'vs/nls';
|
@@ -12,0 +13 @@ import * as nls from 'vs/nls';
|
||||||
+import * as browser from 'vs/base/browser/browser';
|
+import * as browser from 'vs/base/browser/browser';
|
||||||
|
@@ -185 +186 @@ configurationRegistry.registerConfiguration({
|
||||||
|
- default: 'auto',
|
||||||
|
+ default: browser.isSafari ? 'dom' : 'auto',
|
||||||
@@ -196 +197 @@ configurationRegistry.registerConfiguration({
|
@@ -196 +197 @@ configurationRegistry.registerConfiguration({
|
||||||
- default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default',
|
- default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default',
|
||||||
+ default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default',
|
+ default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default',
|
||||||
@@ -885,13 +929,19 @@ index 48ef482..dc47f81 100644
|
|||||||
- placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
- placeHolder: isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
||||||
+ placeHolder: browser.isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
+ placeHolder: browser.isMacintosh ? nls.localize('openRecentPlaceHolderMac', "Select to open (hold Cmd-key to open in new window)") : nls.localize('openRecentPlaceHolder', "Select to open (hold Ctrl-key to open in new window)"),
|
||||||
diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts
|
diff --git a/src/vs/workbench/electron-browser/main.contribution.ts b/src/vs/workbench/electron-browser/main.contribution.ts
|
||||||
index 71bc992..97cbb71 100644
|
index 71bc992..a76dad4 100644
|
||||||
--- a/src/vs/workbench/electron-browser/main.contribution.ts
|
--- a/src/vs/workbench/electron-browser/main.contribution.ts
|
||||||
+++ b/src/vs/workbench/electron-browser/main.contribution.ts
|
+++ b/src/vs/workbench/electron-browser/main.contribution.ts
|
||||||
@@ -13 +13,2 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
|
@@ -13 +13,2 @@ import { KeyMod, KeyChord, KeyCode } from 'vs/base/common/keyCodes';
|
||||||
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
|
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
|
||||||
+import { isNative, isWeb } from 'vs/base/common/platform';
|
+import { isNative, isWeb } from 'vs/base/common/platform';
|
||||||
+import { isMacintosh, isWindows, isLinux } from 'vs/base/browser/browser';
|
+import { isMacintosh, isWindows, isLinux } from 'vs/base/browser/browser';
|
||||||
|
@@ -37 +38 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||||
|
- if (isMacintosh) {
|
||||||
|
+ if (isNative && isMacintosh) {
|
||||||
|
@@ -225 +226 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||||
|
- if (isMacintosh) {
|
||||||
|
+ if (isNative && isMacintosh) {
|
||||||
@@ -306 +307 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
@@ -306 +307 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||||
- when: IsMacContext.toNegated()
|
- when: IsMacContext.toNegated()
|
||||||
+ // when: IsMacContext.toNegated()
|
+ // when: IsMacContext.toNegated()
|
||||||
@@ -907,8 +957,10 @@ index 71bc992..97cbb71 100644
|
|||||||
@@ -633 +634 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
@@ -633 +634 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||||
- 'included': isWindows || isLinux
|
- 'included': isWindows || isLinux
|
||||||
+ 'included': isWeb || isWindows || isLinux
|
+ 'included': isWeb || isWindows || isLinux
|
||||||
@@ -650 +651 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
@@ -649,2 +650,2 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||||
|
- 'enum': ['native', 'custom'],
|
||||||
- 'default': isLinux ? 'native' : 'custom',
|
- 'default': isLinux ? 'native' : 'custom',
|
||||||
|
+ 'enum': ['custom'],
|
||||||
+ 'default': isNative && isLinux ? 'native' : 'custom',
|
+ 'default': isNative && isLinux ? 'native' : 'custom',
|
||||||
@@ -659 +660 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
@@ -659 +660 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||||
- 'included': isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)
|
- 'included': isMacintosh && parseFloat(os.release()) >= 16 // Minimum: macOS Sierra (10.12.x = darwin 16.x)
|
||||||
|
|||||||
@@ -24,11 +24,14 @@ module.exports = (options = {}) => ({
|
|||||||
test: /\.(j|t)s/,
|
test: /\.(j|t)s/,
|
||||||
options: {
|
options: {
|
||||||
multiple: [{
|
multiple: [{
|
||||||
// These will be handled by file-loader. We need the location because
|
// These will be handled by file-loader. Must be a fully formed URI.
|
||||||
// they are parsed as URIs and will throw errors if not fully formed.
|
// The !! prefix causes it to ignore other loaders.
|
||||||
// The !! prefix causes it to ignore other loaders (doesn't work).
|
|
||||||
search: "require\\.toUrl\\(",
|
search: "require\\.toUrl\\(",
|
||||||
replace: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'') + '/' + require('!!file-loader?name=[path][name].[ext]!' + ",
|
replace: `${
|
||||||
|
options.node
|
||||||
|
? "'file://'"
|
||||||
|
: "location.protocol + '//' + location.host + location.pathname.replace(/\\/$/,'')"
|
||||||
|
} + '/' + require('!!file-loader?name=[path][name].[ext]!' + `,
|
||||||
flags: "g",
|
flags: "g",
|
||||||
}, {
|
}, {
|
||||||
search: "require\\.__\\$__nodeRequire",
|
search: "require\\.__\\$__nodeRequire",
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
const merge = require("webpack-merge");
|
const merge = require("webpack-merge");
|
||||||
|
|
||||||
module.exports = (options = {}) => merge(
|
module.exports = (options = {}) => merge(
|
||||||
require("./webpack.general.config")(options), {
|
require("./webpack.general.config")({
|
||||||
|
...options,
|
||||||
|
node: true,
|
||||||
|
}), {
|
||||||
devtool: "none",
|
devtool: "none",
|
||||||
mode: "production",
|
mode: "production",
|
||||||
target: "node",
|
target: "node",
|
||||||
|
|||||||
Reference in New Issue
Block a user