Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
EbiseLutica committed Jan 7, 2025
2 parents 1cfbced + d3943b2 commit 7ef4fec
Show file tree
Hide file tree
Showing 14 changed files with 261 additions and 77 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG-EBISSKEY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

Ebisskeyとしての変更履歴です。Misskeyのリリースノートは [CHANGELOG](/CHANGELOG.md) を確認してください。

## 2024.11.0-sh.2
* エアリプ機能
* 公開範囲の色分け機能
* ハイライトタイムラインをホーム画面のタブにも表示する機能

## 2024.8.0
* リノート解除を、リノートボタンからも行えるように

Expand Down
5 changes: 5 additions & 0 deletions DIFFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ Ebisskeyは、通常のMisskeyをベースに次のような改変を施して
* 2024.5.0 で廃止。
* パクる機能
* ノートをコピーし、そのまま投稿する機能。
* エアリプ機能
* **実験的**。指定したノートに公開範囲を合わせた投稿を作成できます。
* 公開範囲の色分け機能
* **実験的**。公開範囲ごとにノートを色分けします。

## 改変

✨ 印のあるものは無効化できません。

* **トップページ**: ハイライトタイムラインをホーム画面のタブにも表示
* **投稿フォーム**: プレビューボタンのオンオフを記憶するよう変更
* **ノート**: リモートのカスタム絵文字リアクションについて、ローカルに同名の絵文字があればリアクションできるよう変更
* **ノート**: 「ノートの操作部をホバー時のみ表示する」をオンにしたときに、詳細表示ボタンを表示するよう変更
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "2024.11.0-sh.1",
"version": "2024.11.0-sh.2",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
15 changes: 15 additions & 0 deletions packages/frontend/src/components/MkNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
:class="[$style.root, { [$style.showActionsOnlyHover]: defaultStore.state.showNoteActionsOnlyHover, [$style.skipRender]: defaultStore.state.skipNoteRender }]"
:tabindex="isDeleted ? '-1' : '0'"
>
<ShVisibilityColoring v-if="!appearNote.channel && (appearNote.visibility !== 'public' || appearNote.localOnly)" :visibility="appearNote.visibility" :localOnly="appearNote.localOnly ?? false"/>
<MkNoteSub v-if="appearNote.reply && !renoteCollapsed" :note="appearNote.reply" :class="$style.replyTo"/>
<div v-if="pinned" :class="$style.tip"><i class="ti ti-pin"></i> {{ i18n.ts.pinnedNote }}</div>
<!--<div v-if="appearNote._prId_" class="tip"><i class="ti ti-speakerphone"></i> {{ i18n.ts.promotion }}<button class="_textButton hide" @click="readPromo()">{{ i18n.ts.hideThisNote }} <i class="ti ti-x"></i></button></div>-->
Expand Down Expand Up @@ -135,6 +136,9 @@ SPDX-License-Identifier: AGPL-3.0-only
<button v-if="stealButtonVisible" ref="stealButton" :class="$style.footerButton" class="_button" @mousedown.prevent="stealMenu(appearNote, stealButton)">
<i class="ti ti-swipe"></i>
</button>
<button v-if="defaultStore.state.useAirReply && defaultStore.state.airReplyButtonPlacement === 'noteFooter'" :class="$style.footerButton" class="_button" @click.prevent="airReply()">
<i class="ti ti-bubble-text"></i>
</button>
<button v-if="defaultStore.state.showClipButtonInNoteFooter" ref="clipButton" :class="$style.footerButton" class="_button" @mousedown.prevent="clip()">
<i class="ti ti-paperclip"></i>
</button>
Expand Down Expand Up @@ -191,6 +195,7 @@ import MkPoll from '@/components/MkPoll.vue';
import MkUsersTooltip from '@/components/MkUsersTooltip.vue';
import MkUrlPreview from '@/components/MkUrlPreview.vue';
import MkInstanceTicker from '@/components/MkInstanceTicker.vue';
import ShVisibilityColoring from '@/components/ShVisibilityColoring.vue';
import { pleaseLogin, type OpenOnRemoteOptions } from '@/scripts/please-login.js';
import { checkWordMute } from '@/scripts/check-word-mute.js';
import { notePage } from '@/filters/note.js';
Expand Down Expand Up @@ -455,6 +460,16 @@ function reply(): void {
});
}

// Ebisskey
function airReply(): void {
// 公開範囲を引き継いだ投稿フォームを作成
os.post({
reply: appearNote,
channel: appearNote.value.channel,
isAirReply: true,
});
}

