Skip to content

Commit

Permalink
Release: 0.4.0 (#247)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozakura913 authored Jul 28, 2024
2 parents ee4ab93 + e1b4508 commit 337e4c4
Show file tree
Hide file tree
Showing 36 changed files with 467 additions and 261 deletions.
13 changes: 0 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
## Unreleased

### General
- Feat: 通報を受けた際、または解決した際に、予め登録した宛先に通知を飛ばせるように(mail or webhook) #13705
- Fix: 配信停止したインスタンス一覧が見れなくなる問題を修正

### Client
-

### Server
- チャート生成時にinstance.suspentionStateに置き換えられたinstance.isSuspendedが参照されてしまう問題を修正


## 2024.5.0

### Note
Expand Down
9 changes: 5 additions & 4 deletions CHANGELOG_CHERRYPICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGE
# 릴리즈 노트
이 문서는 CherryPick의 변경 사항만 포함합니다.

## 4.x.x
출시일: unreleased<br>
기반 Misskey 버전: 2024.x.x<br>
Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#2024xx](CHANGELOG.md#2024xx) 문서를 참고하십시오.
## 4.9.0
출시일: 2024/7/27<br>
기반 Misskey 버전: 2024.5.0<br>
Misskey의 전체 변경 사항을 확인하려면, [CHANGELOG.md#202450](CHANGELOG.md#202450) 문서를 참고하십시오.

### Client
- Enhance: 노트 작성 폼에서 '공개 범위 기억하기' 설정을 변경할 수 있음
- Fix: 타임라인 노트의 리액션 뷰어에 리모트 서버의 커스텀 이모지가 표시되지 않음
- Fix: '리노트 공개 범위 지정' 옵션이 `없음`으로 설정된 경우 리노트를 할 수 없음
- Fix: 아바타 장식을 설정할 때 설정 팝업이 두 번 표시될 수 있음
- Fix: 코드 블록의 하이라이트가 실제 위치와 다르게 표시될 수 있음 (kokonect-link/cherrypick#475)

### Server
- Feat: 리모트 유저의 아바타 장식을 여러 개 불러올 수 있음([yunochi/misskey@696787b3](https://github.com/yunochi/misskey/commit/696787b38bac31e7586899a5a59611a6fe50b9a1), [yunochi/misskey@4a5fcfe4](https://github.com/yunochi/misskey/commit/4a5fcfe43880f08380541caa6b7593b90306d103))
Expand Down
33 changes: 27 additions & 6 deletions CHANGELOG_yojo.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
### Misc
-->

## 0.4.0 (unreleased)
## x.x.x (unreleased)

### Release Date

Expand All @@ -31,6 +30,28 @@

### Misc

## 0.4.0
Cherrypick 4.9.0

### Release Date
2024-07-28

### General
- Remove: 連合過激派によってローカルのみ投稿機能は削除されました

### Client
- Fix: 引用とCWを併用した場合にタイムラインと詳細で表示が異なる不具合を修正 [#231](https://github.com/yojo-art/cherrypick/issues/231)
- Feat: サイコロウィジェット
(Cherry-picked from https://github.com/1673beta/cherrypick/pull/73)
- Enhance: 絵文字のインポート時にリモートから取得した値で埋めた編集ダイアログを表示する
- Fix: メディアタイムラインの可視性を変更できない問題を修正 [#54](https://github.com/yojo-art/cherrypick/issues/54)
- Feat: NSFWフラグの付いた画像と動画で年齢確認ダイアログを出す [#245](https://github.com/yojo-art/cherrypick/pull/245)

### Server
-

### Misc


## 0.3.4
Cherrypick 4.9.0-beta.2
Expand All @@ -39,15 +60,15 @@ Cherrypick 4.9.0-beta.2
2024-07-21

### General
- enhance: 現在のインデックスを破棄して全ノートを強制的にインデックスさせるAPIの追加(コントロールパネル/その他)
- enhance: 全ノートを強制的にインデックスさせるAPIの追加(コントロールパネル/その他)
- Enhance: 現在のインデックスを破棄して全ノートを強制的にインデックスさせるAPIの追加(コントロールパネル/その他)
- Enhance: 全ノートを強制的にインデックスさせるAPIの追加(コントロールパネル/その他)
(Based on https://github.com/TeamNijimiss/misskey/commit/e106092f5d4c79ec8d6ad53431ecb46839afe26c)

### Client
-

### Server
- Fix:グループ招待に返答すると通知が見れなくなる問題を修正
- Fix: グループ招待に返答すると通知が見れなくなる問題を修正
- Fix: notifications/deleteで通知を削除できない問題を修正
- Fix: 高度な検索(opensearch)でsudachiが使われていない問題を修正
- 検索文に一致していてもノートが出てこないことがあるのを修正しました
Expand Down Expand Up @@ -121,7 +142,7 @@ Cherrypick 4.9.0-beta.2
- 添付ファイルのセンシティブ条件(なし/含む/除外)
- 引用ノート除外
- 検索方法の詳細はdoc/Advanced-Search.mdに
- Change:APIのパラメータを変更
- Change: APIのパラメータを変更
- notes/advanced-search の"excludeNsfw"を"excludeCW"に変更
- notes/advanced-search の"channelId"を削除

Expand Down
24 changes: 24 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5489,6 +5489,16 @@ export interface Locale extends ILocale {
* マスコット画像のリンク
*/
"mascotImageUrl": string;
"_checkR18": {
/**
* 成人指定のメディアです
*/
"title": string;
/**
* あなたは18歳以上ですか?
*/
"description": string;
};
"_nsfwOpenBehavior": {
/**
* タップして開く
Expand Down Expand Up @@ -11660,6 +11670,20 @@ export interface Locale extends ILocale {
*/
"quesion": string;
};
"_dice": {
/**
* サイコロを振る
*/
"rollDice": string;
/**
* サイコロの数
*/
"diceCount": string;
/**
* サイコロの面数
*/
"diceFaces": string;
};
}
declare const locales: {
[lang: string]: Locale;
Expand Down
8 changes: 8 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,9 @@ _official_tag:
navbar: "公式タグ"
adminTopInfo: "優先度の値が小さいものが上に表示されます"
mascotImageUrl: "マスコット画像のリンク"
_checkR18:
title: "成人指定のメディアです"
description: "あなたは18歳以上ですか?"

_nsfwOpenBehavior:
click: "タップして開く"
Expand Down Expand Up @@ -3115,3 +3118,8 @@ _reIndexOpenSearch:
_reCreateOpenSearchIndex:
title: "現在のインデックスを破棄して再インデックスする"
quesion: "現在のインデックスを破棄して全てのノートを再インデックスしますか?"

_dice:
rollDice: "サイコロを振る"
diceCount: "サイコロの数"
diceFaces: "サイコロの面数"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cherrypick",
"version": "4.9.0-beta.2-yojo0.3.4",
"version": "4.9.0-yojo0.4.0",
"basedMisskeyVersion": "2024.5.0",
"codename": "nasubi",
"repository": {
Expand Down
22 changes: 19 additions & 3 deletions packages/backend/src/core/AdvancedSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,9 @@ export class AdvancedSearchService {

const noteIds = res.body.hits.hits.map((hit: any) => hit._id);
if (noteIds.length === 0) return [];
pagination.untilId = noteIds[noteIds.length - 1];
//検索結果がある
const Followings = me ? await this.cacheService.userFollowingsCache.fetch(me.id) : null;
const [
userIdsWhoMeMuting,
userIdsWhoMeBlockingMe,
Expand All @@ -427,10 +430,23 @@ export class AdvancedSearchService {
const notes = (await this.notesRepository.findBy({
id: In(noteIds),
})).filter(note => {
if (me && isUserRelated(note, userIdsWhoMeMuting)) return false;
if (me && isUserRelated(note, userIdsWhoMeBlockingMe)) return false;
return true;
if (note.visibility === 'public' || note.visibility === 'home') {
if (me && (isUserRelated(note, userIdsWhoMeMuting) || isUserRelated(note, userIdsWhoMeBlockingMe))) return false;
else return true;
}
if (note.visibility === 'followers' ) {
if (Followings) {
if (!Object.hasOwn(Followings, note.userId)) {
return true;
}
}
}
return false;
});
if (notes.length === 0) {
//フィルタした結果0件になった場合は再帰的に処理する
return await this.searchNote(q, me, opts, pagination);
}

return notes.sort((a, b) => a.id > b.id ? -1 : 1);
} else {
Expand Down
12 changes: 2 additions & 10 deletions packages/backend/src/server/api/endpoints/notes/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ export const paramDef = {
type: 'string', format: 'misskey:id',
} },
cw: { type: 'string', nullable: true, minLength: 1, maxLength: 100 },
localOnly: { type: 'boolean', default: false },
reactionAcceptance: { type: 'string', nullable: true, enum: [null, 'likeOnly', 'likeOnlyForRemote', 'nonSensitiveOnly', 'nonSensitiveOnlyForLocalLikeOnlyForRemote'], default: null },
disableRightClick: { type: 'boolean', default: false },
noExtractMentions: { type: 'boolean', default: false },
Expand Down Expand Up @@ -364,14 +363,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
}
}

let channel: MiChannel | null = null;
if (ps.channelId != null) {
channel = await this.channelsRepository.findOneBy({ id: ps.channelId, isArchived: false });

if (channel == null) {
throw new ApiError(meta.errors.noSuchChannel);
}
}
const channel: MiChannel | null = null;

// 投稿を作成
try {
Expand All @@ -393,7 +385,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
metadata: ps.event.metadata ?? {},
} : undefined,
cw: ps.cw,
localOnly: ps.localOnly,
localOnly: false,
reactionAcceptance: ps.reactionAcceptance,
disableRightClick: ps.disableRightClick,
visibility: ps.visibility,
Expand Down
2 changes: 1 addition & 1 deletion packages/cherrypick-js/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "module",
"name": "cherrypick-js",
"version": "4.9.0-beta.2-yojo0.3.4",
"version": "4.9.0-yojo0.4.0",
"basedMisskeyVersion": "2024.5.0",
"description": "CherryPick SDK for JavaScript",
"license": "MIT",
Expand Down
2 changes: 0 additions & 2 deletions packages/cherrypick-js/src/autogen/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21727,8 +21727,6 @@ export type operations = {
visibility?: 'public' | 'home' | 'followers' | 'specified';
visibleUserIds?: string[];
cw?: string | null;
/** @default false */
localOnly?: boolean;
/**
* @default null
* @enum {string|null}
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"lint": "pnpm typecheck && pnpm eslint"
},
"dependencies": {
"@dice-roller/rpg-dice-roller": "^5.5.0",
"@discordapp/twemoji": "15.0.3",
"@github/webauthn-json": "2.1.1",
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/MkCode.core.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ watch(() => props.lang, (to) => {

& pre,
& code {
font-family: "JetBrains Mono", "Pretendard JP", Pretendard, Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
font-family: Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
}
}

Expand Down
91 changes: 91 additions & 0 deletions packages/frontend/src/components/MkDice.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* SPDX-FileCopyrightText: syuilo and misskey-project, noridev, cherrypick-project, esurio
* SPDX-License-Identifier: AGPL-3.0-only
*/
<template>
<div class="zmdxowus">
<div>
<MkInput v-model="diceCount" small type="text" class="input">
<template #label>{{ i18n.ts._dice.diceCount }}</template>
</MkInput>
</div>
<div>
<MkInput v-model="diceFaces" small type="text" class="input">
<template #label>{{ i18n.ts._dice.diceFaces }}</template>
</MkInput>
</div>
<div>
<MkButton large primary style="margin: 0 auto;" @click="rollDice">
<i class="ti ti-dice-2"></i>
{{ i18n.ts._dice.rollDice }}
</MkButton>
</div>
<div v-if="diceResult" class="result">{{ diceResult }}</div>
<div v-if="showMinTotal" class="option">{{ diceMinTotal }}</div>
<div v-if="showMaxTotal" class="option">{{ diceMaxTotal }}</div>
<dic v-if="showAverageTotal" class="option">{{ diceAverageTotal }}</dic>
</div>
</template>

<script lang="ts" setup>
import { Ref, ref } from 'vue';
import { DiceRoll } from '@dice-roller/rpg-dice-roller';
import MkInput from '@/components/MkInput.vue';
import MkButton from '@/components/MkButton.vue';
import { i18n } from '@/i18n';
const props = withDefaults(defineProps<{
showMinTotal?: boolean;
showMaxTotal?: boolean;
showAverageTotal?: boolean;
}>(), {
showMinTotal: false,
showMaxTotal: false,
showAverageTotal: false,
});
const diceCount = ref(1);
const diceFaces = ref(6);
const diceResult: Ref<number | null> = ref(null);
const diceMinTotal: Ref<number | null> = ref(null);
const diceMaxTotal: Ref<number | null> = ref(null);
const diceAverageTotal: Ref<number | null> = ref(null);
const rollDice = () => {
let roll = new DiceRoll(`${diceCount.value}d${diceFaces.value}`);
if (diceCount.value > 999) {
return;
}
diceResult.value = roll.total;
diceMinTotal.value = roll.minTotal;
diceMaxTotal.value = roll.maxTotal;
diceAverageTotal.value = roll.averageTotal;
};
</script>

<style lang="scss" scoped>
.zmdxowus {
padding: 8px 16px;
> div {
margin: 8px 0;
}
> .input {
flex: 1 1 auto;
padding: 8px;
}
> .result {
text-align: center;
margin: auto;
}
> .option {
padding: 8px 0;
text-align: left;
}
}
</style>
4 changes: 3 additions & 1 deletion packages/frontend/src/components/MkMediaImage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ import { i18n } from '@/i18n.js';
import * as os from '@/os.js';
import { $i, iAmModerator } from '@/account.js';
import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { confirmR18 } from '@/scripts/check-r18.js';

const props = withDefaults(defineProps<{
image: Misskey.entities.DriveFile;
Expand Down Expand Up @@ -99,9 +100,10 @@ const clickToShowMessage = computed(() => defaultStore.state.nsfwOpenBehavior ==
: '',
);

function onClick(ev: MouseEvent) {
async function onClick(ev: MouseEvent) {
if (!props.controls) return;
if (!hide.value) return;
if (!await confirmR18()) return;
if (defaultStore.state.nsfwOpenBehavior === 'doubleClick') os.popup(MkRippleEffect, { x: ev.clientX, y: ev.clientY }, {}, 'end');
if (defaultStore.state.nsfwOpenBehavior === 'click') hide.value = false;
}
Expand Down
Loading

0 comments on commit 337e4c4

Please sign in to comment.