chore: update prettier

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/877/head
Varun Patil 2023-10-14 13:06:36 -07:00
parent ba4c055fea
commit 1bc5f58f91
48 changed files with 141 additions and 96 deletions

View File

@ -53,7 +53,7 @@ jobs:
uses: actions/checkout@v3
- name: Install Pretter
run: npm install -g prettier
run: npm install --no-save "prettier@$(cat ./package.json | jq -r '.devDependencies["prettier"]')"
- name: Run Prettier
run: npx prettier src --check

48
package-lock.json generated
View File

@ -43,6 +43,7 @@
"@types/url-parse": "^1.4.9",
"@types/videojs-contrib-quality-levels": "^2.0.2",
"playwright": "^1.39.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"workbox-webpack-plugin": "^7.0.0"
},
@ -2880,6 +2881,23 @@
"url": "https://opencollective.com/postcss/"
}
},
"node_modules/@vue/component-compiler-utils/node_modules/prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"prettier": "bin-prettier.js"
},
"engines": {
"node": ">=10.13.0"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
}
},
"node_modules/@vueuse/components": {
"version": "10.1.2",
"resolved": "https://registry.npmjs.org/@vueuse/components/-/components-10.1.2.tgz",
@ -8430,17 +8448,15 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"node_modules/prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"dev": true,
"optional": true,
"peer": true,
"bin": {
"prettier": "bin-prettier.js"
"prettier": "bin/prettier.cjs"
},
"engines": {
"node": ">=10.13.0"
"node": ">=14"
},
"funding": {
"url": "https://github.com/prettier/prettier?sponsor=1"
@ -14012,6 +14028,14 @@
"picocolors": "^0.2.1",
"source-map": "^0.6.1"
}
},
"prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"dev": true,
"optional": true,
"peer": true
}
}
},
@ -18093,12 +18117,10 @@
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
},
"prettier": {
"version": "2.8.8",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
"dev": true,
"optional": true,
"peer": true
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
"dev": true
},
"pretty-bytes": {
"version": "5.6.0",

View File

@ -71,6 +71,7 @@
"@types/url-parse": "^1.4.9",
"@types/videojs-contrib-quality-levels": "^2.0.2",
"playwright": "^1.39.0",
"prettier": "^3.0.3",
"typescript": "^5.2.2",
"workbox-webpack-plugin": "^7.0.0"
}

View File

@ -294,7 +294,7 @@ export default defineComponent({
this.metadataComponent?.$destroy?.();
this.metadataComponent = null;
},
})
}),
);
// Check for native interface

View File