function react(): void {
pleaseLogin({ openOnRemote: pleaseLoginContext.value });
showMovedDialog();
Expand Down
33 changes: 24 additions & 9 deletions packages/frontend/src/components/MkPostForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@dragleave="onDragleave"
@drop.stop="onDrop"
>
<ShVisibilityColoring v-if="!channel && (visibility !== 'public' || localOnly)" :visibility="visibility" :localOnly="localOnly"/>
<header :class="$style.header">
<div :class="$style.headerLeft">
<button v-if="!fixed" :class="$style.cancel" class="_button" @click="cancel"><i class="ti ti-x"></i></button>
Expand All @@ -20,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<div :class="$style.headerRight">
<template v-if="!(channel != null && fixed)">
<button v-if="channel == null" ref="visibilityButton" v-click-anime v-tooltip="i18n.ts.visibility" :class="['_button', $style.headerRightItem, $style.visibility]" @click="setVisibility">
<button v-if="channel == null" ref="visibilityButton" v-click-anime v-tooltip="i18n.ts.visibility" :disabled="isAirReply" :class="['_button', $style.headerRightItem, $style.visibility]" @click="setVisibility">
<span v-if="visibility === 'public'"><i class="ti ti-world"></i></span>
<span v-if="visibility === 'home'"><i class="ti ti-home"></i></span>
<span v-if="visibility === 'followers'"><i class="ti ti-lock"></i></span>
Expand All @@ -32,7 +33,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<span :class="$style.headerRightButtonText">{{ channel.name }}</span>
</button>
</template>
<button v-click-anime v-tooltip="i18n.ts._visibility.disableFederation" class="_button" :class="[$style.headerRightItem, { [$style.danger]: localOnly }]" :disabled="channel != null || visibility === 'specified'" @click="toggleLocalOnly">
<button v-click-anime v-tooltip="i18n.ts._visibility.disableFederation" class="_button" :class="[$style.headerRightItem, { [$style.danger]: localOnly }]" :disabled="channel != null || visibility === 'specified' || isAirReply" @click="toggleLocalOnly">
<span v-if="!localOnly"><i class="ti ti-rocket"></i></span>
<span v-else><i class="ti ti-rocket-off"></i></span>
</button>
Expand All @@ -46,13 +47,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<template v-if="posted"></template>
<template v-else-if="posting"><MkEllipsis/></template>
<template v-else>{{ submitText }}</template>
<i style="margin-left: 6px;" :class="posted ? 'ti ti-check' : reply ? 'ti ti-arrow-back-up' : renote ? 'ti ti-quote' : 'ti ti-send'"></i>
<i style="margin-left: 6px;" :class="posted ? 'ti ti-check' : isAirReply ? 'ti ti-bubble-text' : reply ? 'ti ti-arrow-back-up' : renote ? 'ti ti-quote' : 'ti ti-send'"></i>
</div>
</button>
</div>
</header>
<MkNoteSimple v-if="reply" :class="$style.targetNote" :note="reply"/>
<MkNoteSimple v-if="renote" :class="$style.targetNote" :note="renote"/>
<MkInfo v-if="props.isAirReply" :class="$style.airReplyInfo">
公開範囲を合わせた、通常のノートを作成します。<br/>相手に通知は届きません。
</MkInfo>
<div v-if="quoteId" :class="$style.withQuote"><i class="ti ti-quote"></i> {{ i18n.ts.quoteAttached }}<button @click="quoteId = null"><i class="ti ti-x"></i></button></div>
<div v-if="visibility === 'specified'" :class="$style.toSpecified">
<span style="margin-right: 8px;">{{ i18n.ts.recipient }}</span>
Expand Down Expand Up @@ -106,6 +110,8 @@ import * as Misskey from 'misskey-js';
import insertTextAtCursor from 'insert-text-at-cursor';
import { toASCII } from 'punycode/';
import { host, url } from '@@/js/config.js';
import ShVisibilityColoring from './ShVisibilityColoring.vue';
import type { PostFormProps } from '@/types/post-form.js';
import MkNoteSimple from '@/components/MkNoteSimple.vue';
import MkNotePreview from '@/components/MkNotePreview.vue';
import XPostFormAttaches from '@/components/MkPostFormAttaches.vue';
Expand All @@ -129,7 +135,6 @@ import { miLocalStorage } from '@/local-storage.js';
import { claimAchievement } from '@/scripts/achievements.js';
import { emojiPicker } from '@/scripts/emoji-picker.js';
import { mfmFunctionPicker } from '@/scripts/mfm-function-picker.js';
import type { PostFormProps } from '@/types/post-form.js';

const $i = signinRequired();

Expand Down Expand Up @@ -197,7 +202,9 @@ const draftKey = computed((): string => {
if (props.renote) {
key += `renote:${props.renote.id}`;
} else if (props.reply) {
key += `reply:${props.reply.id}`;
// Ebisskey
const keyPrefix = props.isAirReply ? 'air-reply' : 'reply';
key += `${keyPrefix}:${props.reply.id}`;
} else {
key += `note:${$i.id}`;
}
Expand All @@ -208,6 +215,8 @@ const draftKey = computed((): string => {
const placeholder = computed((): string => {
if (props.renote) {
return i18n.ts._postForm.quotePlaceholder;
} else if (props.isAirReply) {
return 'このノートにエアリプ…';
} else if (props.reply) {
return i18n.ts._postForm.replyPlaceholder;
} else if (props.channel) {
Expand All @@ -228,9 +237,11 @@ const placeholder = computed((): string => {
const submitText = computed((): string => {
return props.renote
? i18n.ts.quote
: props.reply
? i18n.ts.reply
: i18n.ts.note;
: props.isAirReply
? 'エアリプ'
: props.reply
? i18n.ts.reply
: i18n.ts.note;
});

const textLength = computed((): number => {
Expand Down Expand Up @@ -782,7 +793,7 @@ async function post(ev?: MouseEvent) {
let postData = {
text: text.value === '' ? null : text.value,
fileIds: files.value.length > 0 ? files.value.map(f => f.id) : undefined,
replyId: props.reply ? props.reply.id : undefined,
replyId: !props.isAirReply && props.reply ? props.reply.id : undefined,
renoteId: props.renote ? props.renote.id : quoteId.value ? quoteId.value : undefined,
channelId: props.channel ? props.channel.id : undefined,
poll: poll.value,
Expand Down Expand Up @@ -1243,6 +1254,10 @@ html[data-color-scheme=light] .preview {
background: var(--MI_THEME-X4);
}

.airReplyInfo {
margin: 0 20px 16px 20px;
}

.hasNotSpecifiedMentions {
margin: 0 20px 16px 20px;
}
Expand Down
7 changes: 6 additions & 1 deletion packages/frontend/src/components/MkTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { defaultStore } from '@/store.js';
import { Paging } from '@/components/MkPagination.vue';

const props = withDefaults(defineProps<{
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role';
src: BasicTimelineType | 'mentions' | 'directs' | 'list' | 'antenna' | 'channel' | 'role' | 'featured';
list?: string;
antenna?: string;
channel?: string;
Expand Down Expand Up @@ -166,6 +166,8 @@ function updatePaginationQuery() {
let endpoint: keyof Misskey.Endpoints | null;
let query: TimelineQueryType | null;

console.log('updatePaginationQuery', props.src);

if (props.src === 'antenna') {
endpoint = 'antennas/notes';
query = {
Expand Down Expand Up @@ -212,6 +214,9 @@ function updatePaginationQuery() {
withFiles: props.onlyFiles ? true : undefined,
listId: props.list,
};
} else if (props.src === 'featured') {
endpoint = 'notes/featured';
query = {};
} else if (props.src === 'channel') {
endpoint = 'channels/timeline';
query = {
Expand Down
13 changes: 11 additions & 2 deletions packages/frontend/src/components/MkVisibilityPicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ SPDX-License-Identifier: AGPL-3.0-only
<div :class="[$style.label, $style.item]">
{{ i18n.ts.visibility }}
</div>
<button key="public" :disabled="isSilenced || isReplyVisibilitySpecified" class="_button" :class="[$style.item, { [$style.active]: v === 'public' }]" data-index="1" @click="choose('public')">
<button key="public" :disabled="isSilenced || isReplyVisibilitySpecified" class="_button" :class="[$style.item, {[$style.itemWithError]: isSilenced}, { [$style.active]: v === 'public' }]" data-index="1" @click="choose('public')">
<div :class="$style.icon"><i class="ti ti-world"></i></div>
<div :class="$style.body">
<span :class="$style.itemTitle">{{ i18n.ts._visibility.public }}</span>
<span :class="$style.itemDescription">{{ i18n.ts._visibility.publicDescription }}</span>
<!-- Ebisskey -->
<span v-if="!isSilenced" :class="$style.itemDescription">{{ i18n.ts._visibility.publicDescription }}</span>
<span v-else :class="$style.itemError">サイレンス中のため利用不可</span>
</div>
</button>
<button key="home" :disabled="isReplyVisibilitySpecified" class="_button" :class="[$style.item, { [$style.active]: v === 'home' }]" data-index="2" @click="choose('home')">
Expand Down Expand Up @@ -155,4 +157,11 @@ function choose(visibility: typeof Misskey.noteVisibilities[number]): void {
.itemDescription {
opacity: 0.6;
}

// Ebisskey
.itemError {
display: block;
font-weight: bold;
color: var(--MI_THEME-error);
}
</style>
42 changes: 42 additions & 0 deletions packages/frontend/src/components/ShVisibilityColoring.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<template>
<div :class="$style.root" :style="`background: ${background}`">
</div>
</template>

<script lang="ts" setup>
import { defineProps, computed } from 'vue';
import { defaultStore } from '@/store.js';
const props = defineProps<{
visibility: string;
localOnly: boolean;
}>();
const color = computed(() => {
switch (props.visibility) {
case 'home': return defaultStore.state.noteVisibilityColorHome;
case 'followers': return defaultStore.state.noteVisibilityColorFollowers;
case 'specified': return defaultStore.state.noteVisibilityColorSpecified;
default: return 'transparent';
}
});
const background = computed(() => {
if (props.localOnly) {
const theColor = props.visibility === 'public' ? defaultStore.state.noteVisibilityColorLocalOnly : color.value;
return `repeating-linear-gradient(135deg, transparent, transparent 5px, ${theColor} 5px, ${theColor} 10px);`;
}
return color.value;
});
</script>

<style lang="scss" module>
.root {
position: absolute;
top: 0;
right: 0;
height: 100%;
width: 6px;
}
</style>
Loading

0 comments on commit 7ef4fec

Please sign in to comment.