mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-08-11 13:50:59 +00:00
feat: add posting
This commit is contained in:
@@ -12,7 +12,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="post-options-right">
|
<div class="post-options-right">
|
||||||
<div class="post-draft" @click="saveDraft">存草稿</div>
|
<div class="post-draft" @click="saveDraft">存草稿</div>
|
||||||
<div class="post-submit" @click="submitPost">发布</div>
|
<div v-if="!isWaitingPosting" class="post-submit" @click="submitPost">发布</div>
|
||||||
|
<div v-else class="post-submit-loading"> <i class="fa-solid fa-spinner fa-spin"></i> 发布中...</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -29,6 +30,11 @@ import { getToken } from '../utils/auth'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NewPostPageView',
|
name: 'NewPostPageView',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isWaitingPosting: false
|
||||||
|
}
|
||||||
|
},
|
||||||
components: { PostEditor, CategorySelect, TagSelect },
|
components: { PostEditor, CategorySelect, TagSelect },
|
||||||
setup() {
|
setup() {
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
@@ -128,6 +134,15 @@ export default {
|
|||||||
background-color: var(--primary-color-hover);
|
background-color: var(--primary-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.post-submit-loading {
|
||||||
|
color: white;
|
||||||
|
background-color: var(--primary-color-disabled);
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: fit-content;
|
||||||
|
cursor: not-allowed;
|
||||||
|
}
|
||||||
|
|
||||||
.post-options-left {
|
.post-options-left {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user