enhance(client): 投稿フォームをちょっといい感じに (#10442)

* .formラッパーを削除

* fix type of MkPostFormAttaches

* 🚀

* 🎨

* 🎨

* 🎨

* 🎨

* specifiedの時は連合なしをdisabledに

* ✌️

* set select default

* gap: 2px (max-width: 500px) / 4px

* wip

* ✌️

* 🎨

* fix maxTextLength

* 今後表示しない

* 🎨

* cache channel

* 🎨

* 連合なしにする

* use i18n.ts.neverShow

* ✌️

* refactor

* fix indent

* tweak

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
tamaina
2023-04-05 14:30:03 +09:00
committed by GitHub
parent d739aeee32
commit 6798effbab
16 changed files with 338 additions and 211 deletions

View File

@@ -14,13 +14,13 @@
</template>
<script lang="ts" setup>
import { } from 'vue';
import XColumn from './column.vue';
import { updateColumn, Column } from './deck-store';
import MkTimeline from '@/components/MkTimeline.vue';
import MkButton from '@/components/MkButton.vue';
import * as os from '@/os';
import { i18n } from '@/i18n';
import * as misskey from 'misskey-js';
const props = defineProps<{
column: Column;
@@ -33,6 +33,7 @@ const emit = defineEmits<{
}>();
let timeline = $shallowRef<InstanceType<typeof MkTimeline>>();
let channel = $shallowRef<misskey.entities.Channel>();
if (props.column.channelId == null) {
setChannel();
@@ -56,11 +57,15 @@ async function setChannel() {
});
}
function post() {
async function post() {
if (!channel || channel.id !== props.column.channelId) {
channel = await os.api('channels/show', {
channelId: props.column.channelId,
});
}
os.post({
channel: {
id: props.column.channelId,
},
channel,
});
}