Compare commits
8 Commits
1.868-vsc1
...
1.903-vsc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
166efcb17e | ||
|
|
206e107a9a | ||
|
|
12c8b5d337 | ||
|
|
4aa20fd864 | ||
|
|
0cd4e46055 | ||
|
|
f51823b51f | ||
|
|
55bfeab208 | ||
|
|
309d15cefd |
@@ -43,7 +43,7 @@ Options:
|
||||
--cert <value>
|
||||
--cert-key <value>
|
||||
-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.
|
||||
-h, --host <value> Customize the hostname. (default: "0.0.0.0")
|
||||
-o, --open Open in the browser on startup.
|
||||
@@ -52,7 +52,7 @@ Options:
|
||||
-H, --allow-http Allow http connections.
|
||||
-P, --password <value> Specify a password for authentication.
|
||||
--disable-telemetry Disables ALL telemetry.
|
||||
-h, --help output usage information
|
||||
--help output usage information
|
||||
```
|
||||
|
||||
### Data Directory
|
||||
|
||||
@@ -28,7 +28,7 @@ commander.version(process.env.VERSION || "development")
|
||||
.option("-p, --port <number>", "Port to bind on.", parseInt(process.env.PORT!, 10) || 8443)
|
||||
.option("-N, --no-auth", "Start without requiring authentication.", undefined)
|
||||
.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("--install-extension <value>", "Install an extension by its ID.")
|
||||
.option("--bootstrap-fork <name>", "Used for development. Never set.")
|
||||
@@ -209,7 +209,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) {
|
||||
// Generate a random password with a length of 24.
|
||||
const buffer = Buffer.alloc(12);
|
||||
|
||||
@@ -270,9 +270,12 @@ class Dialog {
|
||||
|
||||
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) {
|
||||
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);
|
||||
}
|
||||
});
|
||||
@@ -288,16 +291,18 @@ class Dialog {
|
||||
});
|
||||
buttonsNode.appendChild(cancelBtn);
|
||||
const confirmBtn = document.createElement("button");
|
||||
const openFile = (this.options as OpenDialogOptions).properties.openFile;
|
||||
confirmBtn.innerText = openFile ? "Open" : "Confirm";
|
||||
const openDirectory = (this.options as OpenDialogOptions).properties.openDirectory;
|
||||
confirmBtn.innerText = this.options.buttonLabel || "Confirm";
|
||||
confirmBtn.addEventListener("click", () => {
|
||||
if (this._path && !openFile) {
|
||||
if (this._path && openDirectory) {
|
||||
this.selectEmitter.emit(this._path);
|
||||
}
|
||||
});
|
||||
// Since a single click opens a file, the only time this button can be
|
||||
// used is on a directory, which is invalid for opening files.
|
||||
if (openFile) {
|
||||
// Disable if we can't open directories, otherwise you can open a directory
|
||||
// as a file which won't work. This is because our button currently just
|
||||
// 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;
|
||||
}
|
||||
buttonsNode.appendChild(confirmBtn);
|
||||
@@ -407,8 +412,9 @@ class Dialog {
|
||||
isDirectory: stat.isDirectory(),
|
||||
lastModified: stat.mtime.toDateString(),
|
||||
size: stat.size,
|
||||
// If we are opening a directory, show files as disabled.
|
||||
isDisabled: !stat.isDirectory() && (this.options as OpenDialogOptions).properties.openDirectory,
|
||||
// If we can't open files, show them as disabled.
|
||||
isDisabled: !stat.isDirectory()
|
||||
&& !(this.options as OpenDialogOptions).properties.openFile,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,8 +142,8 @@ export class WindowsService implements IWindowsService {
|
||||
return [await showOpenDialog({
|
||||
...(options || {}),
|
||||
properties: {
|
||||
openDirectory: true,
|
||||
openFile: true,
|
||||
openDirectory: options && options.properties && options.properties.includes("openDirectory") || false,
|
||||
openFile: options && options.properties && options.properties.includes("openFile") || false,
|
||||
},
|
||||
})];
|
||||
}
|
||||
|
||||
@@ -53,3 +53,7 @@
|
||||
width: 56px !important;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.window-controls-container {
|
||||
display: none !important;
|
||||
}
|
||||
@@ -398,19 +398,35 @@ index 7b6ad89..3190356 100644
|
||||
- return;
|
||||
+ 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
|
||||
index c25c940..9f11d98 100644
|
||||
index c25c940..f2004f8 100644
|
||||
--- a/src/vs/workbench/browser/layout.ts
|
||||
+++ b/src/vs/workbench/browser/layout.ts
|
||||
@@ -12 +12 @@ import { Registry } from 'vs/platform/registry/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
|
||||
- if ((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
|
||||
+ // if ((isWeb || isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') {
|
||||
@@ -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 (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 ((isNative && isMacintosh) || this.state.menuBar.visibility === 'hidden') {
|
||||
diff --git a/src/vs/workbench/browser/legacyLayout.ts b/src/vs/workbench/browser/legacyLayout.ts
|
||||
@@ -522,7 +538,7 @@ index a822341..43b882a 100644
|
||||
- if (!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
|
||||
index 028f375..4bfe956 100644
|
||||
index 028f375..f740471 100644
|
||||
--- a/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
|
||||
@@ -536,7 +552,10 @@ index 028f375..4bfe956 100644
|
||||
+ if (!(isNative && isMacintosh)) {
|
||||
@@ -343 +343 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||
- 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 {
|
||||
- if (!isMacintosh &&
|
||||
+ if (!(isNative && isMacintosh) &&
|
||||
@@ -752,11 +771,14 @@ index 1f8088e..f5b0551 100644
|
||||
- included: 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
|
||||
index 24ba122..fca7faf 100644
|
||||
index 24ba122..3ab8804 100644
|
||||
--- a/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';
|
||||
+import * as browser from 'vs/base/browser/browser';
|
||||
@@ -185 +186 @@ configurationRegistry.registerConfiguration({
|
||||
- default: 'auto',
|
||||
+ default: browser.isSafari ? 'dom' : 'auto',
|
||||
@@ -196 +197 @@ configurationRegistry.registerConfiguration({
|
||||
- default: platform.isMacintosh ? 'selectWord' : platform.isWindows ? 'copyPaste' : 'default',
|
||||
+ default: browser.isMacintosh ? 'selectWord' : browser.isWindows ? 'copyPaste' : 'default',
|
||||
@@ -885,13 +907,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: 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
|
||||
index 71bc992..97cbb71 100644
|
||||
index 71bc992..a76dad4 100644
|
||||
--- a/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';
|
||||
-import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform';
|
||||
+import { isNative, isWeb } from 'vs/base/common/platform';
|
||||
+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';
|
||||
- when: IsMacContext.toNegated()
|
||||
+ // when: IsMacContext.toNegated()
|
||||
@@ -907,8 +935,10 @@ index 71bc992..97cbb71 100644
|
||||
@@ -633 +634 @@ import { LogStorageAction } from 'vs/platform/storage/node/storageService';
|
||||
- 'included': 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',
|
||||
+ 'enum': ['custom'],
|
||||
+ 'default': isNative && isLinux ? 'native' : 'custom',
|
||||
@@ -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)
|
||||
|
||||
@@ -24,11 +24,14 @@ module.exports = (options = {}) => ({
|
||||
test: /\.(j|t)s/,
|
||||
options: {
|
||||
multiple: [{
|
||||
// These will be handled by file-loader. We need the location because
|
||||
// they are parsed as URIs and will throw errors if not fully formed.
|
||||
// The !! prefix causes it to ignore other loaders (doesn't work).
|
||||
// These will be handled by file-loader. Must be a fully formed URI.
|
||||
// The !! prefix causes it to ignore other loaders.
|
||||
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",
|
||||
}, {
|
||||
search: "require\\.__\\$__nodeRequire",
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
const merge = require("webpack-merge");
|
||||
|
||||
module.exports = (options = {}) => merge(
|
||||
require("./webpack.general.config")(options), {
|
||||
require("./webpack.general.config")({
|
||||
...options,
|
||||
node: true,
|
||||
}), {
|
||||
devtool: "none",
|
||||
mode: "production",
|
||||
target: "node",
|
||||
|
||||
Reference in New Issue
Block a user