forked from EVOgeek/Vmeda.Online
Changes the two settings pages that show the size of a site (from the main menu, these are 'App settings / Space usage' and 'Preferences') so that they: a) do not show the number of cache entries (not very informative for end users) b) show an estimate for 'space usage' that includes the total size of data in ws_cache The space usage estimate is not perfect (it doesn't include the per-row overhead in the ws_cache table, or other cached data that can be deleted such as calendar events or user data) but it will probably be good enough, and I don't think the 'number of entries' things was helpful to anyone.
52 lines
3.5 KiB
HTML
52 lines
3.5 KiB
HTML
<ion-header>
|
||
<ion-navbar core-back-button>
|
||
<ion-title>{{ 'core.settings.preferences' | translate}}</ion-title>
|
||
<ion-buttons end>
|
||
</ion-buttons>
|
||
</ion-navbar>
|
||
</ion-header>
|
||
<core-split-view>
|
||
<ion-content>
|
||
<ion-refresher [enabled]="loaded" (ionRefresh)="refreshData($event)">
|
||
<ion-refresher-content pullingText="{{ 'core.pulltorefresh' | translate }}"></ion-refresher-content>
|
||
</ion-refresher>
|
||
<core-loading [hideUntil]="loaded">
|
||
<ion-list>
|
||
<ion-item *ngIf="siteInfo" text-wrap>
|
||
<h2>{{siteInfo.fullname}}</h2>
|
||
<ion-note class="core-note-block"><core-format-text [text]="siteName" contextLevel="system" [contextInstanceId]="0" [wsNotFiltered]="true"></core-format-text></ion-note>
|
||
<ion-note class="core-note-block">{{ siteUrl }}</ion-note>
|
||
</ion-item>
|
||
<ion-item-divider></ion-item-divider>
|
||
<a ion-item *ngIf="isIOS" (click)="openHandler('CoreSharedFilesListPage', {manage: true, siteId: siteId, hideSitePicker: true})" [title]="'core.sharedfiles.sharedfiles' | translate" [class.core-split-item-selected]="'CoreSharedFilesListPage' == selectedPage" detail-push>
|
||
<ion-icon name="folder" item-start></ion-icon>
|
||
<h2>{{ 'core.sharedfiles.sharedfiles' | translate }}</h2>
|
||
<ion-badge item-end>{{ iosSharedFiles }}</ion-badge>
|
||
</a>
|
||
|
||
<a ion-item *ngFor="let handler of handlers" [ngClass]="['core-settings-handler', handler.class]" (click)="openHandler(handler.page, handler.params)" [title]="handler.title | translate" detail-push [class.core-split-item-selected]="handler.page == selectedPage">
|
||
<core-icon [name]="handler.icon" item-start *ngIf="handler.icon"></core-icon>
|
||
<h2>{{ handler.title | translate}}</h2>
|
||
</a>
|
||
|
||
<ion-card class="with-borders">
|
||
<ion-item text-wrap *ngIf="spaceUsage">
|
||
<h2 text-wrap>{{ 'core.settings.spaceusage' | translate }} <ion-icon name="information-circle" color="info" [attr.aria-label]="'core.info' | translate" (click)="showSpaceInfo()"></ion-icon></h2>
|
||
<p *ngIf="spaceUsage.spaceUsage != null">{{ spaceUsage.spaceUsage | coreBytesToSize }}</p>
|
||
<button ion-button icon-only clear color="danger" item-end (click)="deleteSiteStorage()" [hidden]="!spaceUsage.spaceUsage > '0' && !spaceUsage.cacheEntries > '0'" [attr.aria-label]="'core.settings.deletesitefilestitle' | translate">
|
||
<ion-icon name="trash"></ion-icon>
|
||
</button>
|
||
</ion-item>
|
||
<ion-item text-wrap>
|
||
<h2>{{ 'core.settings.synchronizenow' | translate }} <ion-icon name="information-circle" color="info" [attr.aria-label]="'core.info' | translate" (click)="showSyncInfo()"></ion-icon></h2>
|
||
<button ion-button icon-only clear item-end *ngIf="!isSynchronizing()" (click)="synchronize()" [title]="siteName" [attr.aria-label]="'core.settings.synchronizenow' | translate">
|
||
<ion-icon name="sync"></ion-icon>
|
||
</button>
|
||
<ion-spinner item-end *ngIf="isSynchronizing()"></ion-spinner>
|
||
</ion-item>
|
||
</ion-card>
|
||
</ion-list>
|
||
</core-loading>
|
||
</ion-content>
|
||
</core-split-view>
|