Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(web): Implement keep this delete others for asset stacks #13704

Closed
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
168 commits
Select commit Hold shift + click to select a range
83ca9bc
Implement keep this delete others for asset stacks
bdavis2-PCTY Oct 23, 2024
f0e4eff
Remove unused import
bdavis2-PCTY Oct 23, 2024
f2ba2f1
Code cleanup
bdavis2-PCTY Oct 23, 2024
3e2b8ac
Internationalize text
bdavis2-PCTY Oct 23, 2024
0672e82
Change variable names
bdavis2-PCTY Oct 23, 2024
b6abc92
Change keepThisDeleteOthers function to accept asset and stack object…
bdavis2-PCTY Oct 23, 2024
6420550
Add confirmation dialog for keep this, delete others
bdavis2-PCTY Oct 23, 2024
2fd10e5
Merge branch 'main' into feature/keep-this-delete-others
bdavis2-PCTY Oct 24, 2024
b9fafae
Update i18n/en.json
bdavis2-PCTY Nov 18, 2024
05514ed
Reverse delete stacks/assets order
bdavis2-PCTY Nov 18, 2024
35c7b57
feat: track when assets are added to an album (#13725)
jrasm91 Oct 24, 2024
cf050e3
refactor(server): telemetry env variables (#13705)
danieldietzler Oct 24, 2024
1fd4893
refactor(server): database config (#13730)
jrasm91 Oct 24, 2024
600330b
refactor(server): user create logic (#13728)
jrasm91 Oct 24, 2024
00f2e24
fix: duplicated library scan jobs and api server library watch (#13734)
zackpollard Oct 25, 2024
31923a7
chore(deps): update base-image to v20241025 (major) (#13736)
renovate[bot] Oct 26, 2024
606ec54
fix: X years ago ordering (#13742)
darrelhong Oct 26, 2024
0faf47b
chore(ml): remove setuptools from dependencies (#13762)
dotlambda Oct 27, 2024
7b1369e
feat: github actions workflow to fix formatting (#13768)
bo0tzz Oct 27, 2024
ee9ef09
fix: Add DB_DATA_LOCATION config. (#13754)
Sweebah Oct 27, 2024
fb2aab7
chore: version v1.119.0
github-actions[bot] Oct 28, 2024
cf48e9c
chore(mobile): post release task (#13779)
alextran1502 Oct 28, 2024
f3f76be
feat(web): add job action to search page result (#13784)
alextran1502 Oct 28, 2024
58c5777
chore(deps): update dependency @types/node to ^20.17.0 (#13787)
renovate[bot] Oct 29, 2024
d5c7527
chore(deps): update stumpylog/image-cleaner-action action to v0.9.0 (…
renovate[bot] Oct 29, 2024
f2bce85
docs: note about Nginx reverse proxy compatibility with Let's Encrypt…
yozik04 Oct 29, 2024
452fe2e
docs: Add info about album sync&folder view (#12371)
aviv926 Oct 29, 2024
a20becb
chore: version v1.119.1
github-actions[bot] Oct 29, 2024
a33d80c
fix(server): handle N/A duration response from ffprobe (#13803)
jrasm91 Oct 29, 2024
407fc36
chore(web): update translations (#13688)
weblate Oct 29, 2024
dd237a6
feat: mount checks on a folder level (#13801)
zackpollard Oct 29, 2024
11a9184
fix: shutdown api process when another worker exits unexpectedly (#13…
zackpollard Oct 29, 2024
993f505
refactor: better postgres connection param typing (#13800)
zackpollard Oct 29, 2024
28482a8
fix(mobile): Revert thumbnail image ui improvements (#13655) (#13806)
alextran1502 Oct 29, 2024
cab53b9
refactor(server): worker cleanup (#13805)
jrasm91 Oct 29, 2024
ef82e82
feat(web): library settings crontab link includes existing expression…
zackpollard Oct 29, 2024
2ed72b6
fix(server): keep system config transformations (#13796)
jrasm91 Oct 29, 2024
6d35b12
chore(docs): add feature to readme (#13794)
alextran1502 Oct 29, 2024
531be1f
fix(mobile): thumbnail not filled area on tablet (#13808)
alextran1502 Oct 29, 2024
fe355e7
feat(web): disable opening image and library sub-items by default (#1…
ITestInProd Oct 29, 2024
dfdc3d5
chore(server): telemetry env clean up (#13813)
jrasm91 Oct 29, 2024
926a999
refactor(server): cls (#13814)
jrasm91 Oct 29, 2024
695e2b5
refactor(server): env validation (#13817)
jrasm91 Oct 30, 2024
749c1c7
chore(deps): update grafana/grafana docker tag to v11.3.0 (#13763)
renovate[bot] Oct 30, 2024
92b14ce
chore(deps): update terraform cloudflare to v4.45.0 (#13820)
renovate[bot] Oct 30, 2024
48e2804
chore(deps): update base-image to v20241029 (major) (#13821)
renovate[bot] Oct 30, 2024
543463e
feat(web): scrubber label and animation (#13815)
alextran1502 Oct 30, 2024
f395e26
chore(docs): update german readme to latest version (#13824)
MickLesk Oct 30, 2024
f289a22
chore(deps): update node to v22 (major) (#13792)
renovate[bot] Oct 30, 2024
10005b8
fix(deps): update machine-learning (#13786)
renovate[bot] Oct 30, 2024
dfc3de0
refactor(server): remove unused on method (#13830)
jrasm91 Oct 30, 2024
d41c102
chore(deps): update typescript-projects (#13789)
renovate[bot] Oct 30, 2024
a9bc7c9
fix(mobile): search page (#13833)
alextran1502 Oct 30, 2024
acc623f
fix(mobile): Reapply thumbnail image improvements and fix issue #1380…
dvbthien Oct 30, 2024
784709f
feat: built-in automatic database backups (#13773)
zackpollard Oct 31, 2024
c0a68f9
chore(deps): update dependency @types/node to ^22.8.1 (#13854)
renovate[bot] Oct 31, 2024
ba1228b
chore(deps): update dependency node to v22 (#13855)
renovate[bot] Oct 31, 2024
debe02a
fix(mobile): not throwing error when cannot parse orientation value (…
alextran1502 Oct 31, 2024
7a4abc8
chore: move library settings cron expression to setting select elemen…
zackpollard Oct 31, 2024
14be724
chore(docs): Add Immich Public Proxy to the Community Projects list (…
alangrainger Oct 31, 2024
fd4ed7b
refactor(server): job discovery (#13838)
jrasm91 Oct 31, 2024
e531807
chore(deps): update flutter (#13455)
renovate[bot] Oct 31, 2024
e6e8cb7
chore(mobile): update flutter_web_auth (#13863)
alextran1502 Oct 31, 2024
2f5bc73
feat(server): use tonemapx for software tone-mapping (#13785)
mertalev Nov 1, 2024
f5f54e8
fix(mobile): do not removed not backup asset when selecting the corre…
yashrajjain726 Nov 1, 2024
a00e4e0
fix(server): wrong image dimensions for RAW files (RAF, CR2) (also fi…
C-Otto Nov 1, 2024
5817150
refactor(server): immich worker (#13871)
jrasm91 Nov 1, 2024
0684781
chore: svelte 5 🎉 (#13738)
danieldietzler Nov 2, 2024
603894b
feat: render asset path (#13873)
cfitzw Nov 2, 2024
b6616a7
fix: healthcheck if custom host is set (#13887)
danieldietzler Nov 3, 2024
9f79770
fix(deps): update dependency exiftool-vendored to v28.7.0 (#13790)
renovate[bot] Nov 4, 2024
522756a
fix: remove duplicateIds on unique assets (#13752)
Pranay-Pandey Nov 4, 2024
76151fc
fix(deps): update machine-learning (#13919)
renovate[bot] Nov 5, 2024
8547c7e
chore(deps): update node (#13918)
renovate[bot] Nov 5, 2024
7a82a34
chore(deps): update dependency @types/node to ^22.8.5 (#13923)
renovate[bot] Nov 5, 2024
4baaf60
refactor(server): get worker (#13927)
jrasm91 Nov 5, 2024
0278c90
chore: better observability for geodata import (#13931)
zackpollard Nov 5, 2024
388b9f2
refactor: config init event for first config load (#13930)
zackpollard Nov 5, 2024
ae3184d
chore(mobile): upgrade gradle (#13901)
alextran1502 Nov 5, 2024
8efdd98
chore(web): scrubber animation (#13936)
alextran1502 Nov 5, 2024
b7bfe3f
chore(deps): update dependency @types/node to ^22.8.6 (#13937)
renovate[bot] Nov 5, 2024
0d8ce1b
chore(deps): update typescript-projects (#13922)
renovate[bot] Nov 5, 2024
d0b301f
chore(deps): update base-image to v20241105 (major) (#13826)
renovate[bot] Nov 5, 2024
d363d2d
docs: fail2ban community project (#13943)
mmomjian Nov 6, 2024
7442106
chore(mobile): translation update (#13942)
alextran1502 Nov 6, 2024
8c19513
chore(web): update translations (#13810)
weblate Nov 6, 2024
1dca497
chore: version v1.120.0
github-actions[bot] Nov 6, 2024
bc49d9c
fix: docker link (#13956)
danieldietzler Nov 6, 2024
f6d6165
docs: improve custom-locations wording to be easier to read (#13849)
slamp Nov 6, 2024
0e612d4
docs: Added a note about avoiding redundant database backups (#13958)
thariq-shanavas Nov 6, 2024
d32841a
fix(server): cannot render email template (#13957)
alextran1502 Nov 6, 2024
0cc1cec
chore: tidy up backup-and-restore.md (#13961)
bo0tzz Nov 6, 2024
facdb53
docs: 50k stars (#13964)
danieldietzler Nov 6, 2024
8caabfa
chore(mobile): post release task (#13954)
alextran1502 Nov 6, 2024
909ca92
docs: add backups to startup folders list (#13967)
yodatak Nov 7, 2024
505f733
fix(server): allow starting backup through API and fix pg_dumpall arg…
dotlambda Nov 7, 2024
707f16b
fix(server): database backups compatible with deduplication (#13965)
Scrumplex Nov 7, 2024
a2a1771
docs: update roadmap (#13984)
jrasm91 Nov 7, 2024
d0b0d8f
fix(mobile): video player not playing in full size on Android (#13986)
alextran1502 Nov 7, 2024
3cd3b7f
fix(web): time zone dependent test (#13859)
jrasm91 Nov 7, 2024
21ff30c
chore: version v1.120.1
github-actions[bot] Nov 7, 2024
a63d465
chore(mobile): update isar build (#13987)
alextran1502 Nov 7, 2024
2069f68
refactor: remove smart info table (#13985)
jrasm91 Nov 7, 2024
ac7c40d
chore(mobile): post release tasks (#13989)
alextran1502 Nov 7, 2024
53c453b
refactor(server): cron repository (#13988)
jrasm91 Nov 7, 2024
09d1413
refactor(server): cron validation (#13990)
jrasm91 Nov 7, 2024
009fb88
chore: backups custom location and config file docs (#13996)
zackpollard Nov 7, 2024
e70d8b4
fix(server): support non-default postgres port when taking a backup (…
jrasm91 Nov 7, 2024
7a14600
fix(server): thumbnail rotation when using embedded previews (#13948)
zhaoterryy Nov 8, 2024
4ed9e59
docs: make IGNORE_MOUNT_CHECK warning stronger (#14011)
bo0tzz Nov 8, 2024
a23040b
fix(web): use locale for scrubber label when scrolling (#14012)
michelheusschen Nov 8, 2024
c2a9f67
chore(docs): roadmap SEO (#14024)
ben-basten Nov 9, 2024
77e9c69
fix(mobile): make sure date locale is inititialized for some language…
alextran1502 Nov 9, 2024
5d17f5a
feat(web): stable json settings export (#14036)
mcarbonne Nov 9, 2024
c999c5e
chore(web): Update the new version announcement text (#14001)
Snowknight26 Nov 9, 2024
c496466
docs: Fix DCM docs link (#14059)
Mraedis Nov 10, 2024
8d2a274
chore: add weblate requests (#14051)
danieldietzler Nov 10, 2024
65ac16a
docs: clarify file size impact in hardware-transcoding.md (#14049)
gamescom15 Nov 11, 2024
fb9dc81
fix(server): attempt to delete failed backups immediately after failu…
zackpollard Nov 11, 2024
33633c0
docs: backup folder name is backups (#14073)
zackpollard Nov 11, 2024
cc0bb9c
fix: config updates not applying for job and storage template service…
zackpollard Nov 11, 2024
a1a54dd
chore(ml): replace fastapi-slim with fastapi (#14091)
dotlambda Nov 12, 2024
a63998c
chore(deps): update node (#14090)
renovate[bot] Nov 12, 2024
46f3638
chore(deps): update base-image to v20241112 (major) (#14088)
renovate[bot] Nov 12, 2024
425ddb8
feat(server): use pg_dumpall version that matches the database versio…
zackpollard Nov 12, 2024
9558602
fix(server): correct rotation for common files (#14092)
alextran1502 Nov 12, 2024
1696352
fix(server): backup version checks not handling database versions cor…
zackpollard Nov 12, 2024
1d08b0f
chore: version v1.120.2
github-actions[bot] Nov 12, 2024
efdbf18
chore(mobile): post release tasks (#14105)
alextran1502 Nov 12, 2024
116e7ca
chore(deps): update redis:6.2-alpine docker digest to 77c6e37 (#14098)
renovate[bot] Nov 13, 2024
b9d1c94
chore(deps): update docker.io/redis:6.2-alpine docker digest to 77c6e…
renovate[bot] Nov 13, 2024
55e4ac5
chore(deps): bump ytanikin/PRConventionalCommits from 1.2.0 to 1.3.0 …
dependabot[bot] Nov 13, 2024
3eb3a60
chore(deps): update prom/prometheus docker digest to 2659f4c (#13928)
renovate[bot] Nov 13, 2024
5c6f715
refactor(mobile): video controls (#14086)
mertalev Nov 13, 2024
574393d
chore(docs): encode db dump in UTF-8 without BOM for Windows (#13775)
amorphobia Nov 13, 2024
8251d5b
chore(deps): update docker.io/redis:6.2-alpine docker digest to eaba7…
renovate[bot] Nov 13, 2024
5309ad1
chore(deps): update redis:6.2-alpine docker digest to eaba718 (#14114)
renovate[bot] Nov 13, 2024
2d6a793
fix(mobile): duration ui overflow (#14120)
alextran1502 Nov 13, 2024
4ce1d04
feat: use dateTimeOriginal to calculate album date (#14119)
p2kmgcl Nov 13, 2024
4f3fce5
docs: Update TrueNAS docs for TrueNAS SCALE 24.10 (#14067)
NicholasFlamy Nov 13, 2024
2bbe288
fix(mobile): fix logout timeout (#14104)
johnstef99 Nov 13, 2024
c30e312
feat: add minimal devcontainer setup (#14038)
mcarbonne Nov 13, 2024
f4f98db
feat(mobile): new video slider ui (#14126)
mertalev Nov 14, 2024
d561ad9
fix(server): Some MTS videos fail to generate thumbnail (#14134)
Lukasdotcom Nov 14, 2024
ff5b0d5
chore(web): migration svelte 5 syntax (#13883)
alextran1502 Nov 14, 2024
7dc6d2c
fix(web): textarea autogrow height (#13983)
duckimann Nov 14, 2024
e6d652c
fix: Routing back button in sharedLinks page (#13703)
Pranay-Pandey Nov 14, 2024
246650a
fix(web): ensure current asset index stays within bounds (#14013)
michelheusschen Nov 14, 2024
ce1810b
fix(web): saving pasted coordinates (#14143)
michelheusschen Nov 14, 2024
5730a3c
chore(web): move enum out of .svelte file (#14144)
alextran1502 Nov 14, 2024
6d635e9
fix(web): update description height when navigating between assets (#…
michelheusschen Nov 14, 2024
915a145
fix(web): allow selecting people after clearing search options (#14146)
michelheusschen Nov 14, 2024
e17ca80
fix(mobile): Android local notification failes to invoke (#14155)
alextran1502 Nov 14, 2024
5e7c7bb
feat(web): Added tag button to the context menu in the favorites page…
IMBeniamin Nov 14, 2024
5388944
chore(deps): update prom/prometheus docker digest to 3b9b2a1 (#14154)
renovate[bot] Nov 14, 2024
d913896
fix(web): prevent infinite loop when modifying stacked asset (#14162)
michelheusschen Nov 15, 2024
d7e74cd
fix(cli): Concurrency not fully using queue potential (#11828)
Tiefseetauchner Nov 15, 2024
ea3921d
refactor(mobile): backup info box (#14171)
mertalev Nov 15, 2024
20c2932
refactor(web): remove reactivity triggers (#14164)
michelheusschen Nov 15, 2024
dc0ec6c
fix(web): don't refresh panorama viewer when modifying asset (#14163)
michelheusschen Nov 15, 2024
edc8f83
feat: adding photo & video storage space to server stats (#14125)
weathondev Nov 15, 2024
0e25f49
docs: get asset owner by ID from database (#14174)
mmomjian Nov 16, 2024
eea59c0
fix(mobile): unnecessary rebuilds from partner share notifier (#14170)
mertalev Nov 17, 2024
d9ded6b
fix: show tags when viewing stacked assets (#14199)
michelheusschen Nov 18, 2024
ac98821
chore(deps): pin mcr.microsoft.com/devcontainers/typescript-node dock…
renovate[bot] Nov 18, 2024
2829761
fix(mobile): use sets in album refresh, concurrent futures (#14193)
mertalev Nov 18, 2024
a2249b6
fix(mobile): Dismissible menus (#14192)
johnstef99 Nov 18, 2024
c2c3109
Backmerge (#1)
bdavis2-PCTY Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@
"failed_to_remove_product_key": "Failed to remove product key",
"failed_to_stack_assets": "Failed to stack assets",
"failed_to_unstack_assets": "Failed to un-stack assets",
"failed_to_keep_this_delete_others": "Failed to keep this asset and delete the other assets",
"import_path_already_exists": "This import path already exists.",
"incorrect_email_or_password": "Incorrect email or password",
"paths_validation_failed": "{paths, plural, one {# path} other {# paths}} failed validation",
Expand Down Expand Up @@ -1250,8 +1251,10 @@
"unselect_all_duplicates": "Unselect all duplicates",
"unstack": "Un-stack",
"unstacked_assets_count": "Un-stacked {count, plural, one {# asset} other {# assets}}",
"keep_this_delete_others": "Keep this, delete others",
"untracked_files": "Untracked files",
"untracked_files_decription": "These files are not tracked by the application. They can be the results of failed moves, interrupted uploads, or left behind due to a bug",
"kept_this_deleted_others": "Kept this asset and deleted {count, plural, one {# asset} other {# assets}}",
"up_next": "Up next",
"updated_password": "Updated password",
"upload": "Upload",
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/components/asset-viewer/actions/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ type ActionMap = {
[AssetAction.ADD]: { asset: AssetResponseDto };
[AssetAction.ADD_TO_ALBUM]: { asset: AssetResponseDto; album: AlbumResponseDto };
[AssetAction.UNSTACK]: { assets: AssetResponseDto[] };
[AssetAction.KEEP_THIS_DELETE_OTHERS]: { asset: AssetResponseDto };
};

export type Action = {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<script lang="ts">
import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte';
import { AssetAction } from '$lib/constants';
import { keepThisDeleteOthers } from '$lib/utils/asset-utils';
import type { AssetResponseDto, StackResponseDto } from '@immich/sdk';
import { mdiPinOutline } from '@mdi/js';
import type { OnAction } from './action';
import { t } from 'svelte-i18n';

export let stack: StackResponseDto;
export let asset: AssetResponseDto;
export let onAction: OnAction;

const handleKeepThisDeleteOthers = async () => {
const keptAsset = await keepThisDeleteOthers(asset.id, stack.id);
bdavis2-PCTY marked this conversation as resolved.
Show resolved Hide resolved
if (keptAsset) {
onAction({ type: AssetAction.UNSTACK, assets: [keptAsset] });
}
};
</script>

<MenuOption icon={mdiPinOutline} onClick={handleKeepThisDeleteOthers} text={$t('keep_this_delete_others')} />
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import ShareAction from '$lib/components/asset-viewer/actions/share-action.svelte';
import ShowDetailAction from '$lib/components/asset-viewer/actions/show-detail-action.svelte';
import UnstackAction from '$lib/components/asset-viewer/actions/unstack-action.svelte';
import KeepThisDeleteOthersAction from '$lib/components/asset-viewer/actions/keep-this-delete-others.svelte';
import CircleIconButton from '$lib/components/elements/buttons/circle-icon-button.svelte';
import ButtonContextMenu from '$lib/components/shared-components/context-menu/button-context-menu.svelte';
import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte';
Expand Down Expand Up @@ -146,6 +147,7 @@
{#if isOwner}
{#if stack}
<UnstackAction {stack} {onAction} />
<KeepThisDeleteOthersAction {stack} {asset} {onAction} />
{/if}
{#if album}
<SetAlbumCoverAction {asset} {album} />
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/components/asset-viewer/asset-viewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,7 @@
break;
}

case AssetAction.KEEP_THIS_DELETE_OTHERS:
case AssetAction.UNSTACK: {
closeViewer();
}
Expand Down
1 change: 1 addition & 0 deletions web/src/lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export enum AssetAction {
ADD = 'add',
ADD_TO_ALBUM = 'add-to-album',
UNSTACK = 'unstack',
KEEP_THIS_DELETE_OTHERS = 'keep-this-delete-others',
}

export enum AppRoute {
Expand Down
27 changes: 27 additions & 0 deletions web/src/lib/utils/asset-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { getFormatter } from '$lib/utils/i18n';
import {
addAssetsToAlbum as addAssets,
createStack,
deleteAssets,
deleteStacks,
getAssetInfo,
getBaseUrl,
Expand Down Expand Up @@ -438,6 +439,32 @@ export const deleteStack = async (stackIds: string[]) => {
}
};

export const keepThisDeleteOthers = async (keepId: string, stackId: string) => {
const $t = get(t);

try {
const stack = await getStack({ id: stackId });
const assetToKeep = stack.assets.find((asset) => asset.id === keepId);
mertalev marked this conversation as resolved.
Show resolved Hide resolved
const assetsToDeleteIds = stack.assets.filter((asset) => asset.id !== keepId).map((asset) => asset.id);
if (!assetToKeep) {
return;
}

await deleteStacks({ bulkIdsDto: { ids: [stack.id] } });
await deleteAssets({ assetBulkDeleteDto: { ids: assetsToDeleteIds } });
bdavis2-PCTY marked this conversation as resolved.
Show resolved Hide resolved
bdavis2-PCTY marked this conversation as resolved.
Show resolved Hide resolved

notificationController.show({
type: NotificationType.Info,
message: $t('kept_this_deleted_others', { values: { count: assetsToDeleteIds.length } }),
});

assetToKeep.stack = null;
return assetToKeep;
} catch (error) {
handleError(error, $t('errors.failed_to_keep_this_delete_others'));
}
};

export const selectAllAssets = async (assetStore: AssetStore, assetInteractionStore: AssetInteractionStore) => {
if (get(isSelectingAllAssets)) {
// Selection is already ongoing
Expand Down