-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CrOS Hotspot] Add hotspot row below network summary rows
This CL is the first in a series of CLs that adds <hotspot-summary-item> row below the existing network summary and its functionality. This CL just add a hotspot summary row with title text. In subsequent CLs we would add more functionality like hotspot icon, subtext and enable/disable toggle. Screenshot: https://screenshot.googleplex.com/69N8BFiTL6CMi3s Bug: b/239477916 Change-Id: Ifecb653b97745dfb53df0e5fcbacc4724d0f691d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4021631 Reviewed-by: Regan Hsu <hsuregan@chromium.org> Commit-Queue: Regan Hsu <hsuregan@chromium.org> Reviewed-by: Chad Duffin <chadduffin@chromium.org> Cr-Commit-Position: refs/heads/main@{#1070579}
- Loading branch information
Jason Zhang
authored and
Chromium LUCI CQ
committed
Nov 12, 2022
1 parent
bedba2b
commit 25d9052
Showing
13 changed files
with
125 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
chrome/app/os_settings_strings_grdp/IDS_SETTINGS_INTERNET_HOTSPOT.png.sha1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
5617c57ccc8fb3280eb1ef7c4dff443a6fac17c6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
chrome/browser/resources/settings/chromeos/internet_page/hotspot_summary_item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<style include="internet-shared iron-flex"> | ||
.settings-box { | ||
border-top: var( | ||
--network-summary-item-border-top, var(--cr-separator-line)); | ||
} | ||
#hotspotPageTitle { | ||
padding-inline-start: 22px; | ||
} | ||
</style> | ||
|
||
<div class="settings-box two-line no-padding"> | ||
<div id="hotspotSummaryItemRow" | ||
actionable on-click="onWrapperClick_" | ||
class="flex layout horizontal center link-wrapper"> | ||
<iron-icon id="hotspotIcon"> | ||
</iron-icon> | ||
<div id="hotspotPageTitle" class="middle settings-box-text" | ||
aria-hidden="true"> | ||
$i18n{hotspotPageTitle} | ||
</div> | ||
<cr-icon-button id="hotspotSummaryItemRowArrowIcon" | ||
class="subpage-arrow layout end" | ||
aria-labelledby="hotspotPageTitle" | ||
aria-roledescription="$i18n{subpageArrowRoleDescription}" | ||
on-click="onSubpageArrowClick_"> | ||
</cr-icon-button> | ||
</div> | ||
</div> |
47 changes: 47 additions & 0 deletions
47
chrome/browser/resources/settings/chromeos/internet_page/hotspot_summary_item.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright 2022 The Chromium Authors | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
/** | ||
* @fileoverview Polymer element for displaying a hotspot summary item row with | ||
* a toggle button below the network summary item. | ||
*/ | ||
|
||
import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.js'; | ||
import 'chrome://resources/cr_elements/cr_shared_vars.css.js'; | ||
import 'chrome://resources/polymer/v3_0/iron-flex-layout/iron-flex-layout-classes.js'; | ||
|
||
import {I18nBehavior, I18nBehaviorInterface} from 'chrome://resources/ash/common/i18n_behavior.js'; | ||
import {loadTimeData} from 'chrome://resources/js/load_time_data.m.js'; | ||
import {html, mixinBehaviors, PolymerElement} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js'; | ||
|
||
/** | ||
* @constructor | ||
* @extends {PolymerElement} | ||
* @implements {I18nBehaviorInterface} | ||
*/ | ||
const HotspotSummaryItemElementBase = | ||
mixinBehaviors([I18nBehavior], PolymerElement); | ||
|
||
/** @polymer */ | ||
class HotspotSummaryItemElement extends HotspotSummaryItemElementBase { | ||
static get is() { | ||
return 'hotspot-summary-item'; | ||
} | ||
|
||
static get template() { | ||
return html`{__html_template__}`; | ||
} | ||
|
||
/** @private */ | ||
onSubpageArrowClick_() { | ||
// TODO: implementation | ||
} | ||
|
||
/** @private */ | ||
onWrapperClick_() { | ||
// TODO: implementation | ||
} | ||
} | ||
|
||
customElements.define(HotspotSummaryItemElement.is, HotspotSummaryItemElement); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters