some polish and fixes

This commit is contained in:
Benjamin Pasero 2018-01-19 12:02:44 +01:00
parent f31ea9bba3
commit 76cbab0a2f
9 changed files with 132 additions and 90 deletions

View file

@ -1,88 +0,0 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* Table
*/
table {
width: 100%;
max-width: 100%;
margin-bottom: 1rem;
background-color: transparent;
border-collapse: collapse;
}
th {
vertical-align: bottom;
border-bottom: 2px solid #e9ecef;
padding: .75rem;
border-top: 1px solid #e9ecef;
text-align: inherit;
}
tr:nth-of-type(even) {
background-color: rgba(0,0,0,.05);
}
td {
padding: .75rem;
vertical-align: top;
border-top: 1px solid #e9ecef;
}
/**
* Forms
*/
input, textarea {
display: block;
width: 100%;
padding: .375rem .75rem;
margin: 0;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border-radius: .25rem;
border: 1px solid #ced4da;
}
textarea {
overflow: auto;
resize: vertical;
}
small {
color: #868e96;
display: block;
margin-top: .25rem;
font-size: 80%;
font-weight: 400;
}
/**
* Button
*/
button {
display: inline-block;
font-weight: 400;
line-height: 1.25;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
padding: .5rem 1rem;
font-size: 1rem;
border-radius: .25rem;
background: none;
}
select {
height: calc(2.25rem + 2px);
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border-radius: 0.25rem;
border: none;
}

View file

@ -3,8 +3,7 @@
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="bootstrap.css">
<link rel="stylesheet" href="issueReporter.css">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; img-src 'self' https: data:; media-src 'none'; child-src 'self'; object-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; connect-src 'self' https:; font-src 'self' https:;">
</head>
<body>
<div id="issue-reporter">

View file

@ -3,7 +3,10 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
const path = require('path');
const remote = require('electron').remote;
function parseURLQueryArgs() {
const search = window.location.search || '';
@ -36,6 +39,30 @@ function uriFromPath(_path) {
function main() {
const args = parseURLQueryArgs();
const configuration = JSON.parse(args['config'] || '{}') || {};
const extractKey = function (e) {
return [
e.ctrlKey ? 'ctrl-' : '',
e.metaKey ? 'meta-' : '',
e.altKey ? 'alt-' : '',
e.shiftKey ? 'shift-' : '',
e.keyCode
].join('');
};
const TOGGLE_DEV_TOOLS_KB = (process.platform === 'darwin' ? 'meta-alt-73' : 'ctrl-shift-73'); // mac: Cmd-Alt-I, rest: Ctrl-Shift-I
const RELOAD_KB = (process.platform === 'darwin' ? 'meta-82' : 'ctrl-82'); // mac: Cmd-R, rest: Ctrl-R
window.addEventListener('keydown', function (e) {
const key = extractKey(e);
if (key === TOGGLE_DEV_TOOLS_KB) {
remote.getCurrentWebContents().toggleDevTools();
} else if (key === RELOAD_KB) {
remote.getCurrentWindow().reload();
}
});
// Load the loader and start loading the workbench
const rootUrl = uriFromPath(configuration.appRoot) + '/out';
// In the bundled version the nls plugin is packaged with the loader so the NLS Plugins

View file

@ -3,6 +3,9 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import 'vs/css!./media/issueReporter';
import { shell, ipcRenderer, webFrame } from 'electron';
import { $ } from 'vs/base/browser/dom';
import * as browser from 'vs/base/browser/browser';

View file

@ -3,6 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import { assign } from 'vs/base/common/objects';
export interface IssueReporterData {

View file

@ -3,6 +3,90 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/**
* Table
*/
table {
width: 100%;
max-width: 100%;
margin-bottom: 1rem;
background-color: transparent;
border-collapse: collapse;
}
th {
vertical-align: bottom;
border-bottom: 2px solid #e9ecef;
padding: .75rem;
border-top: 1px solid #e9ecef;
text-align: inherit;
}
tr:nth-of-type(even) {
background-color: rgba(0,0,0,.05);
}
td {
padding: .75rem;
vertical-align: top;
border-top: 1px solid #e9ecef;
}
/**
* Forms
*/
input, textarea {
display: block;
width: 100%;
padding: .375rem .75rem;
margin: 0;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border-radius: .25rem;
border: 1px solid #ced4da;
}
textarea {
overflow: auto;
resize: vertical;
}
small {
color: #868e96;
display: block;
margin-top: .25rem;
font-size: 80%;
font-weight: 400;
}
/**
* Button
*/
button {
display: inline-block;
font-weight: 400;
line-height: 1.25;
text-align: center;
white-space: nowrap;
vertical-align: middle;
user-select: none;
padding: .5rem 1rem;
font-size: 1rem;
border-radius: .25rem;
background: none;
}
select {
height: calc(2.25rem + 2px);
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-size: 1rem;
line-height: 1.5;
color: #495057;
background-color: #fff;
border-radius: 0.25rem;
border: none;
}
* {
box-sizing: border-box;
}

View file

@ -3,6 +3,8 @@
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import * as assert from 'assert';
import { IssueReporterModel } from 'vs/code/electron-browser/issue/issueReporterModel';

View file

@ -127,6 +127,7 @@ function setupIPC(accessor: ServicesAccessor): TPromise<Server> {
function setup(retry: boolean): TPromise<Server> {
return serve(environmentService.mainIPCHandle).then(server => {
// Print --status usage info
if (environmentService.args.status) {
logService.warn('Warning: The --status argument can only be used if Code is already running. Please run it again after Code has started.');

View file

@ -398,6 +398,18 @@
"*" // node modules
]
},
{
"target": "**/vs/code/electron-browser/**",
"restrictions": [
"vs/nls",
"vs/css!./**/*",
"vs/nls",
"**/vs/base/**",
"**/vs/platform/**",
"**/vs/code/**",
"*" // node modules
]
},
{
"target": "**/vs/code/**",
"restrictions": [