mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 09:35:37 -05:00
This reverts commit 5d44b6a6a7.
This commit is contained in:
@@ -106,8 +106,8 @@ function showPartsSplash(configuration) {
|
||||
const style = document.createElement('style');
|
||||
style.className = 'initialShellColors';
|
||||
document.head.appendChild(style);
|
||||
document.body.className = baseTheme;
|
||||
style.innerHTML = `body { background-color: ${shellBackground}; color: ${shellForeground}; }`;
|
||||
document.body.className = `monaco-shell ${baseTheme}`;
|
||||
style.innerHTML = `.monaco-shell { background-color: ${shellBackground}; color: ${shellForeground}; }`;
|
||||
|
||||
if (data && data.layoutInfo) {
|
||||
// restore parts if possible (we might not always store layout info)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body class="monaco-shell vs-dark" aria-label="">
|
||||
</body>
|
||||
|
||||
<!-- Startup via workbench.nodeless.js -->
|
||||
<script src="workbench.nodeless.js"></script>
|
||||
</html>
|
||||
67
src/vs/code/electron-browser/workbench/workbench.nodeless.js
Normal file
67
src/vs/code/electron-browser/workbench/workbench.nodeless.js
Normal file
@@ -0,0 +1,67 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
'use strict';
|
||||
|
||||
(function () {
|
||||
|
||||
function uriFromPath(_path) {
|
||||
let pathName = _path.replace(/\\/g, '/');
|
||||
if (pathName.length > 0 && pathName.charAt(0) !== '/') {
|
||||
pathName = '/' + pathName;
|
||||
}
|
||||
|
||||
let uri;
|
||||
if (navigator.userAgent.indexOf('Windows') >= 0 && pathName.startsWith('//')) { // specially handle Windows UNC paths
|
||||
uri = encodeURI('file:' + pathName);
|
||||
} else {
|
||||
uri = encodeURI('file://' + pathName);
|
||||
}
|
||||
|
||||
return uri.replace(/#/g, '%23');
|
||||
}
|
||||
|
||||
function parseURLQueryArgs() {
|
||||
const search = window.location.search || '';
|
||||
|
||||
return search.split(/[?&]/)
|
||||
.filter(function (param) { return !!param; })
|
||||
.map(function (param) { return param.split('='); })
|
||||
.filter(function (param) { return param.length === 2; })
|
||||
.reduce(function (r, param) { r[param[0]] = decodeURIComponent(param[1]); return r; }, {});
|
||||
}
|
||||
|
||||
function loadScript(path, callback) {
|
||||
let script = document.createElement('script');
|
||||
script.onload = callback;
|
||||
script.async = true;
|
||||
script.type = 'text/javascript';
|
||||
script.src = path;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
loadScript('../../../../../out/vs/loader.js', function () {
|
||||
|
||||
const args = parseURLQueryArgs();
|
||||
const configuration = JSON.parse(args['config'] || '{}') || {};
|
||||
|
||||
// @ts-ignore
|
||||
require.config({
|
||||
baseUrl: uriFromPath(configuration.appRoot) + '/out',
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
require([
|
||||
'vs/workbench/workbench.nodeless.main',
|
||||
'vs/nls!vs/workbench/workbench.nodeless.main',
|
||||
'vs/css!vs/workbench/workbench.nodeless.main'
|
||||
], function () {
|
||||
|
||||
// @ts-ignore
|
||||
require('vs/workbench/browser/nodeless.main').main().then(undefined, console.error);
|
||||
});
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user