Compare commits

..

7 Commits

Author SHA1 Message Date
Alex
a648da021f fix(server) fix order of asset in shared album to be similar to the actual album (#1293) 2023-01-10 15:57:03 -06:00
Alex Tran
d1d69bfaf4 chore(doc) update api key usage for CLI tool 2023-01-10 13:06:36 -06:00
Alex Tran
221e03488e Fixed scrolling overflow 2023-01-10 11:26:37 -06:00
Alex
2ffb7cab2e fix(web) add disable property to generated shared link (#1287) 2023-01-10 10:34:16 -06:00
otbutz
acffabf9de fix(nginx): fix entrypoint (#1284) 2023-01-10 10:10:15 -06:00
otbutz
0a464f9d28 fix(nginx): Switch to sh (#1282)
* Switch to sh

* Fix entrypoint
2023-01-10 10:04:35 -06:00
Alex
7add754fc3 fix(web) show exif info in public shared (#1283)
* fix(web) show exif in public share page

* Added exif info to return payload'
2023-01-10 10:03:15 -06:00
10 changed files with 43 additions and 25 deletions

View File

@@ -20,7 +20,7 @@ npm i -g immich
Specify user's credentials, Immich's server address and port, and the directory you would like to upload videos/photos from.
```bash
immich upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d your/target/directory
immich upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api -d your/target/directory
```
---
@@ -31,26 +31,32 @@ immich upload --email testuser@email.com --password password --server http://192
| ---------------- | ------------------------------------------------------------------- |
| --yes / -y | Assume yes on all interactive prompts |
| --delete / -da | Delete local assets after upload |
| --email / -e | User's email |
| --password / -pw | User's password |
| --key / -k | User's API key |
| --server / -s | Immich's server address |
| --directory / -d | Directory to upload from |
| --threads / -t | Number of threads to use (Default 5) |
| --album/ -al | Create albums for assets based on the parent folder or a given name |
### Obtain the API Key
The API key can be obtained in the user setting panel on the web interface.
![Obtain Api Key](./img/obtain-api-key.png)
### Run via Docker
Be aware that as this runs inside a container it mounts your current directory as a volume, and for the -d flag you need to use the path inside the container.
```bash
docker run -it --rm -v $(pwd):/import ghcr.io/immich-app/immich-cli:latest upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d /import
docker run -it --rm -v $(pwd):/import ghcr.io/immich-app/immich-cli:latest upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api -d /import
```
Optionally, you can create an alias:
```bash
alias immich="docker run -it --rm -v $(pwd):/import ghcr.io/immich-app/immich-cli:latest"
immich upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d /import
immich upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api -d /import
```
### Run from source
@@ -68,5 +74,5 @@ npm run build
```
```bash title="Run the command"
node bin/index.js upload --email testuser@email.com --password password --server http://192.168.1.216:2283/api -d your/target/directory
node bin/index.js upload --key HFEJ38DNSDUEG --server http://192.168.1.216:2283/api -d your/target/directory
```

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@@ -8,4 +8,4 @@ COPY start.sh /start.sh
STOPSIGNAL SIGQUIT
CMD /start.sh
ENTRYPOINT ["/start.sh"]

View File

@@ -1,12 +1,12 @@
#! /bin/bash
#! /bin/sh
set -e
export IMMICH_WEB_URL=${IMMICH_WEB_URL:-http://immich-web:3000}
export IMMICH_WEB_URL="${IMMICH_WEB_URL:-http://immich-web:3000}"
IMMICH_WEB_SCHEME=$(echo "$IMMICH_WEB_URL" | grep -Eo '^https?://' || echo "http://")
export IMMICH_WEB_SCHEME
IMMICH_WEB_HOST=$(echo "$IMMICH_WEB_URL" | cut -d '/' -f 3)
export IMMICH_WEB_HOST
export IMMICH_SERVER_URL=${IMMICH_SERVER_URL:-http://immich-server:3001}
export IMMICH_SERVER_URL="${IMMICH_SERVER_URL:-http://immich-server:3001}"
IMMICH_SERVER_SCHEME=$(echo "$IMMICH_WEB_URL" | grep -Eo '^https?://' || echo "http://")
export IMMICH_SERVER_SCHEME
IMMICH_SERVER_HOST=$(echo "$IMMICH_SERVER_URL" | cut -d '/' -f 3)

View File

@@ -48,7 +48,6 @@ export class ShareCore {
async getSharedLinkById(id: string): Promise<SharedLinkEntity> {
const link = await this.sharedLinkRepository.getById(id);
if (!link) {
throw new BadRequestException('Shared link not found');
}

View File

@@ -57,15 +57,29 @@ export class SharedLinkRepository implements ISharedLinkRepository {
id: id,
},
relations: {
assets: true,
assets: {
exifInfo: true,
},
album: {
assets: {
assetInfo: true,
assetInfo: {
exifInfo: true,
},
},
},
},
order: {
createdAt: 'DESC',
assets: {
createdAt: 'ASC',
},
album: {
assets: {
assetInfo: {
createdAt: 'ASC',
},
},
},
},
});
}

View File

@@ -58,7 +58,7 @@
</span>
</svelte:fragment>
<div class=" max-h-[400px] overflow-y-auto immich-scrollbar">
<div class="max-h-[300px] overflow-y-auto immich-scrollbar">
{#if selectedUsers.length > 0}
<div class="flex gap-4 py-2 px-5 overflow-x-auto place-items-center mb-2">
<p class="font-medium">To</p>

View File

@@ -23,14 +23,6 @@
export let publicSharedKey = '';
export let showNavigation = true;
$: {
appearsInAlbums = [];
api.albumApi.getAllAlbums(undefined, asset.id).then((result) => {
appearsInAlbums = result.data;
});
}
const dispatch = createEventDispatcher();
let halfLeftHover = false;
let halfRightHover = false;
@@ -41,8 +33,15 @@
let shouldPlayMotionPhoto = false;
const onKeyboardPress = (keyInfo: KeyboardEvent) => handleKeyboardPress(keyInfo.key);
onMount(() => {
onMount(async () => {
document.addEventListener('keydown', onKeyboardPress);
try {
const { data } = await api.albumApi.getAllAlbums(undefined, asset.id);
appearsInAlbums = data;
} catch (e) {
console.error('Error getting album that asset belong to', e);
}
});
onDestroy(() => {

View File

@@ -23,7 +23,7 @@
drawMap(asset.exifInfo.latitude, asset.exifInfo.longitude);
}
export let albums: AlbumResponseDto[];
export let albums: AlbumResponseDto[] = [];
onMount(async () => {
if (browser) {

View File

@@ -226,7 +226,7 @@
{#if isShowSharedLink}
<div class="flex w-full gap-4">
<input class="immich-form-input w-full" bind:value={sharedLink} />
<input class="immich-form-input w-full" bind:value={sharedLink} disabled />
<button
on:click={() => handleCopy()}