style: apply lint

pull/376/head
Raymond Huang 2023-02-01 12:08:11 +08:00
parent ea289c4f02
commit 750636de67
2 changed files with 22 additions and 16 deletions

View File

@ -99,8 +99,7 @@ trait TimelineQueryDays
bool $recursive, bool $recursive,
bool $archive, bool $archive,
array $queryTransforms = [] array $queryTransforms = []
): array ): array {
{
$query = $this->connection->getQueryBuilder(); $query = $this->connection->getQueryBuilder();
// Get all entries also present in filecache // Get all entries also present in filecache
@ -145,8 +144,7 @@ trait TimelineQueryDays
bool $recursive, bool $recursive,
bool $archive, bool $archive,
array $queryTransforms = [] array $queryTransforms = []
): array ): array {
{
$query = $this->connection->getQueryBuilder(); $query = $this->connection->getQueryBuilder();
// Get all entries also present in filecache // Get all entries also present in filecache
@ -261,7 +259,7 @@ trait TimelineQueryDays
$actualPath[1] = $actualPath[2]; $actualPath[1] = $actualPath[2];
$actualPath[2] = $tmp; $actualPath[2] = $tmp;
$davPath = implode('/', $actualPath); $davPath = implode('/', $actualPath);
$davPaths[$fileid] = Exif::removeExtraSlash('/' . $davPath . '/'); $davPaths[$fileid] = Exif::removeExtraSlash('/'.$davPath.'/');
} }
} }
} }
@ -294,7 +292,7 @@ trait TimelineQueryDays
if (0 === strpos($row['path'], $basePath)) { if (0 === strpos($row['path'], $basePath)) {
$rpath = substr($row['path'], \strlen($basePath)); $rpath = substr($row['path'], \strlen($basePath));
$row['filename'] = Exif::removeExtraSlash($davPath . $rpath); $row['filename'] = Exif::removeExtraSlash($davPath.$rpath);
} }
unset($row['path']); unset($row['path']);
@ -324,7 +322,7 @@ trait TimelineQueryDays
// Add WITH clause if needed // Add WITH clause if needed
if (false !== strpos($sql, 'cte_folders')) { if (false !== strpos($sql, 'cte_folders')) {
$sql = $CTE_SQL . ' ' . $sql; $sql = $CTE_SQL.' '.$sql;
} }
return $this->connection->executeQuery($sql, $params, $types); return $this->connection->executeQuery($sql, $params, $types);
@ -337,8 +335,7 @@ trait TimelineQueryDays
IQueryBuilder &$query, IQueryBuilder &$query,
TimelineRoot &$root, TimelineRoot &$root,
bool $archive bool $archive
) ) {
{
// Add query parameters // Add query parameters
$query->setParameter('topFolderIds', $root->getIds(), IQueryBuilder::PARAM_INT_ARRAY); $query->setParameter('topFolderIds', $root->getIds(), IQueryBuilder::PARAM_INT_ARRAY);
$query->setParameter('cteFoldersArchive', $archive, IQueryBuilder::PARAM_BOOL); $query->setParameter('cteFoldersArchive', $archive, IQueryBuilder::PARAM_BOOL);
@ -357,8 +354,7 @@ trait TimelineQueryDays
TimelineRoot &$root, TimelineRoot &$root,
bool $recursive, bool $recursive,
bool $archive bool $archive
) ) {
{
// Join with memories // Join with memories
$baseOp = $query->expr()->eq('f.fileid', 'm.fileid'); $baseOp = $query->expr()->eq('f.fileid', 'm.fileid');
if ($root->isEmpty()) { if ($root->isEmpty()) {

View File

@ -1,13 +1,23 @@
<template> <template>
<FirstStart v-if="isFirstStart" /> <FirstStart v-if="isFirstStart" />
<NcContent app-name="memories" v-else :class="{ <NcContent
'remove-gap': removeOuterGap, app-name="memories"
}"> v-else
:class="{
'remove-gap': removeOuterGap,
}"
>
<NcAppNavigation v-if="showNavigation" ref="nav"> <NcAppNavigation v-if="showNavigation" ref="nav">
<template id="app-memories-navigation" #list> <template id="app-memories-navigation" #list>
<NcAppNavigationItem v-for="item in navItems" :key="item.name" :to="{ name: item.name }" :title="item.title" <NcAppNavigationItem
@click="linkClick" exact> v-for="item in navItems"
:key="item.name"
:to="{ name: item.name }"
:title="item.title"
@click="linkClick"
exact
>
<component :is="item.icon" slot="icon" :size="20" /> <component :is="item.icon" slot="icon" :size="20" />
</NcAppNavigationItem> </NcAppNavigationItem>
</template> </template>