diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index 547ba61c..7da3b4ce 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -63,24 +63,20 @@ class PageController extends Controller // Configuration $uid = $user->getUID(); - $this->initialState->provideInitialState('timelinePath', $this->config->getUserValue( - $uid, - Application::APPNAME, - 'timelinePath', - 'EMPTY' - )); - $this->initialState->provideInitialState('foldersPath', $this->config->getUserValue( - $uid, - Application::APPNAME, - 'foldersPath', - '/' - )); - $this->initialState->provideInitialState('showHidden', $this->config->getUserValue( - $uid, - Application::APPNAME, - 'showHidden', - false - )); + $pi = function ($key, $default) use ($uid) { + $this->initialState->provideInitialState($key, $this->config->getUserValue( + $uid, + Application::APPNAME, + $key, + $default + )); + }; + + // User configuration + $pi('timelinePath', 'EMPTY'); + $pi('foldersPath', '/'); + $pi('showHidden', false); + $pi('enableTopMemories', "true"); // Apps enabled $this->initialState->provideInitialState('systemtags', true === $this->appManager->isEnabledForUser('systemtags')); diff --git a/src/components/Settings.vue b/src/components/Settings.vue index 517d962a..38586653 100644 --- a/src/components/Settings.vue +++ b/src/components/Settings.vue @@ -47,6 +47,14 @@ > {{ t("memories", "Square grid mode") }} + + + {{ t("memories", "Show past photos on top of timeline") }} + "/" ) as string, + config_showHidden: loadState("memories", "showHidden", "false") === "true", + config_enableTopMemories: + loadState("memories", "enableTopMemories", "false") === "true", config_tagsEnabled: Boolean( loadState("memories", "systemtags", "") diff --git a/src/vue-globals.d.ts b/src/vue-globals.d.ts index 34f991dc..a693573c 100644 --- a/src/vue-globals.d.ts +++ b/src/vue-globals.d.ts @@ -24,6 +24,7 @@ declare module "vue" { config_albumsEnabled: boolean; config_placesGis: number; config_squareThumbs: boolean; + config_enableTopMemories: boolean; config_showFaceRect: boolean; config_eventName: string;