Merge branch 'ci-pretty'
commit
376fa24c4d
|
@ -53,7 +53,7 @@ jobs:
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Pretter
|
- name: Install Pretter
|
||||||
run: npm install -g prettier
|
run: npm install --no-save "prettier@$(cat ./package.json | jq -r '.devDependencies["prettier"]')"
|
||||||
|
|
||||||
- name: Run Prettier
|
- name: Run Prettier
|
||||||
run: npx prettier src --check
|
run: npx prettier src --check
|
||||||
|
|
|
@ -98,4 +98,7 @@
|
||||||
},
|
},
|
||||||
"git.alwaysSignOff": true,
|
"git.alwaysSignOff": true,
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
|
"psalm.configPaths": [
|
||||||
|
"psalm-ls.xml"
|
||||||
|
],
|
||||||
}
|
}
|
|
@ -43,6 +43,7 @@
|
||||||
"@types/url-parse": "^1.4.9",
|
"@types/url-parse": "^1.4.9",
|
||||||
"@types/videojs-contrib-quality-levels": "^2.0.2",
|
"@types/videojs-contrib-quality-levels": "^2.0.2",
|
||||||
"playwright": "^1.39.0",
|
"playwright": "^1.39.0",
|
||||||
|
"prettier": "^3.0.3",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"workbox-webpack-plugin": "^7.0.0"
|
"workbox-webpack-plugin": "^7.0.0"
|
||||||
},
|
},
|
||||||
|
@ -2880,6 +2881,23 @@
|
||||||
"url": "https://opencollective.com/postcss/"
|
"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": {
|
"node_modules/@vueuse/components": {
|
||||||
"version": "10.1.2",
|
"version": "10.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@vueuse/components/-/components-10.1.2.tgz",
|
"resolved": "https://registry.npmjs.org/@vueuse/components/-/components-10.1.2.tgz",
|
||||||
|
@ -8430,17 +8448,15 @@
|
||||||
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"optional": true,
|
|
||||||
"peer": true,
|
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin-prettier.js"
|
"prettier": "bin/prettier.cjs"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10.13.0"
|
"node": ">=14"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||||
|
@ -14012,6 +14028,14 @@
|
||||||
"picocolors": "^0.2.1",
|
"picocolors": "^0.2.1",
|
||||||
"source-map": "^0.6.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=="
|
"integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ=="
|
||||||
},
|
},
|
||||||
"prettier": {
|
"prettier": {
|
||||||
"version": "2.8.8",
|
"version": "3.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz",
|
||||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
"integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==",
|
||||||
"dev": true,
|
"dev": true
|
||||||
"optional": true,
|
|
||||||
"peer": true
|
|
||||||
},
|
},
|
||||||
"pretty-bytes": {
|
"pretty-bytes": {
|
||||||
"version": "5.6.0",
|
"version": "5.6.0",
|
||||||
|
|
|
@ -71,6 +71,7 @@
|
||||||
"@types/url-parse": "^1.4.9",
|
"@types/url-parse": "^1.4.9",
|
||||||
"@types/videojs-contrib-quality-levels": "^2.0.2",
|
"@types/videojs-contrib-quality-levels": "^2.0.2",
|
||||||
"playwright": "^1.39.0",
|
"playwright": "^1.39.0",
|
||||||
|
"prettier": "^3.0.3",
|
||||||
"typescript": "^5.2.2",
|
"typescript": "^5.2.2",
|
||||||
"workbox-webpack-plugin": "^7.0.0"
|
"workbox-webpack-plugin": "^7.0.0"
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,40 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<psalm
|
||||||
|
totallyTyped="true"
|
||||||
|
errorLevel="5"
|
||||||
|
resolveFromConfigFile="true"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns="https://getpsalm.org/schema/config"
|
||||||
|
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||||
|
cacheDirectory=".cache/psalm"
|
||||||
|
>
|
||||||
|
<!--
|
||||||
|
Duplication is due to differences in language server and CLI
|
||||||
|
The CLI needs the files in extraFiles since we specify lib as
|
||||||
|
the scan directory. The language server needs the files in
|
||||||
|
projectFiles since it doesn't seem to support extraFiles.
|
||||||
|
-->
|
||||||
|
<projectFiles>
|
||||||
|
<directory name="lib" />
|
||||||
|
<directory name="../../lib" />
|
||||||
|
<directory name="../../apps/files/lib/Event" />
|
||||||
|
<directory name="../../3rdparty/doctrine" />
|
||||||
|
<directory name="../../3rdparty/psr" />
|
||||||
|
<directory name="../../3rdparty/guzzlehttp" />
|
||||||
|
|
||||||
|
<ignoreFiles>
|
||||||
|
<directory name="vendor" />
|
||||||
|
</ignoreFiles>
|
||||||
|
</projectFiles>
|
||||||
|
<issueHandlers>
|
||||||
|
<UndefinedDocblockClass>
|
||||||
|
<errorLevel type="suppress">
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\Schema" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\SchemaException" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Driver\Statement" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Schema\Table" />
|
||||||
|
<referencedClass name="Doctrine\DBAL\Platforms\AbstractPlatform" />
|
||||||
|
</errorLevel>
|
||||||
|
</UndefinedDocblockClass>
|
||||||
|
</issueHandlers>
|
||||||
|
</psalm>
|
17
psalm.xml
17
psalm.xml
|
@ -8,23 +8,14 @@
|
||||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||||
cacheDirectory=".cache/psalm"
|
cacheDirectory=".cache/psalm"
|
||||||
>
|
>
|
||||||
|
<!-- The language server works slightly differently and has a different file -->
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
<directory name="lib" />
|
<directory name="lib" />
|
||||||
|
|
||||||
<!--
|
|
||||||
Duplication is due to differences in language server and CLI
|
|
||||||
The CLI needs the files in extraFiles since we specify lib as
|
|
||||||
the scan directory. The language server needs the files in
|
|
||||||
projectFiles since it doesn't seem to support extraFiles.
|
|
||||||
-->
|
|
||||||
<directory name="../../lib" />
|
|
||||||
<directory name="../../apps/files/lib/Event" />
|
|
||||||
<directory name="../../3rdparty/doctrine" />
|
|
||||||
<directory name="../../3rdparty/psr" />
|
|
||||||
<directory name="../../3rdparty/guzzlehttp" />
|
|
||||||
|
|
||||||
<ignoreFiles>
|
<ignoreFiles>
|
||||||
<directory name="vendor" />
|
<directory name="vendor" />
|
||||||
|
<directory name="../../lib" />
|
||||||
|
<directory name="../../apps/files" />
|
||||||
|
<directory name="../../3rdparty" />
|
||||||
</ignoreFiles>
|
</ignoreFiles>
|
||||||
</projectFiles>
|
</projectFiles>
|
||||||
<extraFiles>
|
<extraFiles>
|
||||||
|
|
|
@ -294,7 +294,7 @@ export default defineComponent({
|
||||||
this.metadataComponent?.$destroy?.();
|
this.metadataComponent?.$destroy?.();
|
||||||
this.metadataComponent = null;
|
this.metadataComponent = null;
|
||||||
},
|
},
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check for native interface
|
// Check for native interface
|
||||||
|
|
|
@ -604,7 +604,9 @@ export default defineComponent({
|
||||||
z-index: 100; // below top-matter and top-bar
|
z-index: 100; // below top-matter and top-bar
|
||||||
cursor: ns-resize;
|
cursor: ns-resize;
|
||||||
opacity: 0;
|
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
|
// Show on hover or scroll of main window
|
||||||
&:hover,
|
&:hover,
|
||||||
|
|
|
@ -462,7 +462,7 @@ export default defineComponent({
|
||||||
} else {
|
} else {
|
||||||
this.touchScrollDelta = Math.min(
|
this.touchScrollDelta = Math.min(
|
||||||
(touch.clientY - _m.window.innerHeight + TOUCH_SELECT_CLAMP.bottom) / 3,
|
(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 recyclerRect = this.recycler?.getBoundingClientRect();
|
||||||
const clampedY = Math.max(
|
const clampedY = Math.max(
|
||||||
(recyclerRect?.top ?? 0) + TOUCH_SELECT_CLAMP.bufferPx,
|
(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
|
// Which photo is the cursor over, if any
|
||||||
|
|
|
@ -245,7 +245,7 @@ export default defineComponent({
|
||||||
async chooseFoldersPath() {
|
async chooseFoldersPath() {
|
||||||
const newPath = await utils.chooseNcFolder(
|
const newPath = await utils.chooseNcFolder(
|
||||||
this.t('memories', 'Choose the root for the folders view'),
|
this.t('memories', 'Choose the root for the folders view'),
|
||||||
this.config.folders_path
|
this.config.folders_path,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (newPath !== this.config.folders_path) {
|
if (newPath !== this.config.folders_path) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
globalThis.OCA.Files
|
globalThis.OCA.Files,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -233,7 +233,9 @@ export default defineComponent({
|
||||||
opacity: 0.1;
|
opacity: 0.1;
|
||||||
cursor: col-resize;
|
cursor: col-resize;
|
||||||
margin: 0 0 0 auto;
|
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 {
|
> .separator:hover {
|
||||||
|
@ -273,7 +275,9 @@ export default defineComponent({
|
||||||
|
|
||||||
// Note: you can't use transforms to animate the top
|
// Note: you can't use transforms to animate the top
|
||||||
// because it causes the viewer to be rendered incorrectly
|
// 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 {
|
> .timeline-header {
|
||||||
height: 58px;
|
height: 58px;
|
||||||
|
|
|
@ -1069,7 +1069,7 @@ export default defineComponent({
|
||||||
numCols: this.numCols,
|
numCols: this.numCols,
|
||||||
allowBreakout: this.allowBreakout(),
|
allowBreakout: this.allowBreakout(),
|
||||||
seed: dayId,
|
seed: dayId,
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Check if some rows were added
|
// Check if some rows were added
|
||||||
|
@ -1359,7 +1359,10 @@ export default defineComponent({
|
||||||
left: 0;
|
left: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
height: 100%;
|
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 */
|
/** Dynamic top matter */
|
||||||
|
|
|
@ -62,7 +62,7 @@ export default defineComponent({
|
||||||
info: status.substring(10),
|
info: status.substring(10),
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
noescape
|
noescape,
|
||||||
);
|
);
|
||||||
} else if (status.startsWith('test_ok')) {
|
} else if (status.startsWith('test_ok')) {
|
||||||
return this.t(
|
return this.t(
|
||||||
|
@ -73,7 +73,7 @@ export default defineComponent({
|
||||||
info: status.substring(8),
|
info: status.substring(8),
|
||||||
},
|
},
|
||||||
0,
|
0,
|
||||||
noescape
|
noescape,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
return this.t('memories', '{name} binary status: {status}.', {
|
return this.t('memories', '{name} binary status: {status}.', {
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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>
|
</NcNoteCard>
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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>
|
</NcNoteCard>
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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.') }}
|
{{ t('memories', 'Folders with a ".nomedia" or a ".nomemories" file are always excluded from indexing.') }}
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
? t('memories', 'HTTPS is enabled')
|
? t('memories', 'HTTPS is enabled')
|
||||||
: t(
|
: t(
|
||||||
'memories',
|
'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>
|
</NcNoteCard>
|
||||||
|
|
|
@ -39,14 +39,14 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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 />
|
<br />
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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 />
|
<br />
|
||||||
|
@ -116,7 +116,7 @@ export default defineComponent({
|
||||||
// construct warning
|
// construct warning
|
||||||
const warnSetup = this.t(
|
const warnSetup = this.t(
|
||||||
'memories',
|
'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 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!');
|
const warnReindex = this.t('memories', 'This may also cause all photos to be re-indexed!');
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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.',
|
||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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:') }}
|
{{ t('memories', 'For more details on driver installation, check the documentation:') }}
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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(
|
t(
|
||||||
'memories',
|
'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 />
|
<br />
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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/">
|
<a target="_blank" href="https://memories.gallery/hw-transcoding/">
|
||||||
|
|
|
@ -207,7 +207,7 @@ export default defineComponent({
|
||||||
this.data.facerect.x * img.naturalWidth,
|
this.data.facerect.x * img.naturalWidth,
|
||||||
this.data.facerect.y * img.naturalHeight,
|
this.data.facerect.y * img.naturalHeight,
|
||||||
this.data.facerect.w * img.naturalWidth,
|
this.data.facerect.w * img.naturalWidth,
|
||||||
this.data.facerect.h * img.naturalHeight
|
this.data.facerect.h * img.naturalHeight,
|
||||||
);
|
);
|
||||||
|
|
||||||
canvas.toBlob(
|
canvas.toBlob(
|
||||||
|
@ -216,7 +216,7 @@ export default defineComponent({
|
||||||
this.faceSrc = URL.createObjectURL(blob);
|
this.faceSrc = URL.createObjectURL(blob);
|
||||||
},
|
},
|
||||||
'image/jpeg',
|
'image/jpeg',
|
||||||
0.95
|
0.95,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -263,7 +263,10 @@ export default defineComponent({
|
||||||
padding: 1px;
|
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 {
|
&.leaving {
|
||||||
transform: scale(0.9);
|
transform: scale(0.9);
|
||||||
|
@ -390,7 +393,9 @@ div.img-outer {
|
||||||
-webkit-tap-highlight-color: transparent;
|
-webkit-tap-highlight-color: transparent;
|
||||||
-webkit-touch-callout: none;
|
-webkit-touch-callout: none;
|
||||||
pointer-events: 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 > & {
|
.p-outer.placeholder > & {
|
||||||
display: none;
|
display: none;
|
||||||
|
|
|
@ -215,7 +215,7 @@ export default defineComponent({
|
||||||
|
|
||||||
listableSelectedCollaboratorsKeys(): string[] {
|
listableSelectedCollaboratorsKeys(): string[] {
|
||||||
return this.selectedCollaboratorsKeys.filter(
|
return this.selectedCollaboratorsKeys.filter(
|
||||||
(collaboratorKey) => this.availableCollaborators[collaboratorKey].type !== Type.SHARE_TYPE_LINK
|
(collaboratorKey) => this.availableCollaborators[collaboratorKey].type !== Type.SHARE_TYPE_LINK,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('photos', 'Failed to delete {name}.', {
|
this.t('photos', 'Failed to delete {name}.', {
|
||||||
name: this.name,
|
name: this.name,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -178,7 +178,7 @@ export default defineComponent({
|
||||||
this.dayLast,
|
this.dayLast,
|
||||||
this.hourLast,
|
this.hourLast,
|
||||||
this.minuteLast,
|
this.minuteLast,
|
||||||
this.secondLast
|
this.secondLast,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -202,13 +202,13 @@ export default defineComponent({
|
||||||
(p) =>
|
(p) =>
|
||||||
!p.imageInfo?.exif?.DateTimeOriginal &&
|
!p.imageInfo?.exif?.DateTimeOriginal &&
|
||||||
!p.imageInfo?.exif?.CreateDate &&
|
!p.imageInfo?.exif?.CreateDate &&
|
||||||
!exifs.get(p.fileid)!.DateTimeOriginal
|
!exifs.get(p.fileid)!.DateTimeOriginal,
|
||||||
) &&
|
) &&
|
||||||
(await utils.confirmDestructive({
|
(await utils.confirmDestructive({
|
||||||
title: this.t('memories', 'Missing date metadata'),
|
title: this.t('memories', 'Missing date metadata'),
|
||||||
message: this.t(
|
message: this.t(
|
||||||
'memories',
|
'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(
|
showError(
|
||||||
this.t('memories', 'Failed to load metadata for {n} photos.', {
|
this.t('memories', 'Failed to load metadata for {n} photos.', {
|
||||||
n: photos.length - valid.length,
|
n: photos.length - valid.length,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -290,7 +290,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('memories', '{n} photos cannot be edited (permissions error).', {
|
this.t('memories', '{n} photos cannot be edited (permissions error).', {
|
||||||
n: valid.length - updatable.length,
|
n: valid.length - updatable.length,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ export default defineComponent({
|
||||||
// replace the temporary tag ID with the real one
|
// replace the temporary tag ID with the real one
|
||||||
const i = add.findIndex((y) => y === x.id);
|
const i = add.findIndex((y) => y === x.id);
|
||||||
add[i] = tag.id;
|
add[i] = tag.id;
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('memories', 'Only user "{user}" can delete this person', {
|
this.t('memories', 'Only user "{user}" can delete this person', {
|
||||||
user,
|
user,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -89,7 +89,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('photos', 'Failed to delete {name}.', {
|
this.t('photos', 'Failed to delete {name}.', {
|
||||||
name: this.name,
|
name: this.name,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -80,7 +80,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('memories', 'Only user "{user}" can update this person', {
|
this.t('memories', 'Only user "{user}" can update this person', {
|
||||||
user,
|
user,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -118,7 +118,7 @@ export default defineComponent({
|
||||||
this.t('photos', 'Failed to rename {oldName} to {name}.', {
|
this.t('photos', 'Failed to rename {oldName} to {name}.', {
|
||||||
oldName: this.oldName,
|
oldName: this.oldName,
|
||||||
name: this.name,
|
name: this.name,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -66,7 +66,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('memories', 'Only user "{user}" can update this person', {
|
this.t('memories', 'Only user "{user}" can update this person', {
|
||||||
user,
|
user,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ export default defineComponent({
|
||||||
try {
|
try {
|
||||||
await client.moveFile(
|
await client.moveFile(
|
||||||
`/recognize/${user}/faces/${name}/${p.basename}`,
|
`/recognize/${user}/faces/${name}/${p.basename}`,
|
||||||
`/recognize/${face.user_id}/faces/${newName}/${p.basename}`
|
`/recognize/${face.user_id}/faces/${newName}/${p.basename}`,
|
||||||
);
|
);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
|
@ -64,7 +64,7 @@ export default defineComponent({
|
||||||
showError(
|
showError(
|
||||||
this.t('memories', 'Only user "{user}" can update this person', {
|
this.t('memories', 'Only user "{user}" can update this person', {
|
||||||
user,
|
user,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,7 @@ export default defineComponent({
|
||||||
let destination = await utils.chooseNcFolder(
|
let destination = await utils.chooseNcFolder(
|
||||||
this.t('memories', 'Choose a folder'),
|
this.t('memories', 'Choose a folder'),
|
||||||
this.config.folders_path,
|
this.config.folders_path,
|
||||||
FilePickerType.Move
|
FilePickerType.Move,
|
||||||
);
|
);
|
||||||
// Fails if the target exists, same behavior with Nextcloud files implementation.
|
// Fails if the target exists, same behavior with Nextcloud files implementation.
|
||||||
const gen = dav.movePhotos(this.photos, destination, false);
|
const gen = dav.movePhotos(this.photos, destination, false);
|
||||||
|
|
|
@ -173,7 +173,7 @@ export default defineComponent({
|
||||||
|
|
||||||
async downloadAlbum() {
|
async downloadAlbum() {
|
||||||
const res = await axios.post(
|
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) {
|
if (res.status === 200 && res.data.handle) {
|
||||||
downloadWithHandle(res.data.handle);
|
downloadWithHandle(res.data.handle);
|
||||||
|
|
|
@ -233,7 +233,7 @@ export default defineComponent({
|
||||||
fullName?: string;
|
fullName?: string;
|
||||||
imageBase64?: string;
|
imageBase64?: string;
|
||||||
},
|
},
|
||||||
state: any
|
state: any,
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
// Copy state
|
// Copy state
|
||||||
state = JSON.parse(JSON.stringify(state));
|
state = JSON.parse(JSON.stringify(state));
|
||||||
|
|
|
@ -101,7 +101,7 @@ export default {
|
||||||
imageDimensionsHoverTitle: t('memories', 'Saved image size (width x height)'),
|
imageDimensionsHoverTitle: t('memories', 'Saved image size (width x height)'),
|
||||||
cropSizeLowerThanResizedWarning: t(
|
cropSizeLowerThanResizedWarning: t(
|
||||||
'memories',
|
'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%)'),
|
actualSize: t('memories', 'Actual size (100%)'),
|
||||||
fitSize: t('memories', 'Fit size'),
|
fitSize: t('memories', 'Fit size'),
|
||||||
|
|
|
@ -15,7 +15,10 @@ export function isLiveContent(content: PsContent): boolean {
|
||||||
}
|
}
|
||||||
|
|
||||||
class LivePhotoContentSetup {
|
class LivePhotoContentSetup {
|
||||||
constructor(lightbox: PhotoSwipe, private psImage: PsImage) {
|
constructor(
|
||||||
|
lightbox: PhotoSwipe,
|
||||||
|
private psImage: PsImage,
|
||||||
|
) {
|
||||||
lightbox.on('contentLoad', this.onContentLoad.bind(this));
|
lightbox.on('contentLoad', this.onContentLoad.bind(this));
|
||||||
lightbox.on('contentActivate', this.onContentActivate.bind(this));
|
lightbox.on('contentActivate', this.onContentActivate.bind(this));
|
||||||
lightbox.on('contentDeactivate', this.onContentDeactivate.bind(this));
|
lightbox.on('contentDeactivate', this.onContentDeactivate.bind(this));
|
||||||
|
|
|
@ -38,7 +38,7 @@ class VideoContentSetup {
|
||||||
lightbox: PhotoSwipe,
|
lightbox: PhotoSwipe,
|
||||||
private options: {
|
private options: {
|
||||||
preventDragOffset: number;
|
preventDragOffset: number;
|
||||||
}
|
},
|
||||||
) {
|
) {
|
||||||
this.initLightboxEvents(lightbox);
|
this.initLightboxEvents(lightbox);
|
||||||
lightbox.on('init', () => {
|
lightbox.on('init', () => {
|
||||||
|
@ -142,7 +142,7 @@ class VideoContentSetup {
|
||||||
// Remote videos are played back via HLS / Direct
|
// Remote videos are played back via HLS / Direct
|
||||||
nativex.playVideo(
|
nativex.playVideo(
|
||||||
content.data.photo,
|
content.data.photo,
|
||||||
sources.map((s) => s.src)
|
sources.map((s) => s.src),
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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 />
|
<br />
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
{{
|
{{
|
||||||
t(
|
t(
|
||||||
'memories',
|
'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 />
|
<br /><br />
|
||||||
|
@ -41,7 +41,7 @@
|
||||||
? t('memories', 'Access to media has been granted.')
|
? t('memories', 'Access to media has been granted.')
|
||||||
: t(
|
: t(
|
||||||
'memories',
|
'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(
|
t(
|
||||||
'memories',
|
'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 />
|
<br /><br />
|
||||||
|
|
|
@ -136,7 +136,7 @@ export function processFreshServerDay(this: any, dayId: number, photos: IPhoto[]
|
||||||
auids.clear();
|
auids.clear();
|
||||||
buids.clear();
|
buids.clear();
|
||||||
},
|
},
|
||||||
1000
|
1000,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@ registerRoute(
|
||||||
maxEntries: 1000, // 1k videos
|
maxEntries: 1000, // 1k videos
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Important: Using the NetworkOnly strategy and not registering
|
// Important: Using the NetworkOnly strategy and not registering
|
||||||
|
@ -31,7 +31,7 @@ registerRoute(
|
||||||
({ url }) => url.origin === self.location.origin && url.pathname.endsWith('/apps/memories/'),
|
({ url }) => url.origin === self.location.origin && url.pathname.endsWith('/apps/memories/'),
|
||||||
new NetworkFirst({
|
new NetworkFirst({
|
||||||
cacheName: 'memories-pages',
|
cacheName: 'memories-pages',
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
// Cache pages for same-origin requests only
|
// Cache pages for same-origin requests only
|
||||||
|
@ -45,7 +45,7 @@ registerRoute(
|
||||||
maxEntries: 2000, // assets
|
maxEntries: 2000, // assets
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
self.addEventListener('activate', (event) => {
|
self.addEventListener('activate', (event) => {
|
||||||
|
|
|
@ -150,7 +150,7 @@ export class API {
|
||||||
client: _m.video.clientId,
|
client: _m.video.clientId,
|
||||||
fileid,
|
fileid,
|
||||||
file,
|
file,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ export async function* addToAlbum(user: string, name: string, photos: IPhoto[])
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to add {filename} to album.', {
|
t('memories', 'Failed to add {filename} to album.', {
|
||||||
filename: f.filename,
|
filename: f.filename,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.error('DAV COPY error', e.response?.data);
|
console.error('DAV COPY error', e.response?.data);
|
||||||
|
@ -104,7 +104,7 @@ export async function* removeFromAlbum(user: string, name: string, photos: IPhot
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to remove {filename}.', {
|
t('memories', 'Failed to remove {filename}.', {
|
||||||
filename: f.basename ?? f.fileid,
|
filename: f.basename ?? f.fileid,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
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}.', {
|
t('photos', 'Failed to update properties of {albumName} with {properties}.', {
|
||||||
albumName,
|
albumName,
|
||||||
properties: JSON.stringify(properties),
|
properties: JSON.stringify(properties),
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return album;
|
return album;
|
||||||
}
|
}
|
||||||
|
@ -217,7 +217,7 @@ export async function renameAlbum(album: any, currentAlbumName: string, newAlbum
|
||||||
try {
|
try {
|
||||||
await client.moveFile(
|
await client.moveFile(
|
||||||
`/photos/${utils.uid}/albums/${currentAlbumName}`,
|
`/photos/${utils.uid}/albums/${currentAlbumName}`,
|
||||||
`/photos/${utils.uid}/albums/${newAlbumName}`
|
`/photos/${utils.uid}/albums/${newAlbumName}`,
|
||||||
);
|
);
|
||||||
return newAlbum;
|
return newAlbum;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -226,7 +226,7 @@ export async function renameAlbum(album: any, currentAlbumName: string, newAlbum
|
||||||
t('photos', 'Failed to rename {currentAlbumName} to {newAlbumName}.', {
|
t('photos', 'Failed to rename {currentAlbumName} to {newAlbumName}.', {
|
||||||
currentAlbumName,
|
currentAlbumName,
|
||||||
newAlbumName,
|
newAlbumName,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return album;
|
return album;
|
||||||
}
|
}
|
||||||
|
|
|
@ -135,7 +135,7 @@ export async function* runInParallel<T>(promises: (() => Promise<T>)[], n: numbe
|
||||||
|
|
||||||
// remove the promise from the running list
|
// remove the promise from the running list
|
||||||
running.splice(running.indexOf(task), 1);
|
running.splice(running.indexOf(task), 1);
|
||||||
})())
|
})()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,7 @@ async function extendWithLivePhotos(photos: IPhoto[]) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
})
|
}),
|
||||||
)
|
)
|
||||||
).filter((p) => p !== null) as IPhoto[];
|
).filter((p) => p !== null) as IPhoto[];
|
||||||
|
|
||||||
|
@ -251,7 +251,7 @@ export async function* deletePhotos(photos: IPhoto[], confirm: boolean = true) {
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to delete {fileName}.', {
|
t('memories', 'Failed to delete {fileName}.', {
|
||||||
fileName: fileInfo.filename,
|
fileName: fileInfo.filename,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -302,7 +302,7 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
|
||||||
fileInfo.originalFilename,
|
fileInfo.originalFilename,
|
||||||
targetPath + fileInfo.basename,
|
targetPath + fileInfo.basename,
|
||||||
// @ts-ignore - https://github.com/perry-mitchell/webdav-client/issues/329
|
// @ts-ignore - https://github.com/perry-mitchell/webdav-client/issues/329
|
||||||
{ headers: { Overwrite: overwrite ? 'T' : 'F' } }
|
{ headers: { Overwrite: overwrite ? 'T' : 'F' } },
|
||||||
);
|
);
|
||||||
return fileInfo.fileid;
|
return fileInfo.fileid;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -312,7 +312,7 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Could not move {fileName}, target exists.', {
|
t('memories', 'Could not move {fileName}, target exists.', {
|
||||||
fileName: fileInfo.filename,
|
fileName: fileInfo.filename,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +320,7 @@ export async function* movePhotos(photos: IPhoto[], destination: string, overwri
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to move {fileName}.', {
|
t('memories', 'Failed to move {fileName}.', {
|
||||||
fileName: fileInfo.filename,
|
fileName: fileInfo.filename,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,7 +66,7 @@ export async function* recognizeDeleteFaceImages(user: string, name: string, pho
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to remove {filename} from face.', {
|
t('memories', 'Failed to remove {filename} from face.', {
|
||||||
filename: p.basename ?? p.fileid,
|
filename: p.basename ?? p.fileid,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -104,7 +104,7 @@ export async function* recognizeMoveFaceImages(user: string, face: string, targe
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to move {filename} from face.', {
|
t('memories', 'Failed to move {filename} from face.', {
|
||||||
filename: p.basename ?? p.fileid,
|
filename: p.basename ?? p.fileid,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@ export async function* favoritePhotos(photos: IPhoto[], favoriteState: boolean)
|
||||||
showError(
|
showError(
|
||||||
t('memories', 'Failed to favorite {fileName}.', {
|
t('memories', 'Failed to favorite {fileName}.', {
|
||||||
fileName: fileInfo.originalFilename,
|
fileName: fileInfo.originalFilename,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ export async function createTag(tag: ITag): Promise<ITag> {
|
||||||
t('memories', 'Failed to create tag {name}: {error}', {
|
t('memories', 'Failed to create tag {name}: {error}', {
|
||||||
name: tag.displayName,
|
name: tag.displayName,
|
||||||
error: error.message,
|
error: error.message,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,7 @@ export function getLayout(
|
||||||
numCols: number;
|
numCols: number;
|
||||||
allowBreakout: boolean;
|
allowBreakout: boolean;
|
||||||
seed: number;
|
seed: number;
|
||||||
}
|
},
|
||||||
): {
|
): {
|
||||||
top: number;
|
top: number;
|
||||||
left: number;
|
left: number;
|
||||||
|
|
|
@ -39,7 +39,7 @@ class StaticConfig {
|
||||||
showInfo(
|
showInfo(
|
||||||
t('memories', 'Memories has been updated to {version}. Reload to get the new version.', {
|
t('memories', 'Memories has been updated to {version}. Reload to get the new version.', {
|
||||||
version: this.config.version,
|
version: this.config.version,
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ export function getShortDateStr(date: Date): string {
|
||||||
month: 'short',
|
month: 'short',
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
timeZone: 'UTC',
|
timeZone: 'UTC',
|
||||||
})
|
}),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return shortDateStrMemo.get(dayId)!;
|
return shortDateStrMemo.get(dayId)!;
|
||||||
|
|
|
@ -30,7 +30,7 @@ export function confirmDestructive(options: ConfirmOptions): Promise<boolean> {
|
||||||
confirmClasses: 'error',
|
confirmClasses: 'error',
|
||||||
cancel: t('memories', 'No'),
|
cancel: t('memories', 'No'),
|
||||||
},
|
},
|
||||||
options ?? {}
|
options ?? {},
|
||||||
);
|
);
|
||||||
|
|
||||||
// Observer to focus the confirm button when the dialog is shown
|
// 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),
|
(success: boolean, value: string) => resolve(success ? value : null),
|
||||||
opts.modal,
|
opts.modal,
|
||||||
opts.name,
|
opts.name,
|
||||||
opts.password
|
opts.password,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -217,7 +217,7 @@ export function getViewerRoute(photo: IPhoto) {
|
||||||
export async function chooseNcFolder(
|
export async function chooseNcFolder(
|
||||||
title: string,
|
title: string,
|
||||||
initial: string = '/',
|
initial: string = '/',
|
||||||
type: FilePickerType = FilePickerType.Choose
|
type: FilePickerType = FilePickerType.Choose,
|
||||||
) {
|
) {
|
||||||
const picker = getFilePickerBuilder(title)
|
const picker = getFilePickerBuilder(title)
|
||||||
.setMultiSelect(false)
|
.setMultiSelect(false)
|
||||||
|
|
|
@ -13,7 +13,10 @@
|
||||||
height: 100%;
|
height: 100%;
|
||||||
display: block;
|
display: block;
|
||||||
z-index: 1;
|
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 {
|
video {
|
||||||
|
@ -26,7 +29,9 @@
|
||||||
video {
|
video {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
visibility: visible;
|
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 {
|
img {
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
|
|
Loading…
Reference in New Issue