-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
117 additions
and
67 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/frontend/node_modules | ||
/contract/squeakr.wasm | ||
/contract/squeakr.abi | ||
.DS_Store |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,24 @@ | ||
<template> | ||
<tr> | ||
<td>{{ request.follower }}</td> | ||
<td> | ||
<button @click="accept">Accept</button> | ||
</td> | ||
</tr> | ||
</template> | ||
|
||
<script> | ||
import Backend from '@/Backend' | ||
export default { | ||
name: 'FollowRequestListItem', | ||
props: ['request'], | ||
methods: { | ||
accept: async function() { | ||
await Backend.accept(this.request.follower) | ||
this.$emit('update') | ||
} | ||
}, | ||
} | ||
</script> |
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,30 @@ | ||
<template> | ||
<tr> | ||
<td>{{ user.follower }}</td> | ||
<td> | ||
<button v-if="shouldDisplayButton" @click="requestAccess">Request Access</button> | ||
</td> | ||
</tr> | ||
</template> | ||
|
||
<script> | ||
import Backend from '@/Backend' | ||
export default { | ||
name: 'FollowRequestListItem', | ||
props: ['user'], | ||
methods: { | ||
requestAccess: async function() { | ||
await Backend.requestAccess(this.user.follower) | ||
this.$emit('update') | ||
} | ||
}, | ||
computed: { | ||
shouldDisplayButton: function() { | ||
console.log("shouldDisplayButton called this.user.access_granted: ", this.user.access_granted) | ||
return this.user.access_granted | ||
} | ||
} | ||
} | ||
</script> |
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 |
---|---|---|
@@ -1,25 +1,31 @@ | ||
<template> | ||
<tr> | ||
<td v-if="user.user">{{ user.user }}</td> | ||
<td v-else-if="user.follower">{{ user.follower }}</td> | ||
<td>{{ user.user }}</td> | ||
<td> | ||
<AcceptButton v-if="is_request" v-bind:user="user" /> | ||
<FollowButton v-else v-bind:user="user" /> | ||
<span v-if="isMyself">That's you!</span> | ||
<span v-else-if="user.already_follows">Already following</span> | ||
<span v-else-if="user.already_requested">Already requested</span> | ||
<button v-else @click="follow">Follow</button> | ||
</td> | ||
</tr> | ||
</template> | ||
|
||
<script> | ||
import Backend from '@/Backend' | ||
import FollowButton from '@/components/FollowButton.vue' | ||
import AcceptButton from '@/components/AcceptButton.vue' | ||
export default { | ||
name: 'UserListItem', | ||
components: { | ||
FollowButton, | ||
AcceptButton, | ||
props: ['user'], | ||
methods: { | ||
follow: async function() { | ||
await Backend.followRequest(this.user.user) | ||
this.$emit('update') | ||
} | ||
}, | ||
props: ['user', 'is_request'], | ||
computed: { | ||
isMyself: function() { | ||
return Backend.account.name == this.user.user | ||
} | ||
} | ||
} | ||
</script> |
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