diff --git a/README.md b/README.md index 9760801..435693f 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,11 @@ [](https://badge.fury.io/js/pigallery2) [](https://travis-ci.org/bpatrik/pigallery2) [](https://pigallery2.herokuapp.com) +[](https://hub.docker.com/r/bpatrik/pigallery2/) [](https://david-dm.org/bpatrik/pigallery2) [](https://david-dm.org/bpatrik/pigallery2?type=dev) + Homepage: http://bpatrik.github.io/pigallery2/ This is a directory-first photo gallery website, optimised for running on low resource servers (especially on raspberry pi) @@ -33,8 +35,8 @@ sudo apt-get install -y nodejs Full node install on raspberry pi description: https://www.w3schools.com/nodejs/nodejs_raspberrypi.asp -### 1.1.2 Install PiGallery2 -#### 1.1.2-a Install from release +### 1.1.1 Install PiGallery2 +#### 1.1.1-a Install from release ```bash cd ~ @@ -43,7 +45,7 @@ unzip pigallery2.zip cd pigallery2 npm install ``` -#### 1.1.2-b Install from source +#### 1.1.1-b Install from source ```bash cd ~ wget https://github.com/bpatrik/pigallery2/archive/master.zip @@ -53,7 +55,7 @@ npm install ``` **Note**: if you run `npm run build-release`, it creates a clean, minified, production ready version from the app in the `release` folder, that is ready to deploy. -#### 1.1.3 Run PiGallery2 +#### 1.1.2 Run PiGallery2 ```bash npm start ``` @@ -78,12 +80,25 @@ After the container is up and running, you go to `http://localhost` and log in w **Note**: You dont need to do the installation steps if you are using docker. -### 1.3 Useful links/tips: + +### 1.3 Advanced configuration +You can set up the app the following ways: + * Using the UI + * Manually editing the `config.json` + * Through switches + * Like: `node backend/index.js --Server-port=3000 --Client-authenticationRequired=false` + * You can check the generated `config.json` for the config hierarchy + * Through environmental variable + * like set env. variable `Server-port` to `3000` + +### 1.4 Useful links/tips: #### using nginx +It is recommended to use a reverse proxy like nginx before node https://stackoverflow.com/questions/5009324/node-js-nginx-what-now #### making https +With cerbot & nginx it is simple to set up secure connection. You have no excuse not doing so. https://certbot.eff.org/ #### node install error: diff --git a/backend/middlewares/AdminMWs.ts b/backend/middlewares/AdminMWs.ts index 00500d1..9223453 100644 --- a/backend/middlewares/AdminMWs.ts +++ b/backend/middlewares/AdminMWs.ts @@ -315,6 +315,7 @@ export class AdminMWs { try { const settings: OtherConfigDTO = req.body.settings; Config.Client.Other.enableCache = settings.Client.enableCache; + Config.Client.Other.captionFirstNaming = settings.Client.captionFirstNaming; Config.Client.Other.enableOnScrollRendering = settings.Client.enableOnScrollRendering; Config.Client.Other.enableOnScrollThumbnailPrioritising = settings.Client.enableOnScrollThumbnailPrioritising; Config.Client.Other.defaultPhotoSortingMethod = settings.Client.defaultPhotoSortingMethod; @@ -323,6 +324,7 @@ export class AdminMWs { // only updating explicitly set config (not saving config set by the diagnostics) const original: PrivateConfigClass = Config.original(); original.Client.Other.enableCache = settings.Client.enableCache; + original.Client.Other.captionFirstNaming = settings.Client.captionFirstNaming; original.Client.Other.enableOnScrollRendering = settings.Client.enableOnScrollRendering; original.Client.Other.enableOnScrollThumbnailPrioritising = settings.Client.enableOnScrollThumbnailPrioritising; original.Client.Other.defaultPhotoSortingMethod = settings.Client.defaultPhotoSortingMethod; diff --git a/common/config/public/ConfigClass.ts b/common/config/public/ConfigClass.ts index 31b7c96..f2abd83 100644 --- a/common/config/public/ConfigClass.ts +++ b/common/config/public/ConfigClass.ts @@ -42,6 +42,7 @@ export module ClientConfig { defaultPhotoSortingMethod: SortingMethods; enableOnScrollThumbnailPrioritising: boolean; NavBar: NavBarConfig; + captionFirstNaming: boolean; // shows the caption instead of the filename in the phot grid } export interface VideoConfig { @@ -111,6 +112,7 @@ export class PublicConfigClass { enabled: true }, Other: { + captionFirstNaming: false, enableCache: true, enableOnScrollRendering: true, enableOnScrollThumbnailPrioritising: true, diff --git a/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html b/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html index f1e7173..e285d65 100644 --- a/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html +++ b/frontend/app/gallery/grid/photo/photo.grid.gallery.component.html @@ -23,7 +23,7 @@ [style.margin-top.px]="infoBar.marginTop" [style.background]="infoBar.background" [style.width.px]="container.nativeElement.offsetWidth"> -