-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify thumbs in front-end (#2678)
* simplify thumbs in front-end * Fix blur overflow --------- Co-authored-by: aSouchereau <dev@souch.ca>
- Loading branch information
1 parent
8c71472
commit a0e6421
Showing
4 changed files
with
92 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import Constants from "@/services/constants"; | ||
|
||
export function useImageHelpers() { | ||
function isNotEmpty(link: string | null | undefined): boolean { | ||
return link !== "" && link !== null && link !== undefined; | ||
} | ||
|
||
function getPlayIcon(): string { | ||
return Constants.BASE_URL + "/img/play-icon.png"; | ||
} | ||
|
||
function getPlaceholderIcon(): string { | ||
return Constants.BASE_URL + "/img/placeholder.png"; | ||
} | ||
|
||
function getNoImageIcon(): string { | ||
return Constants.BASE_URL + "/img/no_images.svg"; | ||
} | ||
|
||
function getPaswwordIcon(): string { | ||
return Constants.BASE_URL + "/img/password.svg"; | ||
} | ||
|
||
return { | ||
isNotEmpty, | ||
getPlayIcon, | ||
getPlaceholderIcon, | ||
getNoImageIcon, | ||
getPaswwordIcon, | ||
}; | ||
} | ||
|
||
export const EmptyAlbumCallbacks = { | ||
setAsCover: () => {}, | ||
toggleRename: () => {}, | ||
toggleMerge: () => {}, | ||
toggleMove: () => {}, | ||
toggleDelete: () => {}, | ||
toggleDownload: () => {}, | ||
}; | ||
|
||
export const EmptyPhotoCallbacks = { | ||
star: () => {}, | ||
unstar: () => {}, | ||
setAsCover: () => {}, | ||
setAsHeader: () => {}, | ||
toggleTag: () => {}, | ||
toggleRename: () => {}, | ||
toggleCopyTo: () => {}, | ||
toggleMove: () => {}, | ||
toggleDelete: () => {}, | ||
toggleDownload: () => {}, | ||
}; |