1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00
pigallery2/frontend/app/settings/basic/basic.settings.component.html

101 lines
4.1 KiB
HTML
Raw Normal View History

2017-07-15 22:09:48 +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>
Basic settings
</h5>
<div class="card-body">
2017-07-15 22:09:48 +08:00
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
2018-05-14 04:59:57 +08:00
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="applicationTitle" i18n>Page title</label>
<div class="col-md-10">
2017-07-15 22:09:48 +08:00
<input type="text" class="form-control" placeholder="Pigallery 2"
id="applicationTitle"
2017-07-15 23:29:40 +08:00
[(ngModel)]="settings.applicationTitle"
2017-07-15 22:09:48 +08:00
name="applicationTitle" required>
</div>
</div>
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="host" i18n>Host</label>
<div class="col-md-10">
<input type="text" class="form-control" placeholder="0.0.0.0"
id="host"
[(ngModel)]="settings.host"
name="host" required>
<small class="form-text text-muted" i18n>Server will accept connections from this IPv6 or IPv4 address.</small>
</div>
</div>
2018-05-14 04:59:57 +08:00
<div class="form-group row" [hidden]="simplifiedMode">
2018-05-28 23:51:52 +08:00
<label class="col-md-2 control-label" for="port" i18n>Port</label>
2018-05-14 04:59:57 +08:00
<div class="col-md-10">
2017-07-15 22:09:48 +08:00
<input type="number" class="form-control" placeholder="80"
id="port"
min="0"
step="1"
max="65535"
2017-07-15 23:29:40 +08:00
[(ngModel)]="settings.port"
2017-07-15 22:09:48 +08:00
name="port" required>
2018-05-14 04:59:57 +08:00
<small class="form-text text-muted" i18n>Port number. Port 80 is usually what you need.</small>
2017-07-15 22:09:48 +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="imagesFolder" i18n>Images folder</label>
2018-05-14 04:59:57 +08:00
<div class="col-md-10">
2017-07-15 22:09:48 +08:00
<input type="text" class="form-control" placeholder="path"
id="imagesFolder"
2017-07-15 23:29:40 +08:00
[(ngModel)]="settings.imagesFolder"
name="imagesFolder" required>
2018-05-14 04:59:57 +08:00
<small class="form-text text-muted" i18n>Images are loaded from this folder (read permission required)</small>
2017-07-15 22:09:48 +08:00
</div>
</div>
2018-05-14 04:59:57 +08:00
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="publicUrl" i18n>Page public url</label>
<div class="col-md-10">
2017-07-15 22:09:48 +08:00
<input type="url" class="form-control" placeholder="{{urlPlaceholder}}"
id="publicUrl"
2017-07-15 23:29:40 +08:00
[(ngModel)]="settings.publicUrl"
2018-05-18 07:58:14 +08:00
(change)="onUrlChanged()"
2017-07-15 22:09:48 +08:00
name="publicUrl">
2018-05-14 04:59:57 +08:00
<small class="form-text text-muted" i18n>If you access the page form local network its good to know the public
url for creating sharing link
</small>
2017-07-15 22:09:48 +08:00
</div>
</div>
2018-05-14 04:59:57 +08:00
<div class="form-group row" [hidden]="simplifiedMode">
<label class="col-md-2 control-label" for="urlBase" i18n>Url Base</label>
<div class="col-md-10">
<input type="url" class="form-control" placeholder="/myGallery"
id="urlBase"
[(ngModel)]="settings.urlBase"
2018-05-18 07:58:14 +08:00
(change)="onUrlBaseChanged()"
name="urlBase">
2018-05-14 04:59:57 +08:00
<small class="form-text text-muted" i18n>If you access the gallery under a sub url (like:
http://mydomain.com/myGallery), set it here. If not working you might miss the '/' from the beginning of the
url.
</small>
</div>
</div>
2018-05-18 07:58:14 +08:00
<div *ngIf="urlError===true" class="alert alert-warning" role="alert" i18n>
The public url and the url base are not matching. Some of the functionality might not work.
</div>
2018-05-14 04:59:57 +08:00
<button class="btn btn-success float-right"
2017-07-15 22:09:48 +08:00
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
2017-07-15 22:09:48 +08:00
</button>
2018-05-14 04:59:57 +08:00
<button class="btn btn-default float-right"
(click)="reset()" i18n>Reset
2017-07-15 22:09:48 +08:00
</button>
</div>
</div>
</form>