Merge branch 'Murena-SAS-dev/default-timeline'
commit
d773f36ed1
|
@ -98,7 +98,7 @@ class OtherController extends GenericApiController
|
|||
'preview_generator_enabled' => Util::previewGeneratorIsEnabled(),
|
||||
|
||||
// general settings
|
||||
'timeline_path' => $getAppConfig('timelinePath', 'EMPTY'),
|
||||
'timeline_path' => $getAppConfig('timelinePath', Util::getSystemConfig('memories.timeline.default_path')),
|
||||
'enable_top_memories' => 'true' === $getAppConfig('enableTopMemories', 'true'),
|
||||
|
||||
// viewer settings
|
||||
|
|
|
@ -21,6 +21,10 @@ return [
|
|||
// Places database type identifier
|
||||
'memories.gis_type' => -1,
|
||||
|
||||
// Default timeline path for all users
|
||||
// If set to '_empty_', the user is prompted to select a path on first open (default)
|
||||
'memories.timeline.default_path' => '_empty_',
|
||||
|
||||
// Default viewer high resolution image loading condition
|
||||
// Valid values: 'always' | 'zoom' | 'never'
|
||||
'memories.viewer.high_res_cond_default' => 'zoom',
|
||||
|
|
|
@ -316,7 +316,8 @@ class Util
|
|||
public static function getTimelinePaths(string $uid): array
|
||||
{
|
||||
$config = \OC::$server->get(IConfig::class);
|
||||
$paths = $config->getUserValue($uid, Application::APPNAME, 'timelinePath', null) ?? 'Photos/';
|
||||
$paths = $config->getUserValue($uid, Application::APPNAME, 'timelinePath', null)
|
||||
?? self::getSystemConfig('memories.timeline.default_path');
|
||||
|
||||
return array_map(static fn ($p) => self::sanitizePath(trim($p)), explode(';', $paths));
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
<NcContent
|
||||
app-name="memories"
|
||||
v-else
|
||||
v-else-if="!isConfigUnknown"
|
||||
:class="{
|
||||
'remove-gap': removeOuterGap,
|
||||
'has-nav': showNavigation,
|
||||
|
@ -187,7 +187,11 @@ export default defineComponent({
|
|||
},
|
||||
|
||||
isFirstStart(): boolean {
|
||||
return this.config.timeline_path === 'EMPTY' && !this.routeIsPublic && !this.$route.query.noinit;
|
||||
return this.config.timeline_path === '_empty_' && !this.routeIsPublic && !this.$route.query.noinit;
|
||||
},
|
||||
|
||||
isConfigUnknown(): boolean {
|
||||
return this.config.timeline_path === '_unknown_';
|
||||
},
|
||||
|
||||
showAlbums(): boolean {
|
||||
|
|
|
@ -118,7 +118,7 @@ class StaticConfig {
|
|||
preview_generator_enabled: false,
|
||||
|
||||
// general settings
|
||||
timeline_path: '',
|
||||
timeline_path: '_unknown_',
|
||||
enable_top_memories: true,
|
||||
|
||||
// viewer settings
|
||||
|
|
Loading…
Reference in New Issue