Skip to content

Commit

Permalink
npm run check-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
EdmondChuiHW committed Oct 14, 2024
1 parent 6e51d6e commit 4677f62
Showing 1 changed file with 27 additions and 19 deletions.
46 changes: 27 additions & 19 deletions front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import * as Common from '../../core/common/common.js';
import * as Host from '../../core/host/host.js';
import * as i18n from '../../core/i18n/i18n.js';
import type * as Platform from '../../core/platform/platform.js';
Expand Down Expand Up @@ -66,33 +67,39 @@ export class RemoteDebuggingTerminatedScreen extends VBox {
super(true);
this.registerCSSFiles([remoteDebuggingTerminatedScreenStyles]);

const handleReconnect = () => {
const handleReconnect = (): void => {
window.location.reload();
};
const feedbackLink = globalThis.FB_ONLY__reactNativeFeedbackLink;

render(
html`
html`
<h1 class="remote-debugging-terminated-title">${i18nString(UIStrings.title)}</h1>
<span class="remote-debugging-terminated-message">${i18nString(UIStrings.debuggingConnectionWasClosed)}<span class="remote-debugging-terminated-reason">${reason}</span></span>
<span class="remote-debugging-terminated-message">
${i18nString(UIStrings.debuggingConnectionWasClosed)}
<span class="remote-debugging-terminated-reason">${reason}</span>
</span>
<div class="remote-debugging-terminated-options">
<div class="remote-debugging-terminated-label">
${i18nString(UIStrings.reconnectWhenReadyByReopening)}
</div>
${createTextButton(
i18nString(UIStrings.reconnectDevtools),
handleReconnect,
{className: "primary-button", jslogContext: "reconnect"}
)}
<div class="remote-debugging-terminated-label">${i18nString(UIStrings.closeDialogDetail)}</div>
${
createTextButton(
i18nString(UIStrings.reconnectDevtools),
handleReconnect,
{className: 'primary-button', jslogContext: 'reconnect'},
)}
<div class="remote-debugging-terminated-label">
${i18nString(UIStrings.closeDialogDetail)}
</div>
${createTextButton(i18nString(UIStrings.closeDialog), onClose, {
jslogContext: "dismiss",
})}
jslogContext: 'dismiss',
})}
</div>
${feedbackLink !== null && feedbackLink !== undefined
? this.#createFeedbackSection(feedbackLink!) : null}
${feedbackLink !== null && feedbackLink !== undefined ? this.#createFeedbackSection(feedbackLink) : null}
`,
this.contentElement
this.contentElement,
{host: this},
);
}

Expand All @@ -106,20 +113,21 @@ export class RemoteDebuggingTerminatedScreen extends VBox {
}

#createFeedbackSection(feedbackLink: string): LitHtml.TemplateResult {
const handleSendFeedback = () => {
const handleSendFeedback = (): void => {
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(
feedbackLink as Platform.DevToolsPath.UrlString
feedbackLink as Platform.DevToolsPath.UrlString,
);
};

return html`
<div class="remote-debugging-terminated-feedback-container">
<div class="remote-debugging-terminated-feedback-label">${i18nString(UIStrings.sendFeedbackMessage)}</div>
${createTextButton(
${
createTextButton(
i18nString(UIStrings.sendFeedback),
handleSendFeedback,
{jslogContext: "sendFeedback"}
)}
{jslogContext: 'sendFeedback'},
)}
</div>
`;
}
Expand Down

0 comments on commit 4677f62

Please sign in to comment.