Files
react-native-devtools-frontend/front_end/ui/RemoteDebuggingTerminatedScreen.js
T
Tim van der Lippe ee97fa3e34 Add ts_library definitions and ts-nocheck for Karma tests
In https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2102717
we are updating the Karma configuration to use the Ninja output for
all unittests. This CL includes all existing unittests in relevant
ts_library definitions and adds the corresponding (previously missed)
dependencies as ts_library as well.

Since most of these dependencies are actually not compiling with
the TypeScript compiler (the original intent of the CL linked above),
we are adding the @ts-nocheck annotation for now. Of course, we should
remove these annotations as soon as possible, but that is a bit more
work, as the tests involved are primarily UI driven.

R=jacktfranklin@chromium.org

# Windows presubmit breaks with large CLs
No-Presubmit: true
Bug: 1061125
Change-Id: Ic67dbbc805642eaa618340a67ea0975eaacffc24
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2162850
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2020-04-23 16:33:00 +00:00

43 lines
1.6 KiB
JavaScript

// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// @ts-nocheck
// TODO(crbug.com/1011811): Enable TypeScript compiler checks
import * as Common from '../common/common.js';
import {Dialog} from './Dialog.js';
import {SizeBehavior} from './GlassPane.js';
import {createTextButton, formatLocalized} from './UIUtils.js';
import {VBox} from './Widget.js';
export class RemoteDebuggingTerminatedScreen extends VBox {
/**
* @param {string} reason
*/
constructor(reason) {
super(true);
this.registerRequiredCSS('ui/remoteDebuggingTerminatedScreen.css');
const message = this.contentElement.createChild('div', 'message');
const reasonElement = message.createChild('span', 'reason');
reasonElement.textContent = reason;
message.appendChild(formatLocalized('Debugging connection was closed. Reason: %s', [reasonElement]));
this.contentElement.createChild('div', 'message').textContent =
Common.UIString.UIString('Reconnect when ready by reopening DevTools.');
const button = createTextButton(Common.UIString.UIString('Reconnect DevTools'), () => window.location.reload());
this.contentElement.createChild('div', 'button').appendChild(button);
}
/**
* @param {string} reason
*/
static show(reason) {
const dialog = new Dialog();
dialog.setSizeBehavior(SizeBehavior.MeasureContent);
dialog.addCloseButton();
dialog.setDimmed(true);
new RemoteDebuggingTerminatedScreen(reason).show(dialog.contentElement);
dialog.show();
}
}