@ -604,7 +604,9 @@ export default defineComponent({
z-index: 100; // below top-matter and top-bar
cursor: ns-resize;
opacity: 0;
transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
transition:
opacity 0.2s ease-in-out,
visibility 0.2s ease-in-out;
// Show on hover or scroll of main window
&:hover,

View File

@ -462,7 +462,7 @@ export default defineComponent({
} else {
this.touchScrollDelta = Math.min(
(touch.clientY - _m.window.innerHeight + TOUCH_SELECT_CLAMP.bottom) / 3,
TOUCH_SELECT_CLAMP.maxDelta
TOUCH_SELECT_CLAMP.maxDelta,
);
}
@ -501,7 +501,7 @@ export default defineComponent({
const recyclerRect = this.recycler?.getBoundingClientRect();
const clampedY = Math.max(
(recyclerRect?.top ?? 0) + TOUCH_SELECT_CLAMP.bufferPx,
Math.min((recyclerRect?.bottom ?? 0) - TOUCH_SELECT_CLAMP.bufferPx, touch.clientY)
Math.min((recyclerRect?.bottom ?? 0) - TOUCH_SELECT_CLAMP.bufferPx, touch.clientY),
);
// Which photo is the cursor over, if any

View File

@ -245,7 +245,7 @@ export default defineComponent({
async chooseFoldersPath() {
const newPath = await utils.chooseNcFolder(
this.t('memories', 'Choose the root for the folders view'),
this.config.folders_path
this.config.folders_path,
);
if (newPath !== this.config.folders_path) {

View File

@ -68,7 +68,7 @@ export default defineComponent({
},
},
},
globalThis.OCA.Files
globalThis.OCA.Files,
);
}
},

View File

@ -233,7 +233,9 @@ export default defineComponent({
opacity: 0.1;
cursor: col-resize;
margin: 0 0 0 auto;
transition: opacity 0.4s ease-out, background-color 0.4s ease-out;
transition:
opacity 0.4s ease-out,
background-color 0.4s ease-out;
}
> .separator:hover {
@ -273,7 +275,9 @@ export default defineComponent({
// Note: you can't use transforms to animate the top
// because it causes the viewer to be rendered incorrectly
transition: top 0.2s ease, height 0.2s ease;
transition:
top 0.2s ease,
height 0.2s ease;
> .timeline-header {
height: 58px;

View File

@ -1069,7 +1069,7 @@ export default defineComponent({
numCols: this.numCols,
allowBreakout: this.allowBreakout(),
seed: dayId,
}
},
);
// Check if some rows were added
@ -1359,7 +1359,10 @@ export default defineComponent({
left: 0;
cursor: pointer;
height: 100%;
transition: width 0.2s ease-in-out, height 0.2s ease-in-out, transform 0.2s ease-in-out; // reflow
transition:
width 0.2s ease-in-out,
height 0.2s ease-in-out,
transform 0.2s ease-in-out; // reflow
}
/** Dynamic top matter */

View File

@ -62,7 +62,7 @@ export default defineComponent({
info: status.substring(10),
},
0,
noescape
noescape,
);
} else if (status.startsWith('test_ok')) {
return this.t(
@ -73,7 +73,7 @@ export default defineComponent({
info: status.substring(8),
},
0,
noescape
noescape,
);
} else {
return this.t('memories', '{name} binary status: {status}.', {

View File

@ -35,7 +35,7 @@
{{
t(
'memories',
'Looks like it has been more than an hour since the last index job was run. Make sure Nextcloud cron is configured correctly.'
'Looks like it has been more than an hour since the last index job was run. Make sure Nextcloud cron is configured correctly.',
)
}}
</NcNoteCard>
@ -43,7 +43,7 @@
{{
t(
'memories',
'Only server-side encryption (OC_DEFAULT_MODULE) is supported, but another encryption module is enabled.'
'Only server-side encryption (OC_DEFAULT_MODULE) is supported, but another encryption module is enabled.',
)
}}
</NcNoteCard>
@ -53,7 +53,7 @@
{{
t(
'memories',
'The EXIF indexes are built and checked in a periodic background task. Be careful when selecting anything other than automatic indexing. For example, setting the indexing to only timeline folders may cause delays before media becomes available to users, since the user configures the timeline only after logging in.'
'The EXIF indexes are built and checked in a periodic background task. Be careful when selecting anything other than automatic indexing. For example, setting the indexing to only timeline folders may cause delays before media becomes available to users, since the user configures the timeline only after logging in.',
)
}}
{{ t('memories', 'Folders with a ".nomedia" or a ".nomemories" file are always excluded from indexing.') }}

View File

@ -9,7 +9,7 @@
? t('memories', 'HTTPS is enabled')
: t(
'memories',
'You are accessing this page over an insecure context. Several browser APIs are not available, which will make Memories very slow. Enable HTTPS on your server to improve performance.'
'You are accessing this page over an insecure context. Several browser APIs are not available, which will make Memories very slow. Enable HTTPS on your server to improve performance.',
)
}}
</NcNoteCard>

View File

@ -39,14 +39,14 @@
{{
t(
'memories',
'Memories supports offline reverse geocoding using the OpenStreetMaps data on MySQL and Postgres.'
'Memories supports offline reverse geocoding using the OpenStreetMaps data on MySQL and Postgres.',
)
}}
<br />
{{
t(
'memories',
'You need to download the planet data into your database. This is highly recommended and has low overhead.'
'You need to download the planet data into your database. This is highly recommended and has low overhead.',
)
}}
<br />
@ -116,7 +116,7 @@ export default defineComponent({
// construct warning
const warnSetup = this.t(
'memories',
'Looks like the database is already setup. Are you sure you want to redownload planet data?'
'Looks like the database is already setup. Are you sure you want to redownload planet data?',
);
const warnLong = this.t('memories', 'You are about to download the planet database. This may take a while.');
const warnReindex = this.t('memories', 'This may also cause all photos to be re-indexed!');

View File

@ -8,7 +8,7 @@
{{
t(
'memories',
'Note that this may be very CPU intensive without hardware acceleration, and transcoding will not be used for external storage.'
'Note that this may be very CPU intensive without hardware acceleration, and transcoding will not be used for external storage.',
)
}}

View File

@ -15,7 +15,7 @@
{{
t(
'memories',
'Intel processors supporting QuickSync Video (QSV) as well as some AMD GPUs can be used for transcoding using VA-API acceleration.'
'Intel processors supporting QuickSync Video (QSV) as well as some AMD GPUs can be used for transcoding using VA-API acceleration.',
)
}}
{{ t('memories', 'For more details on driver installation, check the documentation:') }}
@ -52,7 +52,7 @@
{{
t(
'memories',
'Depending on the versions of the installed SDK and ffmpeg, you need to specify the scaler to use'
'Depending on the versions of the installed SDK and ffmpeg, you need to specify the scaler to use',
)
}}
@ -102,7 +102,7 @@
{{
t(
'memories',
'Due to a bug in certain hardware drivers, videos may appear in incorrect orientations when streaming. This can be resolved in some cases by rotating the video on the accelerator.'
'Due to a bug in certain hardware drivers, videos may appear in incorrect orientations when streaming. This can be resolved in some cases by rotating the video on the accelerator.',
)
}}
<br />

View File

@ -5,7 +5,7 @@
{{
t(
'memories',
'Memories uses the go-vod transcoder. You can run go-vod exernally (e.g. in a separate Docker container for hardware acceleration) or use the built-in transcoder. To use an external transcoder, enable the following option and follow the instructions in the documentation:'
'Memories uses the go-vod transcoder. You can run go-vod exernally (e.g. in a separate Docker container for hardware acceleration) or use the built-in transcoder. To use an external transcoder, enable the following option and follow the instructions in the documentation:',
)
}}
<a target="_blank" href="https://memories.gallery/hw-transcoding/">

View File

@ -207,7 +207,7 @@ export default defineComponent({
this.data.facerect.x * img.naturalWidth,
this.data.facerect.y * img.naturalHeight,
this.data.facerect.w * img.naturalWidth,
this.data.facerect.h * img.naturalHeight
this.data.facerect.h * img.naturalHeight,
);
canvas.toBlob(
@ -216,7 +216,7 @@ export default defineComponent({
this.faceSrc = URL.createObjectURL(blob);
},
'image/jpeg',
0.95
0.95,
);
},
@ -263,7 +263,10 @@ export default defineComponent({
padding: 1px;
}
transition: background-color 0.15s ease, opacity 0.2s ease-in, transform 0.2s ease-in;
transition:
background-color 0.15s ease,
opacity 0.2s ease-in,
transform 0.2s ease-in;
&.leaving {
transform: scale(0.9);
@ -390,7 +393,9 @@ div.img-outer {
-webkit-tap-highlight-color: transparent;
-webkit-touch-callout: none;
pointer-events: none;
transition: border-radius 0.1s ease-in, transform 0.3s ease-in-out;
transition:
border-radius 0.1s ease-in,
transform 0.3s ease-in-out;
.p-outer.placeholder > & {
display: none;

View File

@ -215,7 +215,7 @@ export default defineComponent({
listableSelectedCollaboratorsKeys(): string[] {
return this.selectedCollaboratorsKeys.filter(
(collaboratorKey) => this.availableCollaborators[collaboratorKey].type !== Type.SHARE_TYPE_LINK
(collaboratorKey) => this.availableCollaborators[collaboratorKey].type !== Type.SHARE_TYPE_LINK,
);
},

View File

@ -87,7 +87,7 @@ export default defineComponent({
showError(
this.t('photos', 'Failed to delete {name}.', {
name: this.name,
})
}),
);
}
},

View File

@ -178,7 +178,7 @@ export default defineComponent({
this.dayLast,
this.hourLast,
this.minuteLast,
this.secondLast
this.secondLast,
);
},

View File

@ -202,13 +202,13 @@ export default defineComponent({
(p) =>
!p.imageInfo?.exif?.DateTimeOriginal &&
!p.imageInfo?.exif?.CreateDate &&
!exifs.get(p.fileid)!.DateTimeOriginal
!exifs.get(p.fileid)!.DateTimeOriginal,
) &&
(await utils.confirmDestructive({
title: this.t('memories', 'Missing date metadata'),
message: this.t(
'memories',
'Some items may be missing the date metadata. Do you want to attempt copying the currently known timestamp to the metadata (recommended)? Othewise, the timestamp may be reset to the current time.'
'Some items may be missing the date metadata. Do you want to attempt copying the currently known timestamp to the metadata (recommended)? Othewise, the timestamp may be reset to the current time.',
),
}))
) {
@ -280,7 +280,7 @@ export default defineComponent({
showError(
this.t('memories', 'Failed to load metadata for {n} photos.', {
n: photos.length - valid.length,
})
}),
);
}
@ -290,7 +290,7 @@ export default defineComponent({
showError(
this.t('memories', '{n} photos cannot be edited (permissions error).', {
n: valid.length - updatable.length,
})
}),
);
}

View File

@ -130,7 +130,7 @@ export default defineComponent({
// replace the temporary tag ID with the real one
const i = add.findIndex((y) => y === x.id);
add[i] = tag.id;
})
}),
);
}

View File

@ -63,7 +63,7 @@ export default defineComponent({
showError(
this.t('memories', 'Only user "{user}" can delete this person', {
user,
})
}),
);
return;
}
@ -89,7 +89,7 @@ export default defineComponent({
showError(
this.t('photos', 'Failed to delete {name}.', {
name: this.name,
})
}),
);
}
},

View File

@ -80,7 +80,7 @@ export default defineComponent({
showError(
this.t('memories', 'Only user "{user}" can update this person', {
user,
})
}),
);
return;
}
@ -118,7 +118,7 @@ export default defineComponent({
this.t('photos', 'Failed to rename {oldName} to {name}.', {
oldName: this.oldName,
name: this.name,
})
}),
);
}
},

View File

@ -66,7 +66,7 @@ export default defineComponent({
showError(
this.t('memories', 'Only user "{user}" can update this person', {
user,
})
}),
);
return;
}
@ -116,7 +116,7 @@ export default defineComponent({
try {
await client.moveFile(
`/recognize/${user}/faces/${name}/${p.basename}`,
`/recognize/${face.user_id}/faces/${newName}/${p.basename}`
`/recognize/${face.user_id}/faces/${newName}/${p.basename}`,
);
} catch (e) {
console.error(e);

View File

@ -64,7 +64,7 @@ export default defineComponent({
showError(
this.t('memories', 'Only user "{user}" can update this person', {
user,
})
}),
);
return;
}

View File

@ -64,7 +64,7 @@ export default defineComponent({
let destination = await utils.chooseNcFolder(
this.t('memories', 'Choose a folder'),
this.config.folders_path,
FilePickerType.Move
FilePickerType.Move,
);
// Fails if the target exists, same behavior with Nextcloud files implementation.
const gen = dav.movePhotos(this.photos, destination, false);

View File

@ -173,7 +173,7 @@ export default defineComponent({
async downloadAlbum() {
const res = await axios.post(
API.ALBUM_DOWNLOAD(<string>this.$route.params.user, <string>this.$route.params.name)
API.ALBUM_DOWNLOAD(<string>this.$route.params.user, <string>this.$route.params.name),
);
if (res.status === 200 && res.data.handle) {
downloadWithHandle(res.data.handle);

View File

@ -233,7 +233,7 @@ export default defineComponent({
fullName?: string;
imageBase64?: string;
},
state: any
state: any,
): Promise<void> {
// Copy state
state = JSON.parse(JSON.stringify(state));

View File

@ -101,7 +101,7 @@ export default {
imageDimensionsHoverTitle: t('memories', 'Saved image size (width x height)'),
cropSizeLowerThanResizedWarning: t(
'memories',
'Note that the selected crop area is lower than the applied resize which might cause quality decrease'
'Note that the selected crop area is lower than the applied resize which might cause quality decrease',
),
actualSize: t('memories', 'Actual size (100%)'),
fitSize: t('memories', 'Fit size'),

View File

@ -15,7 +15,10 @@ export function isLiveContent(content: PsContent): boolean {
}
class LivePhotoContentSetup {
constructor(lightbox: PhotoSwipe, private psImage: PsImage) {
constructor(
lightbox: PhotoSwipe,
private psImage: PsImage,
) {
lightbox.on('contentLoad', this.onContentLoad.bind(this));
lightbox.on('contentActivate', this.onContentActivate.bind(this));
lightbox.on('contentDeactivate', this.onContentDeactivate.bind(this));

View File

@ -38,7 +38,7 @@ class VideoContentSetup {
lightbox: PhotoSwipe,
private options: {
preventDragOffset: number;
}
},
) {
this.initLightboxEvents(lightbox);
lightbox.on('init', () => {
@ -142,7 +142,7 @@ class VideoContentSetup {
// Remote videos are played back via HLS / Direct
nativex.playVideo(
content.data.photo,
sources.map((s) => s.src)
sources.map((s) => s.src),
);
return;
}

View File

@ -8,7 +8,7 @@
{{
t(
'memories',
'You can set up automatic uploads from this device using the Nextcloud mobile app. Click the button below to download the app, or skip this step and continue.'
'You can set up automatic uploads from this device using the Nextcloud mobile app. Click the button below to download the app, or skip this step and continue.',
)
}}
<br />
@ -32,7 +32,7 @@
{{
t(
'memories',
'Memories can show local media on your device alongside the media on your server. This requires access to the media on this device.'
'Memories can show local media on your device alongside the media on your server. This requires access to the media on this device.',
)
}}
<br /><br />
@ -41,7 +41,7 @@
? t('memories', 'Access to media has been granted.')
: t(
'memories',
'Access to media is not available yet. If the button below does not work, grant the permission through settings.'
'Access to media is not available yet. If the button below does not work, grant the permission through settings.',
)
}}
@ -65,7 +65,7 @@
{{
t(
'memories',
'If no folders are visible here, you may need to grant the app storage permissions, or wait for the app to index your files.'
'If no folders are visible here, you may need to grant the app storage permissions, or wait for the app to index your files.',
)
}}
<br /><br />

View File

@ -136,7 +136,7 @@ export function processFreshServerDay(this: any, dayId: number, photos: IPhoto[]
auids.clear();
buids.clear();
},
1000
1000,
);
}

View File

@ -16,7 +16,7 @@ registerRoute(
maxEntries: 1000, // 1k videos
}),
],
})
}),
);
// Important: Using the NetworkOnly strategy and not registering
@ -31,7 +31,7 @@ registerRoute(
({ url }) => url.origin === self.location.origin && url.pathname.endsWith('/apps/memories/'),
new NetworkFirst({
cacheName: 'memories-pages',
})
}),
);
// Cache pages for same-origin requests only
@ -45,7 +45,7 @@ registerRoute(
maxEntries: 2000, // assets
}),
],
})
}),
);
self.addEventListener('activate', (event) => {

View File

@ -150,7 +150,7 @@ export class API {
client: _m.video.clientId,
fileid,
file,
})
}),
);
}

