Merge branch 'pulsejet:master' into issue-738.ux-improvements

pull/752/head
Alex Saltykov 2023-07-31 19:13:57 +03:00 committed by GitHub
commit 9ef9c573f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 44 additions and 40 deletions

View File

@ -4,7 +4,9 @@ description: Steps to configure support for different image and video formats
# File type support # File type support
Memories supports the file types supported by the Nextcloud previews app. If you add support for any one of the file types below, you must run `occ memories:index` to index these files. Memories supports the file types supported by the Nextcloud previews app. File type support is determined in part by the values listed in the `enabledPreviewProviders` configuration parameter in your configuration file. If your `config.php` does not contain an `enabledPreviewProviders` array, this means you are using Nextcloud's defaults. Copy the array over from `config.sample.php` before adding any of the values below, or else you will effectively disable all of the defaults.
If you add support for any one of the file types below, you must run `occ memories:index` to index these files.
## Common Formats ## Common Formats
@ -15,40 +17,33 @@ GIF (image/gif)
BMP (image/bmp) BMP (image/bmp)
``` ```
These are enabled by having the following in your `config.php`, These are enabled by inclusion of the following values in `config.php`'s `enabledPreviewProviders` array:
```php ```php
'enabledPreviewProviders' => 'OC\Preview\Image',
array (
'OC\\Preview\\Image',
),
``` ```
## HEIC and TIFF ## HEIC and TIFF
You must enable `HEIC` and `TIFF` in Nextcloud `config.php`, and install Imagemagick (included in the official Nextcloud docker image) These are enabled by inclusion of the following values in `config.php`'s `enabledPreviewProviders` array:
In `config.php`, add,
```php ```php
'enabledPreviewProviders' => 'OC\Preview\HEIC',
array ( 'OC\Preview\TIFF',
'OC\\Preview\\HEIC',
'OC\\Preview\\TIFF',
),
``` ```
You must also install Imagemagick (included in the official Nextcloud docker image).
## Videos ## Videos
You need to install `ffmpeg` and add the video config to `config.php` These are enabled by inclusion of the following value in `config.php`'s `enabledPreviewProviders` array:
```php ```php
'enabledPreviewProviders' => 'OC\Preview\Movie',
array (
'OC\\Preview\\Movie',
),
``` ```
You must also install `ffmpeg` and add the video config to `config.php`.
## RAW images ## RAW images
Install the [camera raw previews](https://github.com/ariselseng/camerarawpreviews) app from the Nextcloud app store. Install the [camera raw previews](https://github.com/ariselseng/camerarawpreviews) app from the Nextcloud app store.

8
l10n/gl.js vendored
View File

@ -347,10 +347,10 @@ OC.L10N.register(
"Draw" : "Debuxar", "Draw" : "Debuxar",
"Resize" : "Cambiar o tamaño", "Resize" : "Cambiar o tamaño",
"Invalid image." : "Imaxe incorrecta", "Invalid image." : "Imaxe incorrecta",
"Error while uploading the image." : "Produciuse un erro ao cargar a imaxe.", "Error while uploading the image." : "Produciuse un erro ao enviar a imaxe.",
"are not images" : "non son imaxes", "are not images" : "non son imaxes",
"is not an image" : "non é unha imaxe", "is not an image" : "non é unha imaxe",
"to be uploaded" : "para cargar", "to be uploaded" : "para enviar",
"Crop" : "Recortar", "Crop" : "Recortar",
"Original" : "Orixinal", "Original" : "Orixinal",
"Custom" : "Personalizado", "Custom" : "Personalizado",
@ -396,7 +396,7 @@ OC.L10N.register(
"Warmth" : "Calor", "Warmth" : "Calor",
"+ Add watermark" : "+ Engadir marca de auga", "+ Add watermark" : "+ Engadir marca de auga",
"Choose watermark type" : "Escoller o tipo de marca de auga", "Choose watermark type" : "Escoller o tipo de marca de auga",
"Upload watermark" : "Cargar a marca de auga", "Upload watermark" : "Enviar a marca de auga",
"Add as text" : "Engadir como texto", "Add as text" : "Engadir como texto",
"Padding" : "Recheo", "Padding" : "Recheo",
"Shadow" : "Sombra", "Shadow" : "Sombra",
@ -431,7 +431,7 @@ OC.L10N.register(
"Failed to favorite some files." : "Produciuse un fallo ao marcar algúns ficheiros como favoritos.", "Failed to favorite some files." : "Produciuse un fallo ao marcar algúns ficheiros como favoritos.",
"Failed to favorite {fileName}." : "Produciuse un fallo ao marcar {fileName} como favorito.", "Failed to favorite {fileName}." : "Produciuse un fallo ao marcar {fileName} como favorito.",
"Memories has been updated to {version}. Reload to get the new version." : "Lembranzas foi actualizado á versión {version}. Volva cargar para obter a nova versión.", "Memories has been updated to {version}. Reload to get the new version." : "Lembranzas foi actualizado á versión {version}. Volva cargar para obter a nova versión.",
"Upload some photos and make sure the timeline path is configured" : "Carga algunhas fotos e asegúrese de que a ruta da liña temporal estea configurada", "Upload some photos and make sure the timeline path is configured" : "Envíe algunhas fotos e asegúrese de que a ruta da liña temporal estea configurada",
"Mark photos as favorite to find them easily" : "Marcar as fotos como favoritas para atopalas facilmente", "Mark photos as favorite to find them easily" : "Marcar as fotos como favoritas para atopalas facilmente",
"Memories from past years will appear here" : "Aquí aparecerán lembranzas de anos pasados", "Memories from past years will appear here" : "Aquí aparecerán lembranzas de anos pasados",
"You will find your friends soon. Please be patient" : "Logo atopará os seus amigos. Teña paciencia", "You will find your friends soon. Please be patient" : "Logo atopará os seus amigos. Teña paciencia",

8
l10n/gl.json vendored
View File

@ -345,10 +345,10 @@
"Draw" : "Debuxar", "Draw" : "Debuxar",
"Resize" : "Cambiar o tamaño", "Resize" : "Cambiar o tamaño",
"Invalid image." : "Imaxe incorrecta", "Invalid image." : "Imaxe incorrecta",
"Error while uploading the image." : "Produciuse un erro ao cargar a imaxe.", "Error while uploading the image." : "Produciuse un erro ao enviar a imaxe.",
"are not images" : "non son imaxes", "are not images" : "non son imaxes",
"is not an image" : "non é unha imaxe", "is not an image" : "non é unha imaxe",
"to be uploaded" : "para cargar", "to be uploaded" : "para enviar",
"Crop" : "Recortar", "Crop" : "Recortar",
"Original" : "Orixinal", "Original" : "Orixinal",
"Custom" : "Personalizado", "Custom" : "Personalizado",
@ -394,7 +394,7 @@
"Warmth" : "Calor", "Warmth" : "Calor",
"+ Add watermark" : "+ Engadir marca de auga", "+ Add watermark" : "+ Engadir marca de auga",
"Choose watermark type" : "Escoller o tipo de marca de auga", "Choose watermark type" : "Escoller o tipo de marca de auga",
"Upload watermark" : "Cargar a marca de auga", "Upload watermark" : "Enviar a marca de auga",
"Add as text" : "Engadir como texto", "Add as text" : "Engadir como texto",
"Padding" : "Recheo", "Padding" : "Recheo",
"Shadow" : "Sombra", "Shadow" : "Sombra",
@ -429,7 +429,7 @@
"Failed to favorite some files." : "Produciuse un fallo ao marcar algúns ficheiros como favoritos.", "Failed to favorite some files." : "Produciuse un fallo ao marcar algúns ficheiros como favoritos.",
"Failed to favorite {fileName}." : "Produciuse un fallo ao marcar {fileName} como favorito.", "Failed to favorite {fileName}." : "Produciuse un fallo ao marcar {fileName} como favorito.",
"Memories has been updated to {version}. Reload to get the new version." : "Lembranzas foi actualizado á versión {version}. Volva cargar para obter a nova versión.", "Memories has been updated to {version}. Reload to get the new version." : "Lembranzas foi actualizado á versión {version}. Volva cargar para obter a nova versión.",
"Upload some photos and make sure the timeline path is configured" : "Carga algunhas fotos e asegúrese de que a ruta da liña temporal estea configurada", "Upload some photos and make sure the timeline path is configured" : "Envíe algunhas fotos e asegúrese de que a ruta da liña temporal estea configurada",
"Mark photos as favorite to find them easily" : "Marcar as fotos como favoritas para atopalas facilmente", "Mark photos as favorite to find them easily" : "Marcar as fotos como favoritas para atopalas facilmente",
"Memories from past years will appear here" : "Aquí aparecerán lembranzas de anos pasados", "Memories from past years will appear here" : "Aquí aparecerán lembranzas de anos pasados",
"You will find your friends soon. Please be patient" : "Logo atopará os seus amigos. Teña paciencia", "You will find your friends soon. Please be patient" : "Logo atopará os seus amigos. Teña paciencia",

1
l10n/pt_BR.js vendored
View File

@ -168,6 +168,7 @@ OC.L10N.register(
"Enable NVENC Temporal AQ" : "Habilitar NVENC Temporal AQ", "Enable NVENC Temporal AQ" : "Habilitar NVENC Temporal AQ",
"NPP scaler" : "Escalador NPP", "NPP scaler" : "Escalador NPP",
"CUDA scaler" : "Escalador CUDA", "CUDA scaler" : "Escalador CUDA",
"not recommended" : "não recomendado",
"VA-API device ({dev}) is readable" : "O dispositivo VA-API ({dev}) é legível", "VA-API device ({dev}) is readable" : "O dispositivo VA-API ({dev}) é legível",
"VA-API device ({dev}) not found" : "Dispositivo VA-API ({dev}) não encontrado", "VA-API device ({dev}) not found" : "Dispositivo VA-API ({dev}) não encontrado",
"VA-API device ({dev}) has incorrect permissions" : "O dispositivo VA-API ({dev}) tem permissões incorretas", "VA-API device ({dev}) has incorrect permissions" : "O dispositivo VA-API ({dev}) tem permissões incorretas",

1
l10n/pt_BR.json vendored
View File

@ -166,6 +166,7 @@
"Enable NVENC Temporal AQ" : "Habilitar NVENC Temporal AQ", "Enable NVENC Temporal AQ" : "Habilitar NVENC Temporal AQ",
"NPP scaler" : "Escalador NPP", "NPP scaler" : "Escalador NPP",
"CUDA scaler" : "Escalador CUDA", "CUDA scaler" : "Escalador CUDA",
"not recommended" : "não recomendado",
"VA-API device ({dev}) is readable" : "O dispositivo VA-API ({dev}) é legível", "VA-API device ({dev}) is readable" : "O dispositivo VA-API ({dev}) é legível",
"VA-API device ({dev}) not found" : "Dispositivo VA-API ({dev}) não encontrado", "VA-API device ({dev}) not found" : "Dispositivo VA-API ({dev}) não encontrado",
"VA-API device ({dev}) has incorrect permissions" : "O dispositivo VA-API ({dev}) tem permissões incorretas", "VA-API device ({dev}) has incorrect permissions" : "O dispositivo VA-API ({dev}) tem permissões incorretas",

View File

@ -81,7 +81,6 @@ export default defineComponent({
methods: { methods: {
async routeChange() { async routeChange() {
try { try {
const route = this.$route.name;
this.items = []; this.items = [];
this.loading++; this.loading++;
@ -89,13 +88,13 @@ export default defineComponent({
// @ts-ignore // @ts-ignore
await this.$refs.dtm?.refresh?.(); await this.$refs.dtm?.refresh?.();
if (route === 'albums') { if (this.routeIsAlbums) {
this.items = await dav.getAlbums(3, this.config.album_list_sort); this.items = await dav.getAlbums(3, this.config.album_list_sort);
} else if (route === 'tags') { } else if (this.routeIsTags) {
this.items = await dav.getTags(); this.items = await dav.getTags();
} else if (route === 'recognize' || route === 'facerecognition') { } else if (this.routeIsPeople) {
this.items = await dav.getFaceList(route); this.items = await dav.getFaceList(<any>this.$route.name);
} else if (route === 'places') { } else if (this.routeIsPlaces) {
this.items = await dav.getPlaces(); this.items = await dav.getPlaces();
} }
} finally { } finally {

View File

@ -211,13 +211,13 @@ export default defineComponent({
routeHasNative(): boolean { routeHasNative(): boolean {
return this.routeIsBase && nativex.has(); return this.routeIsBase && nativex.has();
}, },
isMonthView(): boolean { isMonthView(): boolean {
if (this.$route.query.sort === 'timeline') return false; if (this.$route.query.sort === 'timeline') return false;
if (this.$route.query.sort === 'album') return true;
return ( return (
this.$route.query.sort === 'album' || (this.config.sort_album_month && (this.routeIsAlbums || this.routeIsAlbumShare)) ||
(this.config.sort_album_month && (this.$route.name === 'albums' || this.$route.name === 'album-share')) || (this.config.sort_folder_month && this.routeIsFolders)
(this.config.sort_folder_month && this.$route.name === 'folders')
); );
}, },

View File

@ -46,6 +46,9 @@ export default defineComponent({
routeIsExplore(): boolean { routeIsExplore(): boolean {
return this.$route.name === 'explore'; return this.$route.name === 'explore';
}, },
routeIsAlbumShare(): boolean {
return this.$route.name === 'album-share';
},
routeIsPublic(): boolean { routeIsPublic(): boolean {
return this.$route.name?.endsWith('-share') ?? false; return this.$route.name?.endsWith('-share') ?? false;
}, },

View File

@ -28,9 +28,13 @@ export function getAlbumPath(user: string, name: string) {
export async function getAlbums(type: 1 | 2 | 3, sortOrder: 1 | 2) { export async function getAlbums(type: 1 | 2 | 3, sortOrder: 1 | 2) {
const data = (await axios.get<IAlbum[]>(API.ALBUM_LIST(type))).data; const data = (await axios.get<IAlbum[]>(API.ALBUM_LIST(type))).data;
// Response is already sorted by date, sort otherwise // Sort the response
if (sortOrder === 2) { switch (sortOrder) {
data.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base' })); case 2:
data.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }));
break;
default:
data.sort((a, b) => b.last_added_photo - a.last_added_photo);
} }
return data; return data;

View File

@ -22,6 +22,7 @@ declare module 'vue' {
routeIsMap: boolean; routeIsMap: boolean;
routeIsTags: boolean; routeIsTags: boolean;
routeIsExplore: boolean; routeIsExplore: boolean;
routeIsAlbumShare: boolean;
routeIsPublic: boolean; routeIsPublic: boolean;
} }
} }