Files
react-native-devtools-frontend/front_end/ui/RemoteDebuggingTerminatedScreen.js
T
Paul Lewis 17e384ec75 Reland "Migrates refs to Common inside ui/ to ESM"
This reverts commit e2db893b1d.

Reason for revert: Should be fixed now due to https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1981615

Original change's description:
> Revert "Migrates refs to Common inside ui/ to ESM"
> 
> This reverts commit 77e01616ea.
> 
> Reason for revert:
> https://bugs.chromium.org/p/chromium/issues/detail?id=1039577
> 
> Original change's description:
> > Migrates refs to Common inside ui/ to ESM
> > 
> > Bug: 1006759
> > Change-Id: I5967981a53e1f227270c112ce636c32f3c33d9e2
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1985676
> > Commit-Queue: Paul Lewis <aerotwist@chromium.org>
> > Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
> 
> TBR=aerotwist@chromium.org,tvanderlippe@chromium.org
> 
> Change-Id: I62c1477175307b0b9a54f2cace5fa6ba5af9d667
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1006759, 1039577
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1989312
> Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
> Commit-Queue: Takuto Ikuta <tikuta@chromium.org>

TBR=tikuta@chromium.org,aerotwist@chromium.org,tvanderlippe@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1006759, 1039577
Change-Id: I15f70155ba12d6d8d0fcfd8d0c956573839f4e97
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/1991501
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-01-08 16:06:56 +00:00

40 lines
1.5 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.
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();
}
}