2018-12-02 23:25:40 +01:00
|
|
|
<div class="compose-box-button-halo {sticky ? 'compose-box-button-halo-sticky' : ''}">
|
2018-03-27 09:02:55 +02:00
|
|
|
<button class="primary compose-box-button"
|
2018-05-02 02:05:36 +02:00
|
|
|
{disabled}
|
|
|
|
aria-label={sticky ? 'Compose' : 'Toot!'}
|
2018-03-27 09:02:55 +02:00
|
|
|
on:click>
|
2018-05-02 02:05:36 +02:00
|
|
|
<span class={$postingStatus || sticky ? 'hidden' : ''}>
|
2018-03-27 09:02:55 +02:00
|
|
|
Toot!
|
|
|
|
</span>
|
2018-03-28 17:45:58 +02:00
|
|
|
<div class="compose-box-button-spinner"
|
2018-03-27 09:02:55 +02:00
|
|
|
aria-hidden="true">
|
2018-05-02 02:05:36 +02:00
|
|
|
<svg class="compose-box-button-svg {$postingStatus ? 'spin' : 'hidden'}">
|
2018-12-10 09:13:54 +01:00
|
|
|
<use xlink:href="#fa-spinner" />
|
2018-03-27 09:02:55 +02:00
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
|
2018-05-02 02:05:36 +02:00
|
|
|
<div class="compose-box-button-compose {sticky ? '' : 'hidden'}"
|
2018-03-27 09:02:55 +02:00
|
|
|
aria-hidden="true">
|
|
|
|
<svg class="compose-box-button-svg">
|
2018-12-10 09:13:54 +01:00
|
|
|
<use xlink:href="#fa-pencil" />
|
2018-03-27 09:02:55 +02:00
|
|
|
</svg>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
</div>
|
2018-02-27 07:22:56 +01:00
|
|
|
<style>
|
2018-03-27 09:02:55 +02:00
|
|
|
.compose-box-button-halo {
|
|
|
|
border-radius: 2px;
|
|
|
|
margin: 5px 15px 15px 5px;
|
2018-03-27 18:38:19 +02:00
|
|
|
pointer-events: auto;
|
2018-03-27 09:02:55 +02:00
|
|
|
}
|
2018-12-02 23:25:40 +01:00
|
|
|
.compose-box-button-halo-sticky {
|
|
|
|
background-color: var(--compose-button-halo);
|
|
|
|
}
|
2018-02-27 07:22:56 +01:00
|
|
|
.compose-box-button {
|
|
|
|
grid-area: button;
|
|
|
|
justify-self: right;
|
|
|
|
text-transform: uppercase;
|
2018-03-05 01:27:15 +01:00
|
|
|
position: relative;
|
2018-03-27 09:02:55 +02:00
|
|
|
margin: 5px;
|
2018-03-27 18:38:19 +02:00
|
|
|
pointer-events: auto;
|
2018-03-05 01:27:15 +01:00
|
|
|
}
|
2018-03-27 09:02:55 +02:00
|
|
|
.compose-box-button-spinner, .compose-box-button-compose {
|
2018-03-05 01:27:15 +01:00
|
|
|
position: absolute;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
z-index: 10;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
}
|
2018-03-27 09:02:55 +02:00
|
|
|
.compose-box-button-svg {
|
2018-03-05 01:27:15 +01:00
|
|
|
width: 24px;
|
|
|
|
height: 24px;
|
|
|
|
fill: var(--button-primary-text);
|
2018-02-27 07:22:56 +01:00
|
|
|
}
|
2018-03-27 09:02:55 +02:00
|
|
|
|
|
|
|
@media (max-width: 767px) {
|
|
|
|
.compose-box-button-halo {
|
|
|
|
margin: 5px;
|
|
|
|
}
|
|
|
|
.compose-box-button {
|
|
|
|
margin: 5px;
|
|
|
|
}
|
|
|
|
}
|
2018-02-27 07:22:56 +01:00
|
|
|
</style>
|
|
|
|
<script>
|
|
|
|
import { store } from '../../_store/store'
|
|
|
|
|
|
|
|
export default {
|
|
|
|
store: () => store,
|
|
|
|
computed: {
|
2018-05-02 02:05:36 +02:00
|
|
|
disabled: ({ $postingStatus, overLimit }) => $postingStatus || overLimit
|
2018-02-27 07:22:56 +01:00
|
|
|
}
|
|
|
|
}
|
2018-12-02 23:25:40 +01:00
|
|
|
</script>
|