Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
mounted() {
if (this.$db.get('linux_command').value()) {
const currentDate = dayjs();
const storageDate = this.$db.get('linux_command.time').value();
if (currentDate.diff(dayjs.unix(storageDate), 'day') > 1) {
this.getData();
} else {
this.data = this.$db.get('linux_command.data').value();
this.geting = false;
}
} else {
this.getData();
}
},
methods: {
const message = get(props, 'message', {})
const identity = isNil(props.identity) ? {} : props.identity
const messageContent = renderContent(message)
const userName = abbreviateName(identity, 'Unnamed User')
const userAddress = truncateAddress(props.wallet)
const { showTime, showTailAndAvatar } = showItems(props)
const { justifyContent, contentOnly, userType } = getCssClasses(
props.isUser,
showTailAndAvatar
)
return (
<>
{showTime && (
<div>
{dayjs.unix(message.timestamp).format('MMM Do h:mmA')}
</div>
)}
<div>
<div>
{!props.isUser && showTailAndAvatar && (
<div>
</div>
)}
<div>
<div>
{props.isUser ? (
) : (</div></div></div></div>
export function roundTimeAroundHour(time) {
if (!isDayJs(time)) {
throw new Error(`Expected ${time} to be an instance of dayjs`);
}
const coefficient = 60 * INTERVAL_MINUTES.hour;
return dayjs.unix(Math.round(time.unix() / coefficient) * coefficient);
}
Vue.filter('timeUnixFormat', function (value, format) {
return value ? moment.unix(value).format(format || 'YYYY-MM-DD HH:mm:ss') : '';
})
'statement.pages.overview.toolbar.time_range_selector.custom_time_ranges'
)}
dayjs.unix(val).format('HH:mm')}
/>
<span>
{dayjs.unix(sliderTimeRange.begin_time!).format('MM-DD HH:mm')} ~{' '}
{dayjs.unix(sliderTimeRange.end_time!).format('MM-DD HH:mm')}
</span>
)
return (
<button>}>
{curTimeRange.type === 'recent' ? (
<span></span></button>
render() {
const { classes, tx, direction, userSetValue } = this.props;
const amount = userSetValue;
const transaction = tx ? tx : {};
const stellarTime = transaction.created_at && day(transaction.created_at).format(FORMAT);
const ethTime = transaction.requestTimestamp
&& day.unix(transaction.requestTimestamp).format(FORMAT);
const stellarApprovalTime = transaction.fromBlockchain ?
(transaction.timestamp
&& day.unix(transaction.timestamp).format(FORMAT))
: (transaction.stellarTokenMintTimestamp &&
day(transaction.stellarTokenMintTimestamp).format(FORMAT));
const ethApprovalTime = transaction.unlockTimestamp
&& day.unix(transaction.unlockTimestamp).format(FORMAT);
const calProgress = (tran, ...fields) => {
if (tran.fromBlockchain) return 100;
const total = fields.length;
let prog = 0;
fields.forEach((field) => {
if (evaluateToBool(tran, field)) {
prog += 1;
}
const timeFilter = (value) => {
value = value.toString();
if (value) {
if (value.length === 13) {
return dayjs(Number(value)).format("YYYY-MM-DD HH:mm:ss");
}
return dayjs.unix(Number(value)).format("YYYY-MM-DD HH:mm:ss");
} else {
return '-';
}
}
export const unixTsToString = ts => {
let dateString = dayjs.unix(ts).format("MMM D, YYYY");
return dateString;
};
const displayEventDate = timestamp =>
displayDateTime(dayjs.unix(timestamp), {
day: 'numeric',
month: 'short',
year: 'numeric'
})
const sentenceCase = str =>
const date = timestamp => dayjs.unix(timestamp).format('MMM. D, YYYY h:mmA')
const eventName = name => {