2018-11-02 23:24:37 +08:00
< form # settingsForm = "ngForm" class = "form-horizontal" >
2018-05-14 04:59:57 +08:00
< div class = "card mb-4" >
< h5 class = "card-header" i18n >
Other settings
< / h5 >
< div class = "card-body" >
2017-12-25 07:42:25 +08:00
< div [ hidden ] = " ! error " class = "alert alert-danger" role = "alert" > < strong i18n > Error: < / strong > {{error}}< / div >
2017-07-15 22:31:43 +08:00
2018-11-02 23:24:37 +08:00
< p class = "title" i18n > Threads:< / p >
< div class = "form-group row" >
2018-05-14 04:59:57 +08:00
< label class = "col-md-2 control-label" for = "enableThreading" i18n > Threading< / label >
< div class = "col-md-10" >
2017-07-15 22:31:43 +08:00
< bSwitch
id="enableThreading"
class="switch"
2018-11-02 23:24:37 +08:00
name="enable"
2017-07-15 22:31:43 +08:00
[switch-on-color]="'primary'"
[switch-inverse]="'inverse'"
2018-03-30 08:30:23 +08:00
[switch-off-text]="text.Disabled"
[switch-on-text]="text.Enabled"
2017-07-15 22:31:43 +08:00
[switch-handle-width]="'100'"
[switch-label-width]="'20'"
2018-11-02 23:24:37 +08:00
[(ngModel)]="settings.Server.enable">
2017-07-15 22:31:43 +08:00
< / bSwitch >
2018-05-14 04:59:57 +08:00
< small class = "form-text text-muted" i18n > Runs directory scanning and thumbnail generation (only for Jimp) in a
different thread
< / small >
2017-07-15 22:31:43 +08:00
< / div >
< / div >
2018-11-02 23:24:37 +08:00
< div class = "form-group row" [ hidden ] = " simplifiedMode | | settings . Server . enable = = false " >
< label class = "col-md-2 control-label" for = "thumbnailThreads" i18n > Thumbnail threads< / label >
< div class = "col-md-10" >
< select id = "thumbnailThreads" class = "form-control" [ ( ngModel ) ] = " settings . Server . thumbnailThreads "
name="Server[thumbnailThreads]" required>
< option [ ngValue ] = " 0 " > auto< / option >
< option * ngFor = "let i of threads" [ ngValue ] = " i " > {{i}}< / option >
< / select >
< small class = "form-text text-muted" i18n > Number of threads that are used to generate thumbnails. If auto, number of CPU cores -1 threads will be used.< / small >
< / div >
< / div >
< p class = "title" i18n > Misc:< / p >
2018-05-14 04:59:57 +08:00
< div class = "form-group row" >
< label class = "col-md-2 control-label" for = "enableOnScrollThumbnailPrioritising" i18n > Scroll based thumbnail
2017-07-15 22:31:43 +08:00
generation< / label >
2018-05-14 04:59:57 +08:00
< div class = "col-md-10" >
2017-07-15 22:31:43 +08:00
< bSwitch
id="enableOnScrollThumbnailPrioritising"
class="switch"
name="enableOnScrollThumbnailPrioritising"
[switch-on-color]="'primary'"
[switch-inverse]="'inverse'"
2018-03-30 08:30:23 +08:00
[switch-off-text]="text.Disabled"
[switch-on-text]="text.Enabled"
2017-07-15 22:31:43 +08:00
[switch-handle-width]="'100'"
[switch-label-width]="'20'"
2018-11-02 23:24:37 +08:00
[(ngModel)]="settings.Client.enableOnScrollThumbnailPrioritising">
2017-07-15 22:31:43 +08:00
< / bSwitch >
2018-05-14 04:59:57 +08:00
< small class = "form-text text-muted" i18n > Those thumbnails get higher priority that are visible on the screen
< / small >
2017-07-15 22:31:43 +08:00
< / div >
< / div >
2018-05-14 04:59:57 +08:00
< div class = "form-group row" >
< label class = "col-md-2 control-label" for = "enableOnScrollRendering" i18n > Lazy image rendering< / label >
< div class = "col-md-10" >
2017-07-15 22:31:43 +08:00
< bSwitch
id="enableOnScrollRendering"
class="switch"
name="enableOnScrollRendering"
[switch-on-color]="'primary'"
[switch-inverse]="'inverse'"
2018-03-30 08:30:23 +08:00
[switch-off-text]="text.Disabled"
[switch-on-text]="text.Enabled"
2017-07-15 22:31:43 +08:00
[switch-handle-width]="'100'"
[switch-label-width]="'20'"
2018-11-02 23:24:37 +08:00
[(ngModel)]="settings.Client.enableOnScrollRendering">
2017-07-15 22:31:43 +08:00
< / bSwitch >
2018-05-14 04:59:57 +08:00
< small class = "form-text text-muted" i18n > Shows only the required amount of photos at once. Renders more if
page bottom is reached
< / small >
2017-07-15 22:31:43 +08:00
< / div >
< / div >
2018-05-14 04:59:57 +08:00
< div class = "form-group row" >
< label class = "col-md-2 control-label" for = "enableCache" i18n > Cache< / label >
< div class = "col-md-10" >
2017-07-15 22:31:43 +08:00
< bSwitch
id="enableCache"
class="switch"
name="enableCache"
[switch-on-color]="'primary'"
[switch-inverse]="'inverse'"
2018-03-30 08:30:23 +08:00
[switch-off-text]="text.Disabled"
[switch-on-text]="text.Enabled"
2017-07-15 22:31:43 +08:00
[switch-handle-width]="'100'"
[switch-label-width]="'20'"
2018-11-02 23:24:37 +08:00
[(ngModel)]="settings.Client.enableCache">
2017-07-15 22:31:43 +08:00
< / bSwitch >
2018-05-14 04:59:57 +08:00
< small class = "form-text text-muted" i18n > Caches directory contents and search results for better performance
< / small >
2017-07-15 22:31:43 +08:00
< / div >
< / div >
2018-11-02 23:24:37 +08:00
< p class = "title" i18n > Navigation bar:< / p >
< div class = "form-group row" >
< label class = "col-md-2 control-label" for = "showItemCount" [ hidden ] = " simplifiedMode " i18n > Show item count< / label >
< div class = "col-md-10" >
< bSwitch
id="showItemCount"
class="switch"
name="enableCache"
[switch-on-color]="'primary'"
[switch-inverse]="'inverse'"
[switch-off-text]="text.Disabled"
[switch-on-text]="text.Enabled"
[switch-handle-width]="'100'"
[switch-label-width]="'20'"
[(ngModel)]="settings.Client.NavBar.showItemCount">
< / bSwitch >
2018-11-02 23:42:33 +08:00
< small class = "form-text text-muted" i18n > Show the number of items (photos) in the folder
2018-11-02 23:24:37 +08:00
< / small >
< / div >
< / div >
2018-05-29 02:03:12 +08:00
< div class = "form-group row" [ hidden ] = " simplifiedMode " >
< label class = "col-md-2 control-label" for = "defaultPhotoSortingMethod" i18n > Default photo sorting method< / label >
< div class = "col-md-10" >
2018-11-02 23:24:37 +08:00
< select id = "defaultPhotoSortingMethod" class = "form-control" [ ( ngModel ) ] = " settings . Client . defaultPhotoSortingMethod "
2018-05-29 02:03:12 +08:00
name="defaultPhotoSortingMethod" required>
< option * ngFor = "let type of types" [ ngValue ] = " type . key " > {{type.key | stringifySorting}}
< / option >
< / select >
< / div >
< / div >
2018-05-14 04:59:57 +08:00
< button class = "btn btn-success float-right"
2017-07-15 22:31:43 +08:00
[disabled]="!settingsForm.form.valid || !changed || inProgress"
2017-12-25 07:42:25 +08:00
(click)="save()" i18n>Save
2017-07-15 22:31:43 +08:00
< / button >
2018-05-14 04:59:57 +08:00
< button class = "btn btn-default float-right"
2017-12-25 07:42:25 +08:00
(click)="reset()" i18n>Reset
2017-07-15 22:31:43 +08:00
< / button >
< / div >
< / div >
< / form >