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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.10; | |
// This import is automatically injected by Remix | |
import "remix_tests.sol"; | |
// This import is required to use custom transaction context | |
// Although it may fail compilation in 'Solidity Compiler' plugin | |
// But it will work fine in 'Solidity Unit Testing' plugin | |
import "remix_accounts.sol"; |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity ^0.8.10; | |
// This import is automatically injected by Remix | |
import "remix_tests.sol"; | |
// This import is required to use custom transaction context | |
// Although it may fail compilation in 'Solidity Compiler' plugin | |
// But it will work fine in 'Solidity Unit Testing' plugin | |
import "remix_accounts.sol"; |
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
<template> | |
<div id="app" class="flex container h-screen w-full"> | |
<div class="flex container h-screen w-full"> | |
<SideNav /> | |
<div class="w-full md:w-2/3 lg:w-1/2 h-full overflow-y-scroll" v-scroll:bottom="loadMore"> | |
<div class="px-5 py-3 border-b border-lighter flex items-center"> | |
<button @click="gotoHome()" class="rounded-full md:pr-2 focus:outline-none hover:bg-lightblue"> | |
<i class="fas fa-arrow-left text-blue"></i> | |
</button> |
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
<template> | |
<div v-if="profile.id !== user.id" @click="user.followedBy && selected(user)" class="w-full px-4 py-2 border-b hover:bg-lightest flex flex-row cursor-pointer" :class="!user.followedBy?'cursor-not-allowed opacity-60':''"> | |
<div class="flex-none"> | |
<img :src="`${user.imageUrl || 'default_profile.png'}`" class="h-12 w-12 rounded-full"/> | |
</div> | |
<div class="ml-2 flex flex-col w-full"> | |
<div class="flex flex-row justify-between w-full"> | |
<div class="flex flex-col"> | |
<p class="font-bold">{{ user.name }}</p> | |
<p class="text-dark text-sm">@{{ user.screenName }} {{!user.followedBy?"cant'be messaged":''}}</p> |
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
<template> | |
<div> | |
<div v-for="result in results" :key="result.id"> | |
<UserNewMessage | |
v-if="result.screenName" | |
:user="result" | |
@selected="selected" | |
/> | |
</div> | |
</div> |
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
<template> | |
<div class="fixed w-full h-full top-0 left-0 flex items-center justify-center"> | |
<div class="absolute w-full h-full bg-gray-900 opacity-50" @click.prevent="$emit('update:showNewMessageModal', false);"></div> | |
<div class="modal-main bg-white mx-auto rounded-lg z-50 overflow-y-auto w-full sm:w-3/5 md:w-2/5 max-h-full"> | |
<div class="pl-1 pr-4 py-1 h-16 border-b-2 border-lightblue"> | |
<div class="flex flex-row mt-1 ml-4"> | |
<i @click="$emit('update:showNewMessageModal', false);" class="fas fa-times text-blue text-2xl w-10 h-10 mr-1 xl:mr-6 mt-1 pt-1 pl-3 rounded-full bg-white hover:bg-lightblue"></i> | |
<p class="text-xl pt-1 font-bold mt-1">New message</p> | |
</div> |
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
import moment from 'moment'; | |
moment.updateLocale('en', { | |
monthsShort: [ | |
"Jan", "Feb", "Mar", "Apr", "May", "Jun", | |
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec" | |
], | |
}); | |
export default function time(_date) { |
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
import Moment from 'moment'; | |
export default { | |
profile: state => state.profile, | |
tweets: state => state.tweets.tweets, | |
nextTokenTweets: state => state.tweets.nextToken, | |
joinedDate: state => Moment(state.profile.createdAt).format('MMMM YYYY'), | |
isSelf: state => screenName => state.profile.screenName == screenName, | |
followers: state => state.followers.followers, | |
nextTokenFollowers: state => state.followers.nextToken, |
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
export default { | |
PROFILE_SET(state, profile) { | |
state.profile = profile; | |
}, | |
TWITTER_TIMELINE(state, { tweets, nextToken }) { | |
state.tweets.tweets = tweets; | |
state.tweets.nextToken = nextToken; | |
}, | |
TWITTER_CREATE(state, newTweet) { |