Skip to content

Commit

Permalink
Merge branch 'develop' into c2-2
Browse files Browse the repository at this point in the history
  • Loading branch information
tamaina committed Apr 13, 2023
2 parents b1f22c6 + 9bb6c53 commit bbba5c5
Show file tree
Hide file tree
Showing 36 changed files with 666 additions and 264 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
-->

## 13.x.x (unreleased)
## 13.11.3

### General
- 指定したロールを持つユーザーのノートのみが流れるロールタイムラインを追加
Expand All @@ -23,13 +23,14 @@
- カスタム絵文字でリアクションできないことがある問題を修正

### Client
-
- チャンネルのピン留めされたノートの順番が正しくない問題を修正

### Server
- フォローインポートなどでの大量のフォロー等操作をキューイングするように #10544 @nmkj-io
- Misskey Webでのサーバーサイドエラー画面を改善
- Misskey Webでのサーバーサイドエラーのログが残るように
- ノート作成時のアンテナ追加パフォーマンスを改善
- フォローインポートなどでの大量のフォロー等操作をキューイングするように #10544 @nmkj-io
- アンテナとロールTLのuntil/sinceプロパティが動くように

## 13.11.2

Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ You can override the default story by creating a impl story file (`MyComponent.s

```ts
/* eslint-disable @typescript-eslint/explicit-function-return-type */
/* eslint-disable import/no-duplicates */
import { StoryObj } from '@storybook/vue3';
import MyComponent from './MyComponent.vue';
export const Default = {
Expand Down
4 changes: 4 additions & 0 deletions locales/de-DE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ noNotes: "Keine Notizen gefunden"
noNotifications: "Keine Benachrichtigungen gefunden"
instance: "Instanz"
settings: "Einstellungen"
notificationSettings: "Benachrichtigungseinstellungen"
basicSettings: "Allgemeine Einstellungen"
otherSettings: "Weitere Einstellungen"
openInWindow: "In einem Fenster öffnen"
Expand Down Expand Up @@ -1407,6 +1408,8 @@ _channel:
following: "Gefolgt"
usersCount: "{n} Teilnehmer"
notesCount: "{n} Notizen"
nameAndDescription: "Name und Beschreibung"
nameOnly: "Nur Name"
_menuDisplay:
sideFull: "Seitlich"
sideIcon: "Seitlich (Icons)"
Expand Down Expand Up @@ -1887,6 +1890,7 @@ _deck:
channel: "Kanal"
mentions: "Erwähnungen"
direct: "Direktnachrichten"
roleTimeline: "Rollenchronik"
_dialog:
charactersExceeded: "Maximallänge überschritten! Momentan {current} von {max}"
charactersBelow: "Minimallänge unterschritten! Momentan {current} von {min}"
Expand Down
4 changes: 4 additions & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ noNotes: "No notes"
noNotifications: "No notifications"
instance: "Instance"
settings: "Settings"
notificationSettings: "Notification Settings"
basicSettings: "Basic Settings"
otherSettings: "Other Settings"
openInWindow: "Open in window"
Expand Down Expand Up @@ -1407,6 +1408,8 @@ _channel:
following: "Followed"
usersCount: "{n} Participants"
notesCount: "{n} Notes"
nameAndDescription: "Name and description"
nameOnly: "Name only"
_menuDisplay:
sideFull: "Side"
sideIcon: "Side (Icons)"
Expand Down Expand Up @@ -1887,6 +1890,7 @@ _deck:
channel: "Channel"
mentions: "Mentions"
direct: "Direct notes"
roleTimeline: "Role Timeline"
_dialog:
charactersExceeded: "You've exceeded the maximum character limit! Currently at {current} of {max}."
charactersBelow: "You're below the minimum character limit! Currently at {current} of {min}."
Expand Down
6 changes: 5 additions & 1 deletion locales/it-IT.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ noNotes: "Nessuna nota!"
noNotifications: "Nessuna notifica"
instance: "Istanza"
settings: "Impostazioni"
notificationSettings: "Preferenze di notifica"
basicSettings: "Impostazioni generali"
otherSettings: "Altre impostazioni"
openInWindow: "Apri in una finestra"
Expand Down Expand Up @@ -786,7 +787,7 @@ gallery: "Galleria"
recentPosts: "Le più recenti"
popularPosts: "Le più visualizzate"
shareWithNote: "Condividere in nota"
ads: "Pubblicità"
ads: "Banner"
expiration: "Scadenza"
startingperiod: "Periodo di inizio"
memo: "Promemoria"
Expand Down Expand Up @@ -991,6 +992,7 @@ largeNoteReactions: "Ingrandisci le reazioni"
noteIdOrUrl: "ID della Nota o URL"
accountMigration: "Migrazione del profilo"
accountMoved: "Questo profilo ha migrato altrove:"
forceShowAds: "Mostra sempre i banner"
_accountMigration:
moveTo: "Migrare questo profilo verso un un altro"
moveToLabel: "Profilo verso cui migrare"
Expand Down Expand Up @@ -1406,6 +1408,8 @@ _channel:
following: "Seguiti"
usersCount: "{n} partecipanti"
notesCount: "{n} note"
nameAndDescription: "Nome e descrizione"
nameOnly: "Solo il nome"
_menuDisplay:
sideFull: "Laterale"
sideIcon: "Laterale (solo icone)"
Expand Down
4 changes: 4 additions & 0 deletions locales/ja-KS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ noNotes: "ノートはあらへん"
noNotifications: "通知はあらへん"
instance: "サーバー"
settings: "設定"
notificationSettings: "通知の設定"
basicSettings: "基本設定"
otherSettings: "ほかの設定"
openInWindow: "ウィンドウで開くで"
Expand Down Expand Up @@ -1407,6 +1408,8 @@ _channel:
following: "フォロー中やで"
usersCount: "{n}人が参加中やで"
notesCount: "{n}こ投稿があるで"
nameAndDescription: "名前と説明"
nameOnly: "名前だけ"
_menuDisplay:
sideFull: ""
sideIcon: "横(アイコン)"
Expand Down Expand Up @@ -1887,6 +1890,7 @@ _deck:
channel: "チャンネル"
mentions: "あんた宛て"
direct: "ダイレクト"
roleTimeline: "ロールタイムライン"
_dialog:
charactersExceeded: "最大の文字数を上回っとるで!今は {current} / 最大でも {max}"
charactersBelow: "最小の文字数を下回っとるで!今は {current} / 最低でも {min}"
Expand Down
4 changes: 4 additions & 0 deletions locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ noNotes: "没有帖文"
noNotifications: "无通知"
instance: "服务器"
settings: "设置"
notificationSettings: "通知设置"
basicSettings: "基本设置"
otherSettings: "其他设置"
openInWindow: "在新窗口中打开"
Expand Down Expand Up @@ -1407,6 +1408,8 @@ _channel:
following: "正在关注"
usersCount: "有{n}人参与"
notesCount: "有{n}个帖子"
nameAndDescription: "名称与描述"
nameOnly: "仅名称"
_menuDisplay:
sideFull: "横向"
sideIcon: "横向(图标)"
Expand Down Expand Up @@ -1887,6 +1890,7 @@ _deck:
channel: "频道"
mentions: "提及"
direct: "指定用户"
roleTimeline: "角色时间线"
_dialog:
charactersExceeded: "已经超过了最大字符数! 当前字符数 {current} / 限制字符数 {max}"
charactersBelow: "低于最小字符数!当前字符数 {current} / 限制字符数 {min}"
Expand Down
12 changes: 11 additions & 1 deletion locales/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ noNotes: "無貼文。"
noNotifications: "沒有通知"
instance: "實例"
settings: "設定"
notificationSettings: "通知選項"
basicSettings: "基本設定"
otherSettings: "其他設定"
openInWindow: "在新視窗開啟"
Expand Down Expand Up @@ -506,6 +507,7 @@ objectStorageUseSSLDesc: "如果不使用https進行API連接,請關閉"
objectStorageUseProxy: "使用網路代理"
objectStorageUseProxyDesc: "如果不使用代理進行API連接,請關閉"
objectStorageSetPublicRead: "上傳時設定為\"public-read\""
s3ForcePathStyleDesc: "啟用 s3ForcePathStyle 會強制將儲存槽名稱指定為 URL 中路徑的一部分,而不是主機名。 使用自託管 Minio 之類的可能需要啟用。"
serverLogs: "伺服器日誌"
deleteAll: "刪除所有記錄"
showFixedPostForm: "於時間軸頁頂顯示「發送貼文」方框"
Expand Down Expand Up @@ -560,7 +562,7 @@ inboxUrl: "收件夾URL"
addedRelays: "已加入的中繼"
serviceworkerInfo: "您需要啟用推送通知"
deletedNote: "已删除的貼文"
invisibleNote: "隱藏的貼文"
invisibleNote: "私密的貼文"
enableInfiniteScroll: "啟用自動滾動頁面模式"
visibility: "可見性"
poll: "投票"
Expand Down Expand Up @@ -919,6 +921,7 @@ pushNotificationNotSupported: "瀏覽器或實例不支援推播通知"
sendPushNotificationReadMessage: "通知與訊息如果已讀的話,就將推播通知刪除"
sendPushNotificationReadMessageCaption: "「{emptyPushNotificationMessage}」通知將立刻顯示。可能會增加設備的電池消耗。"
windowMaximize: "最大化"
windowMinimize: "最小化"
windowRestore: "復原"
caption: "標題"
loggedInAsBot: "以機器人帳戶登入中"
Expand Down Expand Up @@ -960,6 +963,9 @@ copyErrorInfo: "複製錯誤資訊"
joinThisServer: "在此伺服器上註冊"
exploreOtherServers: "探索其他伺服器"
letsLookAtTimeline: "看看時間軸"
disableFederationConfirm: "要停止聯邦功能嗎?"
disableFederationConfirmWarn: "即使停止了聯邦功能,貼文也不會變成私密的。在大部分的情況下,沒有必要停止聯邦功能。"
disableFederationOk: "停止聯邦功能"
invitationRequiredToRegister: "目前這個伺服器為邀請制,必須擁有邀請碼才能註冊。"
emailNotSupported: "這個伺服器不支援寄送郵件"
postToTheChannel: "發布到頻道"
Expand All @@ -985,6 +991,7 @@ showClipButtonInNoteFooter: "將摘錄添加至貼文"
largeNoteReactions: "將貼文的反應放大顯示"
noteIdOrUrl: "貼文ID或URL"
accountMigration: "遷移帳戶"
accountMoved: "這個使用者已遷移至新的帳戶:"
forceShowAds: "總是顯示廣告"
_accountMigration:
moveTo: "將這個帳戶遷移至新的帳戶"
Expand Down Expand Up @@ -1401,6 +1408,8 @@ _channel:
following: "關注中"
usersCount: "有{n}人參與"
notesCount: "有{n}個貼文"
nameAndDescription: "名稱與說明"
nameOnly: "僅名稱"
_menuDisplay:
sideFull: "側向"
sideIcon: "側向(圖示)"
Expand Down Expand Up @@ -1881,6 +1890,7 @@ _deck:
channel: "頻道"
mentions: "提及"
direct: "指定使用者"
roleTimeline: "角色時間軸"
_dialog:
charactersExceeded: "已超過最大字數!現在 {current} / 限制 {max}"
charactersBelow: "低於最少字數!現在 {current} / 限制 {max}"
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": "13.11.2-p1.24",
"version": "13.11.3-p1.1",
"codename": "nasubi",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/CustomEmojiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export class CustomEmojiService {
if (!Array.isArray(JSON.parse(value))) return undefined; // 古いバージョンの壊れたキャッシュが残っていることがある(そのうち消す)
return new Map(JSON.parse(value).map((x: Serialized<Emoji>) => [x.name, {
...x,
updatedAt: x.updatedAt && new Date(x.updatedAt),
updatedAt: x.updatedAt ? new Date(x.updatedAt) : null,
}]));
},
});
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/entities/ChannelEntityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export class ChannelEntityService {
} : {}),

