mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Soft delete (#395)
* Use higher res image in module avatar * Remove glitch * Add soft delete button / flow * Fix tests
This commit is contained in:
@@ -50,6 +50,10 @@ describe('Views / Private / Module Bar Avatar', () => {
|
||||
key: 'directus-small-crop',
|
||||
url: 'test1',
|
||||
},
|
||||
{
|
||||
key: 'directus-medium-crop',
|
||||
url: 'test2',
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
@@ -63,7 +67,7 @@ describe('Views / Private / Module Bar Avatar', () => {
|
||||
},
|
||||
});
|
||||
|
||||
expect((component.vm as any).avatarURL).toBe('test1');
|
||||
expect((component.vm as any).avatarURL).toBe('test2');
|
||||
});
|
||||
|
||||
it('Returns null if avatar is null', () => {
|
||||
|
||||
@@ -44,7 +44,7 @@ export default defineComponent({
|
||||
if (userStore.state.currentUser.avatar === null) return null;
|
||||
|
||||
const thumbnail = userStore.state.currentUser.avatar.data.thumbnails.find((thumb) => {
|
||||
return thumb.key === 'directus-small-crop';
|
||||
return thumb.key === 'directus-medium-crop';
|
||||
});
|
||||
|
||||
return thumbnail?.url || null;
|
||||
|
||||
Reference in New Issue
Block a user