View File

@ -71,7 +71,7 @@ export async function* addToAlbum(user: string, name: string, photos: IPhoto[])
showError(
t('memories', 'Failed to add {filename} to album.', {
filename: f.filename,
})
}),
);
console.error('DAV COPY error', e.response?.data);
@ -104,7 +104,7 @@ export async function* removeFromAlbum(user: string, name: string, photos: IPhot
showError(
t('memories', 'Failed to remove {filename}.', {
filename: f.basename ?? f.fileid,
})
}),
);
return 0;
}
@ -170,7 +170,7 @@ export async function updateAlbum(album: any, { albumName, properties }: any) {
t('photos', 'Failed to update properties of {albumName} with {properties}.', {
albumName,
properties: JSON.stringify(properties),
})
}),
);
return album;
}
@ -217,7 +217,7 @@ export async function renameAlbum(album: any, currentAlbumName: string, newAlbum
try {
await client.moveFile(
`/photos/${utils.uid}/albums/${currentAlbumName}`,
`/photos/${utils.uid}/albums/${newAlbumName}`
`/photos/${utils.uid}/albums/${newAlbumName}`,
);
return newAlbum;
} catch (error) {
@ -226,7 +226,7 @@ export async function renameAlbum(album: any, currentAlbumName: string, newAlbum
t('photos', 'Failed to rename {currentAlbumName} to {newAlbumName}.', {
currentAlbumName,
newAlbumName,
})
}),
);
return album;
}

