Skip to content

Commit

Permalink
feat: 返信に投稿フォームを表示する機能を追加
Browse files Browse the repository at this point in the history
  • Loading branch information
noridev committed Sep 22, 2023
1 parent 977493e commit f56c006
Show file tree
Hide file tree
Showing 9 changed files with 1,344 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
- Feat: 알림에서 답글이 달린 노트의 상위 노트를 표시하지 않도록 하는 설정 추가
- Feat: 리노트와 인용 버튼을 표시하는 방법을 선택할 수 있음
- Feat: 알림 위젯에 필터, 모두 읽은 상태로 표시 버튼 추가
- Feat: 답글에 글 작성란을 표시하는 기능 추가
- Spec: 사용자 정의 이모티콘 라이센스를 여러 항목으로 추가할 수 있도록 (MisskeyIO/misskey#130)
- Enhance: 새로운 신고가 있는 경우, 네비게이션 바의 제어판 아이콘과 제어판 페이지의 신고 섹션에 점을 표시
- Enhance: 스크롤 시 요소 표시 기능을 Friendly 이외의 UI에도 대응
Expand Down
2 changes: 2 additions & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
_lang_: "English"
showFixedPostFormInReplies: "Show posting form in replies"
showFixedPostFormInRepliesDescription: "Only visible in desktop and tablet environments."
disabledServerMachineStats: "The 'Publish server hardware stats' setting is turned off.\nTo view server metrics, please enable the 'Publish server hardware stats' setting in 'Control Panel - Other'."
replayUserSetupDialog: "Replay initial setting"
replayTutorial: "Replay tutorial"
Expand Down
2 changes: 2 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
// Do not edit this file directly.
export interface Locale {
"_lang_": string;
"showFixedPostFormInReplies": string;
"showFixedPostFormInRepliesDescription": string;
"disabledServerMachineStats": string;
"replayUserSetupDialog": string;
"replayTutorial": string;
Expand Down
2 changes: 2 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
_lang_: "日本語"

showFixedPostFormInReplies: "返信に投稿フォームを表示する"
showFixedPostFormInRepliesDescription: "デスクトップとタブレット環境でのみ表示されます。"
disabledServerMachineStats: "「サーバーのマシン情報を公開する」設定がオフになっています。\nサーバーメトリクスを表示するには、「コントロールパネル - その他」で「サーバーのマシン情報を公開する」設定を有効にしてください。"
replayUserSetupDialog: "初期設定のリプレイ"
replayTutorial: "チュートリアルのリプレイ"
Expand Down
2 changes: 2 additions & 0 deletions locales/ko-KR.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---
_lang_: "한국어"
showFixedPostFormInReplies: "답글에 글 작성란 표시"
showFixedPostFormInRepliesDescription: "데스크톱과 태블릿 환경에서만 표시돼요."
disabledServerMachineStats: "'서버의 머신 사양을 공개하기' 설정이 꺼져 있습니다.\n서버 통계를 보려면 '제어판 - 기타'에서 '서버의 머신 사양을 공개하기' 설정을 활성화하세요."
replayUserSetupDialog: "초기 설정 다시 보기"
replayTutorial: "튜토리얼 다시 보기"
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/src/components/MkNoteDetailed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div>
<div v-if="tab === 'replies'" :class="$style.tab_replies">
<MkPostForm v-if="!isMobile && defaultStore.state.showFixedPostFormInReplies" class="post-form _panel" fixed :reply="appearNote"></MkPostForm>
<div v-if="replies.length > 3 && !repliesLoaded" style="padding: 16px">
<MkButton style="margin: 0 auto;" primary rounded @click="loadReplies">{{ i18n.ts.loadReplies }}</MkButton>
</div>
Expand Down Expand Up @@ -253,6 +254,11 @@ import MkReactionIcon from '@/components/MkReactionIcon.vue';
import MkButton from '@/components/MkButton.vue';
import { miLocalStorage } from '@/local-storage.js';
import { instance } from '@/instance.js';
import MkPostForm from '@/components/MkPostFormSimple.vue';
import { deviceKind } from '@/scripts/device-kind.js';

const MOBILE_THRESHOLD = 500;
const isMobile = ref(deviceKind === 'smartphone' || window.innerWidth <= MOBILE_THRESHOLD);

const props = defineProps<{
note: Misskey.entities.Note;
Expand Down
Loading

0 comments on commit f56c006

Please sign in to comment.