...(detailed ? {
pinnedNotes: await this.noteEntityService.packMany(pinnedNotes, me),
pinnedNotes: (await this.noteEntityService.packMany(pinnedNotes, me)).sort((a, b) => channel.pinnedNoteIds.indexOf(a.id) - channel.pinnedNoteIds.indexOf(b.id)),
} : {}),
};
}
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/server/api/endpoints/antennas/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,18 +76,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
throw new ApiError(meta.errors.noSuchAntenna);
}

const limit = ps.limit + (ps.untilId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const noteIdsRes = await this.redisClient.xrevrange(
`antennaTimeline:${antenna.id}`,
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : '+',
'-',
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+',
ps.sinceId ? this.idService.parse(ps.sinceId).date.getTime() : ps.sinceDate ?? '-',
'COUNT', limit);

if (noteIdsRes.length === 0) {
return [];
}

const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId);
const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId && x !== ps.sinceId);

if (noteIds.length === 0) {
return [];
Expand Down
8 changes: 4 additions & 4 deletions packages/backend/src/server/api/endpoints/roles/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,18 +71,18 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
throw new ApiError(meta.errors.noSuchRole);
}

const limit = ps.limit + (ps.untilId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const limit = ps.limit + (ps.untilId ? 1 : 0) + (ps.sinceId ? 1 : 0); // untilIdに指定したものも含まれるため+1
const noteIdsRes = await this.redisClient.xrevrange(
`roleTimeline:${role.id}`,
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : '+',
'-',
ps.untilId ? this.idService.parse(ps.untilId).date.getTime() : ps.untilDate ?? '+',
ps.sinceId ? this.idService.parse(ps.sinceId).date.getTime() : ps.sinceDate ?? '-',
'COUNT', limit);

if (noteIdsRes.length === 0) {
return [];
}

const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId);
const noteIds = noteIdsRes.map(x => x[1][1]).filter(x => x !== ps.untilId && x !== ps.sinceId);

