2018-02-10 07:55:11 +01:00
|
|
|
<div class="status-toolbar {{isStatusInOwnThread ? 'status-in-own-thread' : ''}}">
|
2018-01-28 21:51:48 +01:00
|
|
|
<IconButton
|
|
|
|
label="Reply"
|
|
|
|
href="#fa-reply"
|
|
|
|
/>
|
|
|
|
<IconButton
|
2018-02-19 19:34:36 +01:00
|
|
|
label="{{boostLabel}}"
|
|
|
|
pressable="{{!boostDisabled}}"
|
2018-01-28 21:51:48 +01:00
|
|
|
pressed="{{status.reblogged}}"
|
2018-02-19 19:34:36 +01:00
|
|
|
disabled="{{boostDisabled}}"
|
|
|
|
href="{{boostIcon}}"
|
2018-01-28 21:51:48 +01:00
|
|
|
/>
|
|
|
|
<IconButton
|
|
|
|
label="Favorite"
|
|
|
|
pressable="true"
|
|
|
|
pressed="{{status.favourited}}"
|
|
|
|
href="#fa-star"
|
|
|
|
/>
|
|
|
|
<IconButton
|
|
|
|
label="Show more actions"
|
|
|
|
href="#fa-ellipsis-h"
|
|
|
|
/>
|
2018-01-21 06:42:46 +01:00
|
|
|
</div>
|
|
|
|
<style>
|
|
|
|
.status-toolbar {
|
2018-02-10 05:07:48 +01:00
|
|
|
grid-area: toolbar;
|
2018-01-21 06:42:46 +01:00
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
2018-02-10 07:55:11 +01:00
|
|
|
.status-toolbar.status-in-own-thread {
|
|
|
|
margin-left: 58px;
|
|
|
|
}
|
2018-01-21 06:42:46 +01:00
|
|
|
</style>
|
|
|
|
<script>
|
2018-01-28 21:51:48 +01:00
|
|
|
|
|
|
|
import IconButton from '../IconButton.html'
|
|
|
|
|
2018-01-21 06:42:46 +01:00
|
|
|
export default {
|
2018-01-28 21:51:48 +01:00
|
|
|
components: {
|
|
|
|
IconButton
|
2018-02-19 19:34:36 +01:00
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
visibility: (status) => status.visibility,
|
|
|
|
boostLabel: (visibility) => {
|
|
|
|
switch (visibility) {
|
|
|
|
case 'private':
|
|
|
|
return 'Cannot be boosted because this is followers-only'
|
|
|
|
case 'direct':
|
|
|
|
return 'Cannot be boosted because this is a direct message'
|
|
|
|
default:
|
|
|
|
return 'Boost'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
boostIcon: (visibility) => {
|
|
|
|
switch (visibility) {
|
|
|
|
case 'private':
|
|
|
|
return '#fa-lock'
|
|
|
|
case 'direct':
|
|
|
|
return '#fa-envelope'
|
|
|
|
default:
|
|
|
|
return '#fa-retweet'
|
|
|
|
}
|
|
|
|
},
|
|
|
|
boostDisabled: (visibility) => {
|
|
|
|
return visibility === 'private' || visibility === 'direct'
|
|
|
|
}
|
2018-01-28 21:51:48 +01:00
|
|
|
}
|
2018-01-21 06:42:46 +01:00
|
|
|
}
|
|
|
|
</script>
|