@@ -27,7 +27,7 @@ function cellTrust(
2727if ( props . trustedCells === props . totalCells ) {
2828return [
2929trans . __ (
30- 'Notebook trusted: %1 of %2 cells trusted.' ,
30+ 'Notebook trusted: %1 of %2code cells trusted.' ,
3131props . trustedCells ,
3232props . totalCells
3333) ,
@@ -36,7 +36,7 @@ function cellTrust(
3636} else if ( props . activeCellTrusted ) {
3737return [
3838trans . __ (
39- 'Active cell trusted: %1 of %2 cells trusted.' ,
39+ 'Active cell trusted: %1 of %2code cells trusted.' ,
4040props . trustedCells ,
4141props . totalCells
4242) ,
@@ -45,7 +45,7 @@ function cellTrust(
4545} else {
4646return [
4747trans . __ (
48- 'Notebook not trusted: %1 of %2 cells trusted.' ,
48+ 'Notebook not trusted: %1 of %2code cells trusted.' ,
4949props . trustedCells ,
5050props . totalCells
5151) ,
@@ -90,12 +90,12 @@ namespace NotebookTrustComponent {
9090activeCellTrusted :boolean ;
9191
9292/**
93- * The total number of cells for the current notebook.
93+ * The total number ofcode cells for the current notebook.
9494 */
9595totalCells :number ;
9696
9797/**
98- * The number of trusted cells for the current notebook.
98+ * The number of trustedcode cells for the current notebook.
9999 */
100100trustedCells :number ;
101101}
@@ -145,14 +145,14 @@ export namespace NotebookTrustStatus {
145145 */
146146export class Model extends VDomModel {
147147/**
148- * The number of trusted cells in the current notebook.
148+ * The number of trustedcode cells in the current notebook.
149149 */
150150get trustedCells ( ) :number {
151151return this . _trustedCells ;
152152}
153153
154154/**
155- * The total number of cells in the current notebook.
155+ * The total number ofcode cells in the current notebook.
156156 */
157157get totalCells ( ) :number {
158158return this . _totalCells ;
@@ -240,7 +240,7 @@ export namespace NotebookTrustStatus {
240240}
241241
242242/**
243- * Given a notebook model, figure out how many of the cells are trusted.
243+ * Given a notebook model, figure out how many of thecode cells are trusted.
244244 */
245245private _deriveCellTrustState ( model :INotebookModel | null ) :{
246246total :number ;
@@ -249,13 +249,18 @@ export namespace NotebookTrustStatus {
249249if ( model === null ) {
250250return { total :0 , trusted :0 } ;
251251}
252+ let total = 0 ;
252253let trusted = 0 ;
253254for ( const cell of model . cells ) {
255+ if ( cell . type !== 'code' ) {
256+ continue ;
257+ }
258+ total ++ ;
254259if ( cell . trusted ) {
255260trusted ++ ;
256261}
257262}
258- return { total : model . cells . length , trusted} ;
263+ return { total, trusted} ;
259264}
260265
261266/**