View File

@ -135,7 +135,7 @@ export async function* runInParallel<T>(promises: (() => Promise<T>)[], n: numbe
// remove the promise from the running list
running.splice(running.indexOf(task), 1);
})())
})()),
);
}
@ -173,7 +173,7 @@ async function extendWithLivePhotos(photos: IPhoto[]) {
console.error(error);
return null;
}
})
}),
)
).filter((p) => p !== null) as IPhoto[];
@ -251,7 +251,7 @@ export async function* deletePhotos(photos: IPhoto[], confirm: boolean = true) {
showError(
t('memories', 'Failed to delete {fileName}.', {
fileName: fileInfo.filename,
})
}),
);
return 0;
}
@ -302,7 +302,7 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
fileInfo.originalFilename,
targetPath + fileInfo.basename,
// @ts-ignore - https://github.com/perry-mitchell/webdav-client/issues/329
{ headers: { Overwrite: overwrite ? 'T' : 'F' } }
{ headers: { Overwrite: overwrite ? 'T' : 'F' } },
);
return fileInfo.fileid;
} catch (error) {
@ -312,7 +312,7 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
showError(
t('memories', 'Could not move {fileName}, target exists.', {
fileName: fileInfo.filename,
})
}),
);
return 0;
}
@ -320,7 +320,7 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
showError(
t('memories', 'Failed to move {fileName}.', {
fileName: fileInfo.filename,
})
}),
);
return 0;
}

