0d5138f5bc
- drive capacity display with stamp polling - download/upload progress handling - overlay and tooltip issues - FileMaganger readme - ultra-light mode handling - account feed view page - download media files - remove not found syncing link - fix ultra light node wallet page - tooltip issues --------- Co-authored-by: Andrei Mitrea <andrei.mitrea.hq@gmail.com> Co-authored-by: nidishk <nidishkrishnan45@gmail.com> Co-authored-by: Ferenc Sárai <sarai.ferenc@gmail.com> Co-authored-by: Nándor Komlódi <nandor.komlodi@gmail.com> Co-authored-by: rolandlor <33499567+rolandlor@users.noreply.github.com>
20 lines
690 B
TypeScript
20 lines
690 B
TypeScript
const plusOne = 1
|
|
const plusThree = 3
|
|
const plusSix = 6
|
|
|
|
export const desiredLifetimeOptions = [
|
|
{ value: 0, label: `${plusOne} week` },
|
|
{ value: 1, label: `${plusOne} month` },
|
|
{ value: 2, label: `${plusThree} months` },
|
|
{ value: 3, label: `${plusSix} months` },
|
|
{ value: 4, label: `${plusOne} year` },
|
|
]
|
|
|
|
export const lifetimeAdjustments = new Map<number, (date: Date) => void>([
|
|
[0, date => date.setDate(date.getDate() + plusOne * 7)],
|
|
[1, date => date.setMonth(date.getMonth() + plusOne)],
|
|
[2, date => date.setMonth(date.getMonth() + plusThree)],
|
|
[3, date => date.setMonth(date.getMonth() + plusSix)],
|
|
[4, date => date.setFullYear(date.getFullYear() + plusOne)],
|
|
])
|