From c60ebae1524f9c54d07d228dd9265286f63f8d1b Mon Sep 17 00:00:00 2001 From: rob Date: Fri, 8 Jul 2022 00:04:17 -0400 Subject: [PATCH] core updates --- app/views/components/file-upload-image.pug | 2 +- app/views/components/library.pug | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/app/views/components/file-upload-image.pug b/app/views/components/file-upload-image.pug index 78498c2..361631d 100644 --- a/app/views/components/file-upload-image.pug +++ b/app/views/components/file-upload-image.pug @@ -31,7 +31,7 @@ mixin renderFileUploadImage (actionUrl, containerId, imageId, imageClass, defaul data-cropper-options= cropperOptions, onchange="return dtp.app.selectImageFile(event);", ) - button(type="button", tabindex="-1").uk-button.dtp-button-default Select + button(type="button", tabindex="-1").uk-button.uk-button-default Select #file-info(class="uk-text-center uk-text-left@m", hidden) #file-name.uk-text-bold diff --git a/app/views/components/library.pug b/app/views/components/library.pug index 0067185..a8fbe8d 100644 --- a/app/views/components/library.pug +++ b/app/views/components/library.pug @@ -10,18 +10,23 @@ include section-title return (value < 1000) ? numeral(value).format('0,0') : numeral(value).format('0,0.0a'); } + function displayIntegerValue (value) { + return numeral(value).format(value > 1000 ? '0,0.0a' : '0,0'); + } + mixin renderCell (label, value, className) div(title=`${label}: ${numeral(value).format('0,0')}`).uk-tile.uk-tile-default.uk-padding-remove.no-select div(class=className)= value .uk-text-muted.uk-text-small= label -- - function displayIntegerValue (value) { - return numeral(value).format(value > 1000 ? '0,0.0a' : '0,0'); - } - mixin renderBackButton ( ) button(type="button", onclick="window.history.back();").uk-button.uk-button-default span i.fas.fa-chevron-left - span(class="uk-visible@s").uk-margin-small-left Back \ No newline at end of file + span(class="uk-visible@s").uk-margin-small-left Back + +mixin renderUserLink (user) + if user.coreUserId + a(href=`/user/core/${user._id}`)= `${user.username}@${user.core.meta.domainKey}` + else + a(href=`/user/${user._id}`)= user.displayName || user.username \ No newline at end of file