2016-10-30 15:53:58 +00:00
|
|
|
<template>
|
2019-09-25 17:23:55 +00:00
|
|
|
<div
|
2019-10-22 20:53:23 +00:00
|
|
|
ref="form"
|
2019-09-25 17:23:55 +00:00
|
|
|
class="post-status-form"
|
2019-09-24 21:17:04 +00:00
|
|
|
>
|
2019-07-05 07:17:44 +00:00
|
|
|
<form
|
|
|
|
autocomplete="off"
|
2020-05-07 13:10:53 +00:00
|
|
|
@submit.prevent
|
2020-06-10 08:49:04 +00:00
|
|
|
@dragover.prevent="fileDrag"
|
2019-07-05 07:17:44 +00:00
|
|
|
>
|
2020-06-10 08:01:38 +00:00
|
|
|
<div
|
2020-06-10 09:41:02 +00:00
|
|
|
v-show="showDropIcon !== 'hide'"
|
|
|
|
:style="{ animation: showDropIcon === 'show' ? 'fade-in 0.25s' : 'fade-out 0.5s' }"
|
2020-05-07 13:10:53 +00:00
|
|
|
class="drop-indicator"
|
2020-06-10 08:49:04 +00:00
|
|
|
@dragleave="fileDragStop"
|
2020-06-10 08:01:38 +00:00
|
|
|
@drop.stop="fileDrop"
|
2020-10-19 16:38:49 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon :icon="uploadFileLimitReached ? 'ban' : 'upload'" />
|
2020-10-19 16:38:49 +00:00
|
|
|
</div>
|
2019-07-05 07:17:44 +00:00
|
|
|
<div class="form-group">
|
|
|
|
<i18n
|
2020-05-07 13:10:53 +00:00
|
|
|
v-if="!$store.state.users.currentUser.locked && newStatus.visibility == 'private' && !disableLockWarning"
|
2019-07-05 07:17:44 +00:00
|
|
|
path="post_status.account_not_locked_warning"
|
|
|
|
tag="p"
|
|
|
|
class="visibility-notice"
|
2019-04-08 16:02:50 +00:00
|
|
|
>
|
2020-11-24 10:32:42 +00:00
|
|
|
<button
|
|
|
|
class="button-unstyled -link"
|
2020-09-03 12:45:13 +00:00
|
|
|
@click="openProfileTab"
|
|
|
|
>
|
2019-07-05 07:17:44 +00:00
|
|
|
{{ $t('post_status.account_not_locked_warning_link') }}
|
2020-11-24 10:32:42 +00:00
|
|
|
</button>
|
2019-07-05 07:17:44 +00:00
|
|
|
</i18n>
|
|
|
|
<p
|
|
|
|
v-if="!hideScopeNotice && newStatus.visibility === 'public'"
|
|
|
|
class="visibility-notice notice-dismissible"
|
2019-06-08 13:23:58 +00:00
|
|
|
>
|
2019-07-05 07:17:44 +00:00
|
|
|
<span>{{ $t('post_status.scope_notice.public') }}</span>
|
|
|
|
<a
|
2020-10-28 19:31:16 +00:00
|
|
|
class="fa-scale-110 fa-old-padding dismiss"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="dismissScopeNotice()"
|
|
|
|
>
|
2020-10-20 18:18:23 +00:00
|
|
|
<FAIcon icon="times" />
|
2019-07-05 07:17:44 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<p
|
|
|
|
v-else-if="!hideScopeNotice && newStatus.visibility === 'unlisted'"
|
|
|
|
class="visibility-notice notice-dismissible"
|
2019-06-06 21:17:49 +00:00
|
|
|
>
|
2019-07-05 07:17:44 +00:00
|
|
|
<span>{{ $t('post_status.scope_notice.unlisted') }}</span>
|
|
|
|
<a
|
2020-10-28 19:31:16 +00:00
|
|
|
class="fa-scale-110 fa-old-padding dismiss"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="dismissScopeNotice()"
|
|
|
|
>
|
2020-10-20 18:18:23 +00:00
|
|
|
<FAIcon icon="times" />
|
2019-07-05 07:17:44 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<p
|
|
|
|
v-else-if="!hideScopeNotice && newStatus.visibility === 'private' && $store.state.users.currentUser.locked"
|
|
|
|
class="visibility-notice notice-dismissible"
|
|
|
|
>
|
|
|
|
<span>{{ $t('post_status.scope_notice.private') }}</span>
|
|
|
|
<a
|
2020-10-28 19:31:16 +00:00
|
|
|
class="fa-scale-110 fa-old-padding dismiss"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click.prevent="dismissScopeNotice()"
|
|
|
|
>
|
2020-10-20 18:18:23 +00:00
|
|
|
<FAIcon icon="times" />
|
2019-07-05 07:17:44 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
2019-06-22 13:41:02 +00:00
|
|
|
<p
|
2019-07-05 07:17:44 +00:00
|
|
|
v-else-if="newStatus.visibility === 'direct'"
|
|
|
|
class="visibility-notice"
|
2019-06-22 13:41:02 +00:00
|
|
|
>
|
2019-07-05 07:17:44 +00:00
|
|
|
<span v-if="safeDMEnabled">{{ $t('post_status.direct_warning_to_first_only') }}</span>
|
|
|
|
<span v-else>{{ $t('post_status.direct_warning_to_all') }}</span>
|
2019-06-22 13:41:02 +00:00
|
|
|
</p>
|
2020-07-06 13:55:29 +00:00
|
|
|
<div
|
|
|
|
v-if="!disablePreview"
|
|
|
|
class="preview-heading faint"
|
|
|
|
>
|
2020-07-06 08:36:35 +00:00
|
|
|
<a
|
|
|
|
class="preview-toggle faint"
|
|
|
|
@click.stop.prevent="togglePreview"
|
|
|
|
>
|
|
|
|
{{ $t('post_status.preview') }}
|
2020-10-28 19:31:16 +00:00
|
|
|
<FAIcon :icon="showPreview ? 'chevron-left' : 'chevron-right'" />
|
2020-07-06 08:36:35 +00:00
|
|
|
</a>
|
2020-10-29 19:39:11 +00:00
|
|
|
<div
|
2020-07-06 08:36:35 +00:00
|
|
|
v-show="previewLoading"
|
2020-11-01 14:44:57 +00:00
|
|
|
class="preview-spinner"
|
|
|
|
>
|
2020-10-29 19:39:11 +00:00
|
|
|
<FAIcon
|
|
|
|
class="fa-old-padding"
|
|
|
|
spin
|
|
|
|
icon="circle-notch"
|
|
|
|
/>
|
|
|
|
</div>
|
2020-07-06 08:36:35 +00:00
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-if="showPreview"
|
|
|
|
class="preview-container"
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
v-if="!preview"
|
|
|
|
class="preview-status"
|
|
|
|
>
|
|
|
|
{{ $t('general.loading') }}
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
v-else-if="preview.error"
|
|
|
|
class="preview-status preview-error"
|
|
|
|
>
|
|
|
|
{{ preview.error }}
|
|
|
|
</div>
|
|
|
|
<StatusContent
|
|
|
|
v-else
|
|
|
|
:status="preview"
|
|
|
|
class="preview-status"
|
|
|
|
/>
|
|
|
|
</div>
|
2019-07-06 20:52:10 +00:00
|
|
|
<EmojiInput
|
2020-05-07 13:10:53 +00:00
|
|
|
v-if="!disableSubject && (newStatus.spoilerText || alwaysShowSubject)"
|
2019-07-06 20:52:10 +00:00
|
|
|
v-model="newStatus.spoilerText"
|
2019-09-12 17:36:43 +00:00
|
|
|
enable-emoji-picker
|
2019-07-06 20:52:10 +00:00
|
|
|
:suggest="emojiSuggestor"
|
|
|
|
class="form-control"
|
|
|
|
>
|
|
|
|
<input
|
|
|
|
v-model="newStatus.spoilerText"
|
|
|
|
type="text"
|
|
|
|
:placeholder="$t('post_status.content_warning')"
|
2020-10-29 10:33:06 +00:00
|
|
|
:disabled="posting && !optimisticPosting"
|
2020-10-20 23:07:05 +00:00
|
|
|
size="1"
|
2019-07-06 20:52:10 +00:00
|
|
|
class="form-post-subject"
|
|
|
|
>
|
|
|
|
</EmojiInput>
|
|
|
|
<EmojiInput
|
2019-08-12 17:01:38 +00:00
|
|
|
ref="emoji-input"
|
2019-07-06 20:52:10 +00:00
|
|
|
v-model="newStatus.status"
|
|
|
|
:suggest="emojiUserSuggestor"
|
2020-05-07 13:10:53 +00:00
|
|
|
:placement="emojiPickerPlacement"
|
2019-07-06 20:52:10 +00:00
|
|
|
class="form-control main-input"
|
2019-09-12 17:36:43 +00:00
|
|
|
enable-emoji-picker
|
|
|
|
hide-emoji-button
|
2020-06-21 14:13:29 +00:00
|
|
|
:newline-on-ctrl-enter="submitOnEnter"
|
2019-09-12 17:36:43 +00:00
|
|
|
enable-sticker-picker
|
2019-09-23 19:12:25 +00:00
|
|
|
@input="onEmojiInputInput"
|
2019-08-12 17:01:38 +00:00
|
|
|
@sticker-uploaded="addMediaFile"
|
|
|
|
@sticker-upload-failed="uploadFailed"
|
2020-05-07 13:10:53 +00:00
|
|
|
@shown="handleEmojiInputShow"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
|
|
|
<textarea
|
|
|
|
ref="textarea"
|
|
|
|
v-model="newStatus.status"
|
2020-05-07 13:10:53 +00:00
|
|
|
:placeholder="placeholder || $t('post_status.default')"
|
2019-07-06 20:52:10 +00:00
|
|
|
rows="1"
|
2020-08-18 21:22:08 +00:00
|
|
|
cols="1"
|
2020-10-29 10:33:06 +00:00
|
|
|
:disabled="posting && !optimisticPosting"
|
2019-07-06 20:52:10 +00:00
|
|
|
class="form-post-body"
|
2020-05-07 13:10:53 +00:00
|
|
|
:class="{ 'scrollable-form': !!maxHeight }"
|
|
|
|
@keydown.exact.enter="submitOnEnter && postStatus($event, newStatus)"
|
2020-06-21 14:13:29 +00:00
|
|
|
@keydown.meta.enter="postStatus($event, newStatus)"
|
|
|
|
@keydown.ctrl.enter="!submitOnEnter && postStatus($event, newStatus)"
|
2019-09-23 21:06:53 +00:00
|
|
|
@input="resize"
|
2019-09-23 19:12:25 +00:00
|
|
|
@compositionupdate="resize"
|
2019-07-06 20:52:10 +00:00
|
|
|
@paste="paste"
|
|
|
|
/>
|
|
|
|
<p
|
|
|
|
v-if="hasStatusLengthLimit"
|
|
|
|
class="character-counter faint"
|
|
|
|
:class="{ error: isOverLengthLimit }"
|
|
|
|
>
|
|
|
|
{{ charactersLeft }}
|
|
|
|
</p>
|
|
|
|
</EmojiInput>
|
2020-05-07 13:10:53 +00:00
|
|
|
<div
|
|
|
|
v-if="!disableScopeSelector"
|
|
|
|
class="visibility-tray"
|
|
|
|
>
|
2019-07-06 20:52:10 +00:00
|
|
|
<scope-selector
|
|
|
|
:show-all="showAllScopes"
|
|
|
|
:user-default="userDefaultScope"
|
|
|
|
:original-scope="copyMessageScope"
|
|
|
|
:initial-scope="newStatus.visibility"
|
|
|
|
:on-scope-change="changeVis"
|
|
|
|
/>
|
|
|
|
|
|
|
|
<div
|
|
|
|
v-if="postFormats.length > 1"
|
|
|
|
class="text-format"
|
|
|
|
>
|
2021-03-11 14:11:44 +00:00
|
|
|
<Select
|
|
|
|
id="post-content-type"
|
|
|
|
v-model="newStatus.contentType"
|
|
|
|
class="form-control"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
2021-03-11 14:11:44 +00:00
|
|
|
<option
|
|
|
|
v-for="postFormat in postFormats"
|
|
|
|
:key="postFormat"
|
|
|
|
:value="postFormat"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
2021-03-11 14:11:44 +00:00
|
|
|
{{ $t(`post_status.content_type["${postFormat}"]`) }}
|
|
|
|
</option>
|
|
|
|
</Select>
|
2019-07-06 20:52:10 +00:00
|
|
|
</div>
|
2019-03-26 18:53:27 +00:00
|
|
|
<div
|
2019-07-06 20:52:10 +00:00
|
|
|
v-if="postFormats.length === 1 && postFormats[0] !== 'text/plain'"
|
|
|
|
class="text-format"
|
2019-03-26 18:53:27 +00:00
|
|
|
>
|
2019-07-06 20:52:10 +00:00
|
|
|
<span class="only-format">
|
|
|
|
{{ $t(`post_status.content_type["${postFormats[0]}"]`) }}
|
|
|
|
</span>
|
2017-06-15 22:13:54 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2017-03-15 16:06:48 +00:00
|
|
|
</div>
|
2019-07-06 20:52:10 +00:00
|
|
|
<poll-form
|
|
|
|
v-if="pollsAvailable"
|
|
|
|
ref="pollForm"
|
|
|
|
:visible="pollFormVisible"
|
|
|
|
@update-poll="setPoll"
|
|
|
|
/>
|
2019-10-22 20:53:23 +00:00
|
|
|
<div
|
|
|
|
ref="bottom"
|
|
|
|
class="form-bottom"
|
2019-11-08 19:35:58 +00:00
|
|
|
>
|
2019-07-06 20:52:10 +00:00
|
|
|
<div class="form-bottom-left">
|
|
|
|
<media-upload
|
|
|
|
ref="mediaUpload"
|
2019-09-15 09:28:52 +00:00
|
|
|
class="media-upload-icon"
|
2019-07-06 20:52:10 +00:00
|
|
|
:drop-files="dropFiles"
|
2020-05-07 13:10:53 +00:00
|
|
|
:disabled="uploadFileLimitReached"
|
|
|
|
@uploading="startedUploadingFiles"
|
2019-07-06 20:52:10 +00:00
|
|
|
@uploaded="addMediaFile"
|
|
|
|
@upload-failed="uploadFailed"
|
2020-05-07 13:10:53 +00:00
|
|
|
@all-uploaded="finishedUploadingFiles"
|
2019-07-06 20:52:10 +00:00
|
|
|
/>
|
2020-11-24 10:32:42 +00:00
|
|
|
<button
|
|
|
|
class="emoji-icon button-unstyled"
|
|
|
|
:title="$t('emoji.add_emoji')"
|
|
|
|
@click="showEmojiPicker"
|
2019-07-24 19:35:52 +00:00
|
|
|
>
|
2020-11-24 10:32:42 +00:00
|
|
|
<FAIcon icon="smile-beam" />
|
|
|
|
</button>
|
|
|
|
<button
|
2019-07-06 20:52:10 +00:00
|
|
|
v-if="pollsAvailable"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="poll-icon button-unstyled"
|
2019-09-15 09:28:52 +00:00
|
|
|
:class="{ selected: pollFormVisible }"
|
2020-10-19 16:38:49 +00:00
|
|
|
:title="$t('polls.add_poll')"
|
|
|
|
@click="togglePollForm"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
2020-10-19 16:38:49 +00:00
|
|
|
<FAIcon icon="poll-h" />
|
2020-11-24 10:32:42 +00:00
|
|
|
</button>
|
2019-06-16 17:16:52 +00:00
|
|
|
</div>
|
2019-07-06 20:52:10 +00:00
|
|
|
<button
|
|
|
|
v-if="posting"
|
|
|
|
disabled
|
2020-11-24 10:32:42 +00:00
|
|
|
class="btn button-default"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
|
|
|
{{ $t('post_status.posting') }}
|
|
|
|
</button>
|
|
|
|
<button
|
|
|
|
v-else-if="isOverLengthLimit"
|
|
|
|
disabled
|
2020-11-24 10:32:42 +00:00
|
|
|
class="btn button-default"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
2021-03-15 10:28:33 +00:00
|
|
|
{{ $t('post_status.post') }}
|
2019-07-06 20:52:10 +00:00
|
|
|
</button>
|
2020-05-07 13:10:53 +00:00
|
|
|
<!-- touchstart is used to keep the OSK at the same position after a message send -->
|
2019-07-06 20:52:10 +00:00
|
|
|
<button
|
|
|
|
v-else
|
2020-05-07 13:10:53 +00:00
|
|
|
:disabled="uploadingFiles || disableSubmit"
|
2020-11-24 10:32:42 +00:00
|
|
|
class="btn button-default"
|
2020-05-07 13:10:53 +00:00
|
|
|
@touchstart.stop.prevent="postStatus($event, newStatus)"
|
|
|
|
@click.stop.prevent="postStatus($event, newStatus)"
|
2019-07-06 20:52:10 +00:00
|
|
|
>
|
2021-03-15 10:28:33 +00:00
|
|
|
{{ $t('post_status.post') }}
|
2019-07-06 20:52:10 +00:00
|
|
|
</button>
|
2016-10-30 15:53:58 +00:00
|
|
|
</div>
|
2019-07-06 20:52:10 +00:00
|
|
|
<div
|
|
|
|
v-if="error"
|
|
|
|
class="alert error"
|
|
|
|
>
|
2017-08-20 10:16:41 +00:00
|
|
|
Error: {{ error }}
|
2020-10-20 21:01:28 +00:00
|
|
|
<FAIcon
|
2020-10-28 19:31:16 +00:00
|
|
|
class="fa-scale-110 fa-old-padding"
|
2020-10-20 21:01:28 +00:00
|
|
|
icon="times"
|
2019-07-06 20:52:10 +00:00
|
|
|
@click="clearError"
|
|
|
|
/>
|
2017-08-20 10:16:41 +00:00
|
|
|
</div>
|
2016-10-30 15:53:58 +00:00
|
|
|
<div class="attachments">
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
|
|
|
v-for="file in newStatus.files"
|
2019-07-06 21:54:17 +00:00
|
|
|
:key="file.url"
|
2019-07-05 07:17:44 +00:00
|
|
|
class="media-upload-wrapper"
|
|
|
|
>
|
2021-01-20 15:01:57 +00:00
|
|
|
<button
|
|
|
|
class="button-unstyled hider"
|
2019-07-05 07:17:44 +00:00
|
|
|
@click="removeMediaFile(file)"
|
2021-01-20 15:01:57 +00:00
|
|
|
>
|
|
|
|
<FAIcon icon="times" />
|
|
|
|
</button>
|
2020-06-29 11:48:22 +00:00
|
|
|
<attachment
|
|
|
|
:attachment="file"
|
|
|
|
:set-media="() => $store.dispatch('setMedia', newStatus.files)"
|
|
|
|
size="small"
|
|
|
|
allow-play="false"
|
|
|
|
/>
|
2020-06-28 06:31:57 +00:00
|
|
|
<input
|
|
|
|
v-model="newStatus.mediaDescriptions[file.id]"
|
|
|
|
type="text"
|
|
|
|
:placeholder="$t('post_status.media_description')"
|
2020-06-28 20:05:22 +00:00
|
|
|
@keydown.enter.prevent=""
|
2020-06-28 06:31:57 +00:00
|
|
|
>
|
2016-10-30 15:53:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-07-05 07:17:44 +00:00
|
|
|
<div
|
2020-05-07 13:10:53 +00:00
|
|
|
v-if="newStatus.files.length > 0 && !disableSensitivityCheckbox"
|
2019-07-05 07:17:44 +00:00
|
|
|
class="upload_settings"
|
|
|
|
>
|
2019-10-07 17:43:23 +00:00
|
|
|
<Checkbox v-model="newStatus.nsfw">
|
|
|
|
{{ $t('post_status.attachments_sensitive') }}
|
|
|
|
</Checkbox>
|
2018-08-25 21:18:43 +00:00
|
|
|
</div>
|
2016-10-30 15:53:58 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./post_status_form.js"></script>
|
2016-11-12 20:05:01 +00:00
|
|
|
|
|
|
|
<style lang="scss">
|
2018-04-01 02:28:20 +00:00
|
|
|
@import '../../_variables.scss';
|
2017-11-21 08:30:30 +00:00
|
|
|
|
2018-03-31 18:14:36 +00:00
|
|
|
.tribute-container {
|
2018-04-07 16:30:27 +00:00
|
|
|
ul {
|
|
|
|
padding: 0px;
|
|
|
|
li {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
img {
|
|
|
|
padding: 3px;
|
|
|
|
width: 16px;
|
|
|
|
height: 16px;
|
|
|
|
border-radius: $fallback--avatarAltRadius;
|
|
|
|
border-radius: var(--avatarAltRadius, $fallback--avatarAltRadius);
|
|
|
|
}
|
2018-03-31 18:14:36 +00:00
|
|
|
}
|
|
|
|
|
2019-05-13 18:54:25 +00:00
|
|
|
.post-status-form {
|
2020-05-07 13:10:53 +00:00
|
|
|
position: relative;
|
|
|
|
|
2018-04-07 16:30:27 +00:00
|
|
|
.form-bottom {
|
|
|
|
display: flex;
|
2019-09-15 09:51:39 +00:00
|
|
|
justify-content: space-between;
|
2018-04-07 16:30:27 +00:00
|
|
|
padding: 0.5em;
|
|
|
|
height: 32px;
|
|
|
|
|
2018-08-20 18:06:29 +00:00
|
|
|
button {
|
|
|
|
width: 10em;
|
|
|
|
}
|
|
|
|
|
2018-04-07 16:30:27 +00:00
|
|
|
p {
|
|
|
|
margin: 0.35em;
|
|
|
|
padding: 0.35em;
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-06-18 20:28:31 +00:00
|
|
|
.form-bottom-left {
|
|
|
|
display: flex;
|
|
|
|
flex: 1;
|
2019-09-15 09:28:52 +00:00
|
|
|
padding-right: 7px;
|
|
|
|
margin-right: 7px;
|
2019-09-15 09:51:39 +00:00
|
|
|
max-width: 10em;
|
2019-06-18 20:28:31 +00:00
|
|
|
}
|
|
|
|
|
2020-06-28 13:40:39 +00:00
|
|
|
.preview-heading {
|
|
|
|
display: flex;
|
2020-10-29 19:39:11 +00:00
|
|
|
padding-left: 0.5em;
|
2020-06-28 09:16:41 +00:00
|
|
|
}
|
|
|
|
|
2020-06-28 13:40:39 +00:00
|
|
|
.preview-toggle {
|
2020-10-29 19:39:11 +00:00
|
|
|
flex: 1;
|
2020-06-28 13:40:39 +00:00
|
|
|
cursor: pointer;
|
2020-07-15 09:26:14 +00:00
|
|
|
user-select: none;
|
2020-06-28 13:40:39 +00:00
|
|
|
|
|
|
|
&:hover {
|
|
|
|
text-decoration: underline;
|
|
|
|
}
|
2020-10-19 16:38:49 +00:00
|
|
|
svg, i {
|
2020-07-15 09:26:14 +00:00
|
|
|
margin-left: 0.2em;
|
2020-07-22 06:43:22 +00:00
|
|
|
font-size: 0.8em;
|
|
|
|
transform: rotate(90deg);
|
2020-07-14 11:43:26 +00:00
|
|
|
}
|
2020-06-28 09:16:41 +00:00
|
|
|
}
|
|
|
|
|
2020-06-28 13:40:39 +00:00
|
|
|
.preview-container {
|
|
|
|
margin-bottom: 1em;
|
2020-06-28 09:16:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.preview-error {
|
2020-06-28 09:35:05 +00:00
|
|
|
font-style: italic;
|
2020-06-28 09:16:41 +00:00
|
|
|
color: $fallback--faint;
|
|
|
|
color: var(--faint, $fallback--faint);
|
|
|
|
}
|
|
|
|
|
|
|
|
.preview-status {
|
|
|
|
border: 1px solid $fallback--border;
|
|
|
|
border: 1px solid var(--border, $fallback--border);
|
|
|
|
border-radius: $fallback--tooltipRadius;
|
|
|
|
border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
|
|
|
|
padding: 0.5em;
|
2020-06-28 12:43:08 +00:00
|
|
|
margin: 0;
|
|
|
|
line-height: 1.4em;
|
2020-06-28 09:16:41 +00:00
|
|
|
}
|
|
|
|
|
2019-06-16 17:16:52 +00:00
|
|
|
.text-format {
|
|
|
|
.only-format {
|
|
|
|
color: $fallback--faint;
|
|
|
|
color: var(--faint, $fallback--faint);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-06-28 09:16:41 +00:00
|
|
|
.visibility-tray {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
padding-top: 5px;
|
|
|
|
}
|
|
|
|
|
2019-09-15 09:28:52 +00:00
|
|
|
.media-upload-icon, .poll-icon, .emoji-icon {
|
2019-06-18 20:28:31 +00:00
|
|
|
font-size: 26px;
|
2020-10-19 16:38:49 +00:00
|
|
|
line-height: 1.1;
|
2019-06-18 20:28:31 +00:00
|
|
|
flex: 1;
|
2020-10-19 16:38:49 +00:00
|
|
|
padding: 0 0.1em;
|
2019-06-18 20:28:31 +00:00
|
|
|
|
2019-09-15 09:28:52 +00:00
|
|
|
&.selected, &:hover {
|
|
|
|
// needs to be specific to override icon default color
|
2020-10-19 16:38:49 +00:00
|
|
|
svg, i, label {
|
2019-09-15 09:28:52 +00:00
|
|
|
color: $fallback--lightText;
|
|
|
|
color: var(--lightText, $fallback--lightText);
|
|
|
|
}
|
|
|
|
}
|
2020-06-21 14:13:29 +00:00
|
|
|
|
|
|
|
&.disabled {
|
2020-10-19 16:38:49 +00:00
|
|
|
svg, i {
|
2020-06-21 14:13:29 +00:00
|
|
|
cursor: not-allowed;
|
|
|
|
color: $fallback--icon;
|
|
|
|
color: var(--btnDisabledText, $fallback--icon);
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $fallback--icon;
|
|
|
|
color: var(--btnDisabledText, $fallback--icon);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2019-09-15 09:28:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Order is not necessary but a good indicator
|
|
|
|
.media-upload-icon {
|
|
|
|
order: 1;
|
|
|
|
text-align: left;
|
2019-06-18 20:28:31 +00:00
|
|
|
}
|
|
|
|
|
2019-08-12 17:01:38 +00:00
|
|
|
.emoji-icon {
|
2019-09-15 09:28:52 +00:00
|
|
|
order: 2;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.poll-icon {
|
|
|
|
order: 3;
|
|
|
|
text-align: right;
|
2019-07-24 19:35:52 +00:00
|
|
|
}
|
|
|
|
|
2020-10-20 21:01:28 +00:00
|
|
|
.poll-icon {
|
2019-06-18 20:28:31 +00:00
|
|
|
cursor: pointer;
|
|
|
|
}
|
2019-06-16 17:16:52 +00:00
|
|
|
|
2018-04-07 16:30:27 +00:00
|
|
|
.error {
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
|
2018-08-15 11:53:40 +00:00
|
|
|
.media-upload-wrapper {
|
|
|
|
margin-right: .2em;
|
|
|
|
margin-bottom: .5em;
|
2020-07-02 11:28:35 +00:00
|
|
|
width: 18em;
|
2018-08-15 11:53:40 +00:00
|
|
|
|
2020-06-29 11:48:22 +00:00
|
|
|
img, video {
|
|
|
|
object-fit: contain;
|
2020-07-02 11:28:35 +00:00
|
|
|
max-height: 10em;
|
2020-06-29 11:48:22 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.video {
|
2020-07-02 11:28:35 +00:00
|
|
|
max-height: 10em;
|
2020-06-29 11:48:22 +00:00
|
|
|
}
|
|
|
|
|
2019-02-18 05:03:26 +00:00
|
|
|
input {
|
|
|
|
flex: 1;
|
2020-06-29 11:48:22 +00:00
|
|
|
width: 100%;
|
2019-02-18 05:03:26 +00:00
|
|
|
}
|
2018-08-15 11:53:40 +00:00
|
|
|
}
|
|
|
|
|
2019-04-08 16:02:50 +00:00
|
|
|
.status-input-wrapper {
|
|
|
|
display: flex;
|
|
|
|
position: relative;
|
|
|
|
width: 100%;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
|
2020-10-20 21:02:58 +00:00
|
|
|
.attachments .media-upload-wrapper {
|
2021-01-20 15:01:57 +00:00
|
|
|
position: relative;
|
2018-04-07 16:30:27 +00:00
|
|
|
|
|
|
|
.attachment {
|
2018-08-15 11:53:40 +00:00
|
|
|
margin: 0;
|
2020-06-29 11:48:22 +00:00
|
|
|
padding: 0;
|
2018-04-07 16:30:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn[disabled] {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
|
|
|
form {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-06-10 08:01:38 +00:00
|
|
|
margin: 0.6em;
|
|
|
|
position: relative;
|
2018-04-07 16:30:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.form-group {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2019-05-15 19:53:33 +00:00
|
|
|
padding: 0.25em 0.5em 0.5em;
|
2018-04-07 16:30:27 +00:00
|
|
|
line-height:24px;
|
|
|
|
}
|
|
|
|
|
2018-06-07 09:03:50 +00:00
|
|
|
form textarea.form-cw {
|
|
|
|
line-height:16px;
|
|
|
|
resize: none;
|
|
|
|
overflow: hidden;
|
|
|
|
transition: min-height 200ms 100ms;
|
|
|
|
min-height: 1px;
|
|
|
|
}
|
|
|
|
|
2019-06-08 13:23:58 +00:00
|
|
|
.form-post-body {
|
2019-06-22 13:41:02 +00:00
|
|
|
height: 16px; // Only affects the empty-height
|
|
|
|
line-height: 16px;
|
2018-04-07 16:30:27 +00:00
|
|
|
resize: none;
|
|
|
|
overflow: hidden;
|
|
|
|
transition: min-height 200ms 100ms;
|
2019-06-22 13:41:02 +00:00
|
|
|
padding-bottom: 1.75em;
|
2018-04-07 16:30:27 +00:00
|
|
|
min-height: 1px;
|
|
|
|
box-sizing: content-box;
|
2020-05-07 13:10:53 +00:00
|
|
|
|
|
|
|
&.scrollable-form {
|
|
|
|
overflow-y: auto;
|
|
|
|
}
|
2018-04-07 16:30:27 +00:00
|
|
|
}
|
|
|
|
|
2019-06-22 13:41:02 +00:00
|
|
|
.main-input {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.character-counter {
|
|
|
|
position: absolute;
|
|
|
|
bottom: 0;
|
|
|
|
right: 0;
|
|
|
|
padding: 0;
|
|
|
|
margin: 0 0.5em;
|
|
|
|
|
|
|
|
&.error {
|
|
|
|
color: $fallback--cRed;
|
|
|
|
color: var(--cRed, $fallback--cRed);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-07 16:30:27 +00:00
|
|
|
.btn {
|
|
|
|
cursor: pointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn[disabled] {
|
|
|
|
cursor: not-allowed;
|
|
|
|
}
|
|
|
|
|
2020-06-10 09:41:02 +00:00
|
|
|
@keyframes fade-in {
|
|
|
|
from { opacity: 0; }
|
|
|
|
to { opacity: 0.6; }
|
|
|
|
}
|
|
|
|
|
|
|
|
@keyframes fade-out {
|
|
|
|
from { opacity: 0.6; }
|
|
|
|
to { opacity: 0; }
|
|
|
|
}
|
|
|
|
|
2020-06-10 08:01:38 +00:00
|
|
|
.drop-indicator {
|
|
|
|
position: absolute;
|
|
|
|
z-index: 1;
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
font-size: 5em;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
2020-06-10 09:41:02 +00:00
|
|
|
opacity: 0.6;
|
2020-06-10 08:01:38 +00:00
|
|
|
color: $fallback--text;
|
|
|
|
color: var(--text, $fallback--text);
|
|
|
|
background-color: $fallback--bg;
|
|
|
|
background-color: var(--bg, $fallback--bg);
|
|
|
|
border-radius: $fallback--tooltipRadius;
|
|
|
|
border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
|
|
|
|
border: 2px dashed $fallback--text;
|
|
|
|
border: 2px dashed var(--text, $fallback--text);
|
|
|
|
}
|
2018-03-31 18:14:36 +00:00
|
|
|
}
|
2020-05-07 13:10:53 +00:00
|
|
|
|
|
|
|
// todo: unify with attachment.vue (otherwise the uploaded images are not minified unless a status with an attachment was displayed before)
|
2020-06-21 14:13:29 +00:00
|
|
|
img.media-upload, .media-upload-container > video {
|
2020-05-07 13:10:53 +00:00
|
|
|
line-height: 0;
|
|
|
|
max-height: 200px;
|
|
|
|
max-width: 100%;
|
|
|
|
}
|
2016-11-12 20:05:01 +00:00
|
|
|
</style>
|