@@ -98,6 +98,11 @@ const UIStrings = {
9898 *@description Text in Application Panel Sidebar of the Application panel
9999 */
100100 storage : 'Storage' ,
101+ /**
102+ *@description Text in Application Panelthat shows if no local storage
103+ * can be shown.
104+ */
105+ noLocalStorage : 'No local storage detected' ,
101106 /**
102107 *@description Text in Application Panel Sidebar of the Application panel
103108 */
@@ -106,10 +111,18 @@ const UIStrings = {
106111 *@description Text in Application Panel Sidebar of the Application panel
107112 */
108113 sessionStorage : 'Session storage' ,
114+ /**
115+ *@description Text in Application Panel if no session storage can be shown.
116+ */
117+ noSessionStorage : 'No session storage detected' ,
109118 /**
110119 *@description Text in Application Panel Sidebar of the Application panel
111120 */
112121 extensionStorage : 'Extension storage' ,
122+ /**
123+ *@description Text in Application Panel if no extension storage can be shown
124+ */
125+ noExtensionStorage : 'No extension storage detected' ,
113126 /**
114127 *@description Text for extension session storage in Application panel
115128 */
@@ -130,6 +143,10 @@ const UIStrings = {
130143 *@description Text for web cookies
131144 */
132145 cookies : 'Cookies' ,
146+ /**
147+ *@description Text in Application Panel Sidebar if no cookies are set
148+ */
149+ noCookies : 'No cookies set' ,
133150 /**
134151 *@description Text in Application Panel Sidebar of the Application panel
135152 */
@@ -154,6 +171,10 @@ const UIStrings = {
154171 *@description Text in Application Panel Sidebar of the Application panel
155172 */
156173 indexeddb : 'IndexedDB' ,
174+ /**
175+ *@description Text in Application Panel if no indexedDB is detected
176+ */
177+ noIndexeddb : 'No indexedDB detected' ,
157178 /**
158179 *@description A context menu item in the Application Panel Sidebar of the Application panel
159180 */
@@ -344,17 +365,17 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
344365
345366 const storageSectionTitle = i18nString ( UIStrings . storage ) ;
346367 const storageTreeElement = this . addSidebarSection ( storageSectionTitle , 'storage' ) ;
347- this . localStorageListTreeElement =
348- new ExpandableApplicationPanelTreeElement ( panel , i18nString ( UIStrings . localStorage ) , 'local-storage' ) ;
368+ this . localStorageListTreeElement = new ExpandableApplicationPanelTreeElement (
369+ panel , i18nString ( UIStrings . localStorage ) , i18nString ( UIStrings . noLocalStorage ) , '' , 'local-storage' ) ;
349370 this . localStorageListTreeElement . setLink (
350371 'https://developer.chrome.com/docs/devtools/storage/localstorage/?utm_source=devtools' as
351372 Platform . DevToolsPath . UrlString ) ;
352373 const localStorageIcon = IconButton . Icon . create ( 'table' ) ;
353374 this . localStorageListTreeElement . setLeadingIcons ( [ localStorageIcon ] ) ;
354375
355376 storageTreeElement . appendChild ( this . localStorageListTreeElement ) ;
356- this . sessionStorageListTreeElement =
357- new ExpandableApplicationPanelTreeElement ( panel , i18nString ( UIStrings . sessionStorage ) , 'session-storage' ) ;
377+ this . sessionStorageListTreeElement = new ExpandableApplicationPanelTreeElement (
378+ panel , i18nString ( UIStrings . sessionStorage ) , i18nString ( UIStrings . noSessionStorage ) , '' , 'session-storage' ) ;
358379 this . sessionStorageListTreeElement . setLink (
359380 'https://developer.chrome.com/docs/devtools/storage/sessionstorage/?utm_source=devtools' as
360381 Platform . DevToolsPath . UrlString ) ;
@@ -363,8 +384,9 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
363384
364385 storageTreeElement . appendChild ( this . sessionStorageListTreeElement ) ;
365386
366- this . extensionStorageListTreeElement =
367- new ExpandableApplicationPanelTreeElement ( panel , i18nString ( UIStrings . extensionStorage ) , 'extension-storage' ) ;
387+ this . extensionStorageListTreeElement = new ExpandableApplicationPanelTreeElement (
388+ panel , i18nString ( UIStrings . extensionStorage ) , i18nString ( UIStrings . noExtensionStorage ) , '' ,
389+ 'extension-storage' ) ;
368390 this . extensionStorageListTreeElement . setLink (
369391 'https://developer.chrome.com/docs/extensions/reference/api/storage/?utm_source=devtools' as
370392 Platform . DevToolsPath . UrlString ) ;
@@ -379,8 +401,8 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
379401 Platform . DevToolsPath . UrlString ) ;
380402 storageTreeElement . appendChild ( this . indexedDBListTreeElement ) ;
381403
382- this . cookieListTreeElement =
383- new ExpandableApplicationPanelTreeElement ( panel , i18nString ( UIStrings . cookies ) , 'cookies' ) ;
404+ this . cookieListTreeElement = new ExpandableApplicationPanelTreeElement (
405+ panel , i18nString ( UIStrings . cookies ) , i18nString ( UIStrings . noCookies ) , '' , 'cookies' ) ;
384406 this . cookieListTreeElement . setLink (
385407 'https://developer.chrome.com/docs/devtools/storage/cookies/?utm_source=devtools' as
386408 Platform . DevToolsPath . UrlString ) ;
@@ -1235,7 +1257,7 @@ export class IndexedDBTreeElement extends ExpandableApplicationPanelTreeElement
12351257 private idbDatabaseTreeElements : IDBDatabaseTreeElement [ ] ;
12361258 private storageBucket ?: Protocol . Storage . StorageBucket ;
12371259 constructor ( storagePanel : ResourcesPanel , storageBucket ?: Protocol . Storage . StorageBucket ) {
1238- super ( storagePanel , i18nString ( UIStrings . indexeddb ) , 'indexed-db' ) ;
1260+ super ( storagePanel , i18nString ( UIStrings . indexeddb ) , i18nString ( UIStrings . noIndexeddb ) , '' , 'indexed-db' ) ;
12391261 const icon = IconButton . Icon . create ( 'database' ) ;
12401262 this . setLeadingIcons ( [ icon ] ) ;
12411263 this . idbDatabaseTreeElements = [ ] ;
@@ -1861,7 +1883,11 @@ export class StorageCategoryView extends UI.Widget.VBox {
18611883 this . emptyWidget . show ( this . element ) ;
18621884 }
18631885
1864- setHeader ( header : string ) : void {
1886+ setText ( text : string ) : void {
1887+ this . emptyWidget . text = text ;
1888+ }
1889+
1890+ setHeadline ( header : string ) : void {
18651891 this . emptyWidget . header = header ;
18661892 }
18671893
@@ -2236,7 +2262,8 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22362262 resourceType === Common . ResourceType . resourceTypes . Document ? this : this . categoryElements . get ( categoryName ) ;
22372263 if ( ! categoryElement ) {
22382264 categoryElement = new ExpandableApplicationPanelTreeElement (
2239- this . section . panel , resource . resourceType ( ) . category ( ) . title ( ) , categoryName , categoryName === 'Frames' ) ;
2265+ this . section . panel , resource . resourceType ( ) . category ( ) . title ( ) , '' , '' , categoryName ,
2266+ categoryName === 'Frames' ) ;
22402267 this . categoryElements . set ( resourceType . name ( ) , categoryElement ) ;
22412268 this . appendChild ( categoryElement , FrameTreeElement . presentationOrderCompare ) ;
22422269 }
@@ -2250,7 +2277,7 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22502277 let categoryElement = this . categoryElements . get ( categoryKey ) ;
22512278 if ( ! categoryElement ) {
22522279 categoryElement = new ExpandableApplicationPanelTreeElement (
2253- this . section . panel , i18nString ( UIStrings . openedWindows ) , categoryKey ) ;
2280+ this . section . panel , i18nString ( UIStrings . openedWindows ) , '' , '' , categoryKey ) ;
22542281 this . categoryElements . set ( categoryKey , categoryElement ) ;
22552282 this . appendChild ( categoryElement , FrameTreeElement . presentationOrderCompare ) ;
22562283 }
@@ -2267,7 +2294,8 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
22672294 i18nString ( UIStrings . webWorkers ) ;
22682295 let categoryElement = this . categoryElements . get ( categoryKey ) ;
22692296 if ( ! categoryElement ) {
2270- categoryElement = new ExpandableApplicationPanelTreeElement ( this . section . panel , categoryName , categoryKey ) ;
2297+ categoryElement =
2298+ new ExpandableApplicationPanelTreeElement ( this . section . panel , categoryName , '' , '' , categoryKey ) ;
22712299 this . categoryElements . set ( categoryKey , categoryElement ) ;
22722300 this . appendChild ( categoryElement , FrameTreeElement . presentationOrderCompare ) ;
22732301 }
@@ -2364,7 +2392,6 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
23642392 if ( view ) {
23652393 return view ;
23662394 }
2367-
23682395 return new UI . EmptyWidget . EmptyWidget ( '' , this . resource . url ) ;
23692396 } ) ;
23702397 return this . previewPromise ;
@@ -2373,7 +2400,7 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
23732400 override onselect ( selectedByUser ?: boolean ) : boolean {
23742401 super . onselect ( selectedByUser ) ;
23752402 if ( this . resource . isGenerated ) {
2376- this . panel . showCategoryView ( i18nString ( UIStrings . theContentOfThisDocumentHasBeen ) , null ) ;
2403+ this . panel . showCategoryView ( i18nString ( UIStrings . theContentOfThisDocumentHasBeen ) , '' , '' , null ) ;
23772404 } else {
23782405 void this . panel . scheduleShowView ( this . preparePreview ( ) ) ;
23792406 }
0 commit comments