if (noteIds.length === 0) {
return [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ export const paramDef = {
],
} as const;

// TODO: avatar,bannerをJOINしたいけどエラーになる

// eslint-disable-next-line import/no-default-export
@Injectable()
export default class extends Endpoint<typeof meta, typeof paramDef> {
Expand Down
12 changes: 6 additions & 6 deletions packages/frontend/.storybook/generate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ function toStories(component: string): string {
.replace(/[-.]|^(?=\d)/g, '_')
.replace(/(?<=^[^A-Z_]*$)/, '_')}
/> as estree.Identifier;
const parameters = (
const parameters =
<object-expression
properties={[
<property
Expand All @@ -137,9 +137,8 @@ function toStories(component: string): string {
]
: []),
]}
/>
) as estree.ObjectExpression;
const program = (
/> as estree.ObjectExpression;
const program =
<program
body={[
<import-declaration
Expand Down Expand Up @@ -379,11 +378,11 @@ function toStories(component: string): string {
declaration={(<identifier name='meta' />) as estree.Identifier}
/> as estree.ExportDefaultDeclaration,
]}
/>
) as estree.Program;
/> as estree.Program;
return format(
'/* eslint-disable @typescript-eslint/explicit-function-return-type */\n' +
'/* eslint-disable import/no-default-export */\n' +
'/* eslint-disable import/no-duplicates */\n' +
generate(program, { generator }) +
(hasImplStories ? readFileSync(`${implStories}.ts`, 'utf-8') : ''),
{
Expand All @@ -397,6 +396,7 @@ function toStories(component: string): string {
// glob('src/{components,pages,ui,widgets}/**/*.vue')
Promise.all([
glob('src/components/global/*.vue'),
glob('src/components/Mk{A,B}*.vue'),
glob('src/components/MkGalleryPostPreview.vue'),
glob('src/pages/user/home.vue'),
])
Expand Down
10 changes: 10 additions & 0 deletions packages/frontend/.storybook/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ export const onUnhandledRequest = ((req, print) => {
}) satisfies SharedOptions['onUnhandledRequest'];

export const commonHandlers = [
rest.get('/fluent-emoji/:codepoints.png', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://raw.githubusercontent.com/misskey-dev/emojis/main/dist/${codepoints}.png`).then((response) => response.blob());
return res(ctx.set('Content-Type', 'image/png'), ctx.body(value));
}),
rest.get('/fluent-emojis/:codepoints.png', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://raw.githubusercontent.com/misskey-dev/emojis/main/dist/${codepoints}.png`).then((response) => response.blob());
return res(ctx.set('Content-Type', 'image/png'), ctx.body(value));
}),
rest.get('/twemoji/:codepoints.svg', async (req, res, ctx) => {
const { codepoints } = req.params;
const value = await fetch(`https://unpkg.com/@discordapp/[email protected]/dist/svg/${codepoints}.svg`).then((response) => response.blob());
Expand Down
2 changes: 2 additions & 0 deletions packages/frontend/.storybook/preview-head.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true" as="image" type="image/png" crossorigin="anonymous">
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true" as="image" type="image/jpeg" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/@tabler/[email protected]/tabler-icons.min.css">
<link rel="stylesheet" href="https://unpkg.com/@fontsource/m-plus-rounded-1c/index.css">
<style>
Expand Down
Loading

0 comments on commit bbba5c5

Please sign in to comment.