View File

@ -66,7 +66,7 @@ export async function* recognizeDeleteFaceImages(user: string, name: string, pho
showError(
t('memories', 'Failed to remove {filename} from face.', {
filename: p.basename ?? p.fileid,
})
}),
);
return 0;
}
@ -104,7 +104,7 @@ export async function* recognizeMoveFaceImages(user: string, face: string, targe
showError(
t('memories', 'Failed to move {filename} from face.', {
filename: p.basename ?? p.fileid,
})
}),
);
return 0;
}

View File

@ -67,7 +67,7 @@ export async function* favoritePhotos(photos: IPhoto[], favoriteState: boolean)
showError(
t('memories', 'Failed to favorite {fileName}.', {
fileName: fileInfo.originalFilename,
})
}),
);
return 0;
}

View File

@ -60,7 +60,7 @@ export async function createTag(tag: ITag): Promise<ITag> {
t('memories', 'Failed to create tag {name}: {error}', {
name: tag.displayName,
error: error.message,
})
}),
);
}
}

View File

@ -19,7 +19,7 @@ export function getLayout(
numCols: number;
allowBreakout: boolean;
seed: number;
}
},
): {
top: number;
left: number;

View File

@ -39,7 +39,7 @@ class StaticConfig {
showInfo(
t('memories', 'Memories has been updated to {version}. Reload to get the new version.', {
version: this.config.version,
})
}),
);
}

View File

@ -26,7 +26,7 @@ export function getShortDateStr(date: Date): string {
month: 'short',
year: 'numeric',
timeZone: 'UTC',
})
}),
);
}
return shortDateStrMemo.get(dayId)!;

View File

@ -30,7 +30,7 @@ export function confirmDestructive(options: ConfirmOptions): Promise<boolean> {
confirmClasses: 'error',
cancel: t('memories', 'No'),
},
options ?? {}
options ?? {},
);
// Observer to focus the confirm button when the dialog is shown
@ -79,7 +79,7 @@ export async function prompt(opts: PromptOptions): Promise<string | null> {
(success: boolean, value: string) => resolve(success ? value : null),
opts.modal,
opts.name,
opts.password
opts.password,
);
});
}

View File

@ -217,7 +217,7 @@ export function getViewerRoute(photo: IPhoto) {
export async function chooseNcFolder(
title: string,
initial: string = '/',
type: FilePickerType = FilePickerType.Choose
type: FilePickerType = FilePickerType.Choose,
) {
const picker = getFilePickerBuilder(title)
.setMultiSelect(false)

View File

@ -13,7 +13,10 @@
height: 100%;
display: block;
z-index: 1;
transition: transform 0.3s ease-in-out, visibility 0.3s ease-in-out, opacity 0.3s ease-in-out;
transition:
transform 0.3s ease-in-out,
visibility 0.3s ease-in-out,
opacity 0.3s ease-in-out;
}
video {
@ -26,7 +29,9 @@
video {
opacity: 1;
visibility: visible;
transition: opacity 0.3s ease-in-out, visibility 0s ease-in-out;
transition:
opacity 0.3s ease-in-out,
visibility 0s ease-in-out;
}
img {
transform: scale(1.05);