fix web
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en" class="dark">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import ThemeButton from '../shared-components/theme-button.svelte';
|
||||
import { shouldIgnoreShortcut } from '$lib/utils/shortcut';
|
||||
import { mdiFileImagePlusOutline, mdiFolderDownloadOutline } from '@mdi/js';
|
||||
import UpdatePanel from '../shared-components/update-panel.svelte';
|
||||
import UpdatePanel from '../shared-components/update-panel.svelte';
|
||||
|
||||
export let sharedLink: SharedLinkResponseDto;
|
||||
export let user: UserResponseDto | undefined = undefined;
|
||||
@@ -169,5 +169,4 @@
|
||||
</section>
|
||||
</AssetGrid>
|
||||
<UpdatePanel {assetStore} />
|
||||
|
||||
</main>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
import { getAssetFilename } from '$lib/utils/asset-utils';
|
||||
import { AlbumResponseDto, AssetResponseDto, ThumbnailFormat, api } from '@api';
|
||||
import { DateTime } from 'luxon';
|
||||
import { createEventDispatcher } from 'svelte';
|
||||
import { createEventDispatcher, onDestroy } from 'svelte';
|
||||
import { slide } from 'svelte/transition';
|
||||
import { asByteUnitString } from '../../utils/byte-units';
|
||||
import ImageThumbnail from '../assets/thumbnail/image-thumbnail.svelte';
|
||||
@@ -57,10 +57,14 @@
|
||||
|
||||
$: people = asset.people || [];
|
||||
|
||||
const subscribe = websocketStore.onAssetUpdate.subscribe(assetUpdate => {
|
||||
const unsubscribe = websocketStore.onAssetUpdate.subscribe((assetUpdate) => {
|
||||
if (assetUpdate && assetUpdate.id === asset.id) {
|
||||
asset = assetUpdate;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
unsubscribe();
|
||||
});
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
@@ -275,8 +275,6 @@
|
||||
|
||||
<style>
|
||||
.main-view {
|
||||
box-shadow:
|
||||
0 4px 4px 0 rgba(0, 0, 0, 0.3),
|
||||
0 8px 12px 6px rgba(0, 0, 0, 0.15);
|
||||
box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.3), 0 8px 12px 6px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -21,7 +21,6 @@
|
||||
.map((a) => a.id);
|
||||
|
||||
try {
|
||||
|
||||
await api.assetApi.updateAssets({
|
||||
assetBulkUpdateDto: {
|
||||
ids,
|
||||
|
||||
@@ -413,7 +413,6 @@
|
||||
{/if}
|
||||
</Portal>
|
||||
|
||||
|
||||
<style>
|
||||
#asset-grid {
|
||||
contain: layout;
|
||||
|
||||
@@ -91,8 +91,6 @@
|
||||
|
||||
<style>
|
||||
.memory-card {
|
||||
box-shadow:
|
||||
rgba(60, 64, 67, 0.3) 0px 1px 2px 0px,
|
||||
rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
|
||||
box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
};
|
||||
|
||||
const handleConfirm = () => {
|
||||
if (!point) return;
|
||||
dispatch('confirm', point);
|
||||
};
|
||||
</script>
|
||||
@@ -37,8 +38,6 @@
|
||||
confirmColor="primary"
|
||||
cancelColor="secondary"
|
||||
title="Change Location"
|
||||
prompt="Please select a new location:"
|
||||
disabled={!point}
|
||||
on:confirm={handleConfirm}
|
||||
on:cancel={handleCancel}
|
||||
>
|
||||
|
||||
@@ -3,26 +3,24 @@
|
||||
import type { AssetStore } from '$lib/stores/assets.store';
|
||||
import { notificationController, NotificationType } from './notification/notification';
|
||||
|
||||
|
||||
export let assetStore: AssetStore | null;
|
||||
let assetUpdateCount = 0;
|
||||
let lastAssetName: string;
|
||||
let timeoutId: string | number | NodeJS.Timeout | undefined;
|
||||
|
||||
websocketStore.onAssetUpdate.subscribe(asset => {
|
||||
websocketStore.onAssetUpdate.subscribe((asset) => {
|
||||
if (asset && asset.originalFileName && assetStore) {
|
||||
lastAssetName = asset.originalFileName;
|
||||
assetUpdateCount++;
|
||||
|
||||
assetStore.updateAsset(asset,true);
|
||||
assetStore.updateAsset(asset, true);
|
||||
|
||||
assetStore.removeAsset(asset.id); // Update timeline
|
||||
assetStore.addAsset(asset);
|
||||
|
||||
clearTimeout(timeoutId);
|
||||
clearTimeout(timeoutId);
|
||||
timeoutId = setTimeout(() => {
|
||||
if (assetUpdateCount === 1) {
|
||||
|
||||
notificationController.show({
|
||||
message: `Asset updated: ${lastAssetName}.`,
|
||||
type: NotificationType.Info,
|
||||
@@ -37,5 +35,4 @@
|
||||
}, 500);
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
</script>
|
||||
|
||||
@@ -73,10 +73,7 @@ export class AssetStore {
|
||||
assets: AssetResponseDto[] = [];
|
||||
albumAssets: Set<string> = new Set();
|
||||
|
||||
constructor(
|
||||
options: AssetStoreOptions,
|
||||
private albumId?: string,
|
||||
) {
|
||||
constructor(options: AssetStoreOptions, private albumId?: string) {
|
||||
this.options = { ...options, size: TimeBucketSize.Month };
|
||||
this.store$.set(this);
|
||||
}
|
||||
|
||||
@@ -98,4 +98,4 @@
|
||||
/>
|
||||
</AssetGrid>
|
||||
</UserPageLayout>
|
||||
<UpdatePanel {assetStore} />
|
||||
<UpdatePanel {assetStore} />
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
import NavigationLoadingBar from '$lib/components/shared-components/navigation-loading-bar.svelte';
|
||||
import DownloadPanel from '$lib/components/asset-viewer/download-panel.svelte';
|
||||
import UploadPanel from '$lib/components/shared-components/upload-panel.svelte';
|
||||
import UpdatePanel from '$lib/components/shared-components/update-panel.svelte';
|
||||
import NotificationList from '$lib/components/shared-components/notification/notification-list.svelte';
|
||||
import VersionAnnouncementBox from '$lib/components/shared-components/version-announcement-box.svelte';
|
||||
import type { LayoutData } from './$types';
|
||||
|
||||
@@ -181,8 +181,8 @@
|
||||
isDeleted(user)
|
||||
? 'bg-red-300 dark:bg-red-900'
|
||||
: i % 2 == 0
|
||||
? 'bg-immich-gray dark:bg-immich-dark-gray/75'
|
||||
: 'bg-immich-bg dark:bg-immich-dark-gray/50'
|
||||
? 'bg-immich-gray dark:bg-immich-dark-gray/75'
|
||||
: 'bg-immich-bg dark:bg-immich-dark-gray/50'
|
||||
}`}
|
||||
>
|
||||
<td class="w-4/12 text-ellipsis break-all px-2 text-sm">{user.email}</td>
|
||||
@@ -247,8 +247,8 @@
|
||||
isDeleted(user)
|
||||
? 'bg-red-300 dark:bg-red-900'
|
||||
: i % 2 == 0
|
||||
? 'bg-immich-gray dark:bg-immich-dark-gray/75'
|
||||
: 'bg-immich-bg dark:bg-immich-dark-gray/50'
|
||||
? 'bg-immich-gray dark:bg-immich-dark-gray/75'
|
||||
: 'bg-immich-bg dark:bg-immich-dark-gray/50'
|
||||
}`}
|
||||
>
|
||||
<td class="w-1/4 text-ellipsis break-words px-2 text-sm">{user.name}</td>
|
||||
|
||||
Reference in New Issue
Block a user