Files
react-native-devtools-frontend/front_end/panels/css_overview/CSSOverviewProcessingView.ts
T
Jack Franklin 84442c6766 [DarkMode] remove enableLegacyPatching option
The option was only allowed to be set to `false`, so it's not been
used at all, so now we can remove it, given that we've had the dark
mode legacy patching disabled without any major bugs in the past few
weeks.

Bug: chromium:1152736
Change-Id: I1e794d75f9c354a0d16b1b3975f7ebdf82b3448b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2988303
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-06-29 10:07:32 +00:00

51 lines
1.7 KiB
TypeScript

// Copyright 2019 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.
/* eslint-disable rulesdir/no_underscored_properties */
import * as i18n from '../../core/i18n/i18n.js';
import * as UI from '../../ui/legacy/legacy.js';
import type {OverviewController} from './CSSOverviewController.js';
import {Events} from './CSSOverviewController.js';
const UIStrings = {
/**
*@description Text to cancel something
*/
cancel: 'Cancel',
};
const str_ = i18n.i18n.registerUIStrings('panels/css_overview/CSSOverviewProcessingView.ts', UIStrings);
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
export class CSSOverviewProcessingView extends UI.Widget.Widget {
_formatter: Intl.NumberFormat;
_controller: OverviewController;
fragment?: UI.Fragment.Fragment;
constructor(controller: OverviewController) {
super();
this.registerRequiredCSS('panels/css_overview/cssOverviewProcessingView.css');
this._formatter = new Intl.NumberFormat('en-US');
this._controller = controller;
this._render();
}
_render(): void {
const cancelButton = UI.UIUtils.createTextButton(
i18nString(UIStrings.cancel), () => this._controller.dispatchEventToListeners(Events.RequestOverviewCancel), '',
true /* primary */);
this.setDefaultFocusedElement(cancelButton);
this.fragment = UI.Fragment.Fragment.build`
<div class="vbox overview-processing-view">
<h1>Processing page</h1>
<div>${cancelButton}</div>
</div>
`;
this.contentElement.appendChild(this.fragment.element());
this.contentElement.style.overflow = 'auto';
}
}