feat: display number of files for 'Files' view (#2065)

* feat: display number of files for 'Files' view

* feat: include files count in Preferences > Security
This commit is contained in:
Mo
2022-11-28 15:38:50 -06:00
committed by GitHub
parent 052e7d2f90
commit 767d354780
25 changed files with 69 additions and 91 deletions

View File

@@ -1,14 +1,6 @@
import { destroyAllObjectProperties, isDev } from '@/Utils'
import { action, computed, makeObservable, observable, runInAction } from 'mobx'
import {
ApplicationEvent,
ContentType,
InternalEventBus,
SNNote,
SNTag,
ItemCounterInterface,
ItemCounts,
} from '@standardnotes/snjs'
import { ApplicationEvent, ContentType, InternalEventBus, SNNote, SNTag } from '@standardnotes/snjs'
import { WebApplication } from '@/Application/Application'
import { AccountMenuPane } from '@/Components/AccountMenu/AccountMenuPane'
import { AbstractViewController } from '../Abstract/AbstractViewController'
@@ -36,7 +28,7 @@ export class AccountMenuController extends AbstractViewController {
destroyAllObjectProperties(this)
}
constructor(application: WebApplication, eventBus: InternalEventBus, private itemCounter: ItemCounterInterface) {
constructor(application: WebApplication, eventBus: InternalEventBus) {
super(application, eventBus)
makeObservable(this, {
@@ -165,8 +157,4 @@ export class AccountMenuController extends AbstractViewController {
get notesAndTagsCount(): number {
return this.notesAndTags.length
}
get structuredNotesAndTagsCount(): ItemCounts {
return this.itemCounter.countNotesAndTags(this.notesAndTags)
}
}