Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] develop from misskey-dev:develop #27

Merged
merged 12 commits into from
Jan 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
12 commits
Select commit Hold shift + click to select a range
6229958
2025 (#15203)
kakkokari-gtyih Jan 4, 2025
6649e58
enhance(frontend): ワードミュート・ハードワードミュートの説明を追加 (#15207)
kakkokari-gtyih Jan 4, 2025
79b3d2a
pg_bigmが利用できるよう、ノートの検索をILIKE演算子でなくLIKE演算子でLOWER()をかけたテキストに対して行うように (#…
yuba Jan 4, 2025
f4e0251
fix(frontend/AiScript): Ui:C:selectの値が切り替わらない問題を修正 (#15184)
kakkokari-gtyih Jan 4, 2025
020882e
fix(backend): アプリ作成方式で作成したトークンの権限を表示するように (#15177)
4ster1sk Jan 4, 2025
574034a
fix(frontend): MiAuth認可画面で、認可処理に失敗した場合でもコールバックURLに遷移してしまう問題を修正 (#15154)
kakkokari-gtyih Jan 4, 2025
84bf90d
Chore: Docker内のDebianのバージョンを上げる(bookworm) (#15073)
kanarikanaru Jan 4, 2025
faea401
fix(frontend): ノート検索が使用できない場合でもチャンネルのノート検索欄がでていた問題を修正 (#15082)
kakkokari-gtyih Jan 4, 2025
256560e
enhance(frontend/aiscript): セーブ内容を削除できるMk:removeを追加 (#15158)
kakkokari-gtyih Jan 4, 2025
1fbc129
fix(frontend): ファイルの添付可能数を超えたらノートボタンを押せないように (#15126)
kakkokari-gtyih Jan 4, 2025
4120c9a
fix(frontend): アカウント一覧画面で、ユーザー情報の取得に失敗したアカウントが表示されない問題を修正 (#15183)
kakkokari-gtyih Jan 4, 2025
6c9eea2
[ci skip] Update CHANGELOG.md (書き方を揃える)
kakkokari-gtyih Jan 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/01_bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ body:
* Model and OS of the device(s): MacBook Pro (14inch, 2021), macOS Ventura 13.4
* Browser: Chrome 113.0.5672.126
* Server URL: misskey.example.com
* Misskey: 2024.x.x
* Misskey: 2025.x.x
value: |
* Model and OS of the device(s):
* Browser:
Expand All @@ -74,7 +74,7 @@ body:
Examples:
* Installation Method or Hosting Service: docker compose, k8s/docker, systemd, "Misskey install shell script", development environment
* Misskey: 2024.x.x
* Misskey: 2025.x.x
* Node: 20.x.x
* PostgreSQL: 15.x.x
* Redis: 7.x.x
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,22 @@
- Enhance: PC画面でチャンネルが複数列で表示されるように
(Cherry-picked from https://github.com/Otaku-Social/maniakey/pull/13)
- Enhance: 照会に失敗した場合、その理由を表示するように
- Enhance: AiScriptのセーブデータを明示的に削除する関数`Mk:remove`を追加
- Fix: 画面サイズが変わった際にナビゲーションバーが自動で折りたたまれない問題を修正
- Fix: サーバー情報メニューに区切り線が不足していたのを修正
- Fix: ノートがログインしているユーザーしか見れない場合にログインダイアログを閉じるとその後の動線がなくなる問題を修正
- Fix: 公開範囲がホームのノートの埋め込みウィジェットが読み込まれない問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/803)
- Fix: 絵文字管理画面で一部の絵文字が表示されない問題を修正
- Fix: ノート検索が使用できない場合でもチャンネルのノート検索欄がでていた問題を修正
- Fix: `Ui:C:select`で値の変更が画面に反映されない問題を修正
- Fix: MiAuth認可画面で、認可処理に失敗した場合でもコールバックURLに遷移してしまう問題を修正
(Cherry-picked from https://github.com/TeamNijimiss/misskey/commit/800359623e41a662551d774de15b0437b6849bb4)
- Fix: ノート作成画面でファイルの添付可能個数を超えてもノートボタンが押せていた問題を修正
- Fix: 「アカウントを管理」画面で、ユーザー情報の取得に失敗したアカウント(削除されたアカウントなど)が表示されない問題を修正

### Server
- Enhance: pg_bigmが利用できるよう、ノートの検索をILIKE演算子でなくLIKE演算子でLOWER()をかけたテキストに対して行うように
- Fix: ユーザーのプロフィール画面をアドレス入力などで直接表示した際に概要タブの描画に失敗する問題の修正( #15032 )
- Fix: 起動前の疎通チェックが機能しなくなっていた問題を修正
(Cherry-picked from https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/737)
Expand Down
2 changes: 1 addition & 1 deletion COPYING
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Unless otherwise stated this repository is
Copyright © 2014-2024 syuilo and contributors
Copyright © 2014-2025 syuilo and contributors

And is distributed under The GNU Affero General Public License Version 3, you should have received a copy of the license file as LICENSE.

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# syntax = docker/dockerfile:1.4

ARG NODE_VERSION=22.11.0-bullseye
ARG NODE_VERSION=22.11.0-bookworm

# build assets & compile TypeScript

Expand Down
8 changes: 8 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2754,10 +2754,18 @@ export interface Locale extends ILocale {
* ワードミュート
*/
"wordMute": string;
/**
* 指定した語句を含むノートを最小化します。最小化されたノートをクリックすることで表示することができます。
*/
"wordMuteDescription": string;
/**
* ハードワードミュート
*/
"hardWordMute": string;
/**
* 指定した語句を含むノートを隠します。ワードミュートとは異なり、ノートは完全に表示されなくなります。
*/
"hardWordMuteDescription": string;
/**
* 正規表現エラー
*/
Expand Down
2 changes: 2 additions & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,9 @@ smtpSecure: "SMTP 接続に暗黙的なSSL/TLSを使用する"
smtpSecureInfo: "STARTTLS使用時はオフにします。"
testEmail: "配信テスト"
wordMute: "ワードミュート"
wordMuteDescription: "指定した語句を含むノートを最小化します。最小化されたノートをクリックすることで表示することができます。"
hardWordMute: "ハードワードミュート"
hardWordMuteDescription: "指定した語句を含むノートを隠します。ワードミュートとは異なり、ノートは完全に表示されなくなります。"
regexpError: "正規表現エラー"
regexpErrorDescription: "{tab}ワードミュートの{line}行目の正規表現にエラーが発生しました:"
instanceMute: "サーバーミュート"
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/core/SearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export class SearchService {
}

query
.andWhere('note.text ILIKE :q', { q: `%${ sqlLikeEscape(q) }%` })
.andWhere('LOWER(note.text) LIKE :q', { q: `%${ sqlLikeEscape(q.toLowerCase()) }%` })
.innerJoinAndSelect('note.user', 'user')
.leftJoinAndSelect('note.reply', 'reply')
.leftJoinAndSelect('note.renote', 'renote')
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/server/api/endpoints/i/apps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
name: token.name ?? token.app?.name,
createdAt: this.idService.parse(token.id).date.toISOString(),
lastUsedAt: token.lastUsedAt?.toISOString(),
permission: token.permission,
permission: token.app ? token.app.permission : token.permission,
})));
});
}
Expand Down
19 changes: 14 additions & 5 deletions packages/frontend/src/components/MkAsUi.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<template v-if="c.label" #label>{{ c.label }}</template>
<template v-if="c.caption" #caption>{{ c.caption }}</template>
</MkInput>
<MkSelect v-else-if="c.type === 'select'" :small="size === 'small'" :modelValue="c.default ?? null" @update:modelValue="c.onChange">
<MkSelect v-else-if="c.type === 'select'" :small="size === 'small'" :modelValue="valueForSelect" @update:modelValue="onSelectUpdate">
<template v-if="c.label" #label>{{ c.label }}</template>
<template v-if="c.caption" #caption>{{ c.caption }}</template>
<option v-for="item in c.items" :key="item.value" :value="item.value">{{ item.text }}</option>
Expand Down Expand Up @@ -77,16 +77,16 @@ import MkPostForm from '@/components/MkPostForm.vue';
const props = withDefaults(defineProps<{
component: AsUiComponent;
components: Ref<AsUiComponent>[];
size: 'small' | 'medium' | 'large';
align: 'left' | 'center' | 'right';
size?: 'small' | 'medium' | 'large';
align?: 'left' | 'center' | 'right';
}>(), {
size: 'medium',
align: 'left',
});

const c = props.component;

function g(id) {
function g(id: string) {
const v = props.components.find(x => x.value.id === id)?.value;
if (v) return v;

Expand Down Expand Up @@ -122,13 +122,22 @@ const containerStyle = computed(() => {

const valueForSwitch = ref('default' in c && typeof c.default === 'boolean' ? c.default : false);

function onSwitchUpdate(v) {
function onSwitchUpdate(v: boolean) {
valueForSwitch.value = v;
if ('onChange' in c && c.onChange) {
c.onChange(v as never);
}
}

const valueForSelect = ref('default' in c && typeof c.default !== 'boolean' ? c.default ?? null : null);

function onSelectUpdate(v) {
valueForSelect.value = v;
if ('onChange' in c && c.onChange) {
c.onChange(v as never);
}
}

function openPostForm() {
const form = (c as AsUiPostFormButton).form;
if (!form) return;
Expand Down
1 change: 1 addition & 0 deletions packages/frontend/src/components/MkPostForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ const canPost = computed((): boolean => {
quoteId.value != null
) &&
(textLength.value <= maxTextLength.value) &&
(files.value.length <= 16) &&
(!poll.value || poll.value.choices.length >= 2);
});

Expand Down
8 changes: 7 additions & 1 deletion packages/frontend/src/components/MkPostFormAttaches.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</template>
</Sortable>
<p :class="$style.remain">{{ 16 - props.modelValue.length }}/16</p>
<p :class="[$style.remain, {
[$style.exceeded]: props.modelValue.length > 16,
}]">{{ 16 - props.modelValue.length }}/16</p>
</div>
</template>

Expand Down Expand Up @@ -239,5 +241,9 @@ function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent | Keyboar
margin: 0;
padding: 0;
font-size: 90%;

&.exceeded {
color: var(--MI_THEME-error);
}
}
</style>
6 changes: 5 additions & 1 deletion packages/frontend/src/pages/channel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkNotes :pagination="featuredPagination"/>
</div>
<div v-else-if="tab === 'search'" key="search">
<div class="_gaps">
<div v-if="notesSearchAvailable" class="_gaps">
<div>
<MkInput v-model="searchQuery" @enter="search()">
<template #prefix><i class="ti ti-search"></i></template>
Expand All @@ -54,6 +54,9 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
<MkNotes v-if="searchPagination" :key="searchKey" :pagination="searchPagination"/>
</div>
<div v-else>
<MkInfo warn>{{ i18n.ts.notesSearchNotAvailable }}</MkInfo>
</div>
</div>
</MkHorizontalSwipe>
</MkSpacer>
Expand Down Expand Up @@ -94,6 +97,7 @@ import MkHorizontalSwipe from '@/components/MkHorizontalSwipe.vue';
import { PageHeaderItem } from '@/types/page-header.js';
import { isSupportShare } from '@/scripts/navigator.js';
import { copyToClipboard } from '@/scripts/copy-to-clipboard.js';
import { notesSearchAvailable } from '@/scripts/check-permissions.js';
import { miLocalStorage } from '@/local-storage.js';
import { useRouter } from '@/router/supplier.js';

Expand Down
20 changes: 10 additions & 10 deletions packages/frontend/src/pages/miauth.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,18 @@ async function onAccept(token: string) {
name: props.name,
iconUrl: props.icon,
permission: _permissions.value,
}, token).catch(() => {
}, token).then(() => {
if (props.callback && props.callback !== '') {
const cbUrl = new URL(props.callback);
if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:', 'vbscript:'].includes(cbUrl.protocol)) throw new Error('invalid url');
cbUrl.searchParams.set('session', props.session);
location.href = cbUrl.toString();
} else {
authRoot.value?.showUI('success');
}
}).catch(() => {
authRoot.value?.showUI('failed');
});

if (props.callback && props.callback !== '') {
const cbUrl = new URL(props.callback);
if (['javascript:', 'file:', 'data:', 'mailto:', 'tel:', 'vbscript:'].includes(cbUrl.protocol)) throw new Error('invalid url');
cbUrl.searchParams.set('session', props.session);
location.href = cbUrl.toString();
} else {
authRoot.value?.showUI('success');
}
}

function onDeny() {
Expand Down
107 changes: 87 additions & 20 deletions packages/frontend/src/pages/settings/accounts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkButton @click="init"><i class="ti ti-refresh"></i> {{ i18n.ts.reloadAccountsList }}</MkButton>
</div>

<MkUserCardMini v-for="user in accounts" :key="user.id" :user="user" :class="$style.user" @click.prevent="menu(user, $event)"/>
<template v-for="[id, user] in accounts">
<MkUserCardMini v-if="user != null" :key="user.id" :user="user" :class="$style.user" @click.prevent="menu(user, $event)"/>
<button v-else v-panel class="_button" :class="$style.unknownUser" @click="menu(id, $event)">
<div :class="$style.unknownUserAvatarMock"><i class="ti ti-user-question"></i></div>
<div>
<div :class="$style.unknownUserTitle">{{ i18n.ts.unknown }}</div>
<div :class="$style.unknownUserSub">ID: <span class="_monospace">{{ id }}</span></div>
</div>
</button>
</template>
</div>
</FormSuspense>
</div>
Expand All @@ -29,9 +38,10 @@ import { getAccounts, removeAccount as _removeAccount, login, $i, getAccountWith
import { i18n } from '@/i18n.js';
import { definePageMetadata } from '@/scripts/page-metadata.js';
import MkUserCardMini from '@/components/MkUserCardMini.vue';
import { MenuItem } from '@/types/menu';

const storedAccounts = ref<{ id: string, token: string }[] | null>(null);
const accounts = ref<Misskey.entities.UserDetailed[]>([]);
const accounts = ref(new Map<string, Misskey.entities.UserDetailed | null>());

const init = async () => {
getAccounts().then(accounts => {
Expand All @@ -41,21 +51,35 @@ const init = async () => {
userIds: storedAccounts.value.map(x => x.id),
});
}).then(response => {
accounts.value = response;
if (storedAccounts.value == null) return;
accounts.value = new Map(storedAccounts.value.map(x => [x.id, response.find((y: Misskey.entities.UserDetailed) => y.id === x.id) ?? null]));
});
};

function menu(account: Misskey.entities.UserDetailed, ev: MouseEvent) {
os.popupMenu([{
text: i18n.ts.switch,
icon: 'ti ti-switch-horizontal',
action: () => switchAccount(account),
}, {
text: i18n.ts.logout,
icon: 'ti ti-trash',
danger: true,
action: () => removeAccount(account),
}], ev.currentTarget ?? ev.target);
function menu(account: Misskey.entities.UserDetailed | string, ev: MouseEvent) {
let menu: MenuItem[];

if (typeof account === 'string') {
menu = [{
text: i18n.ts.logout,
icon: 'ti ti-trash',
danger: true,
action: () => removeAccount(account),
}];
} else {
menu = [{
text: i18n.ts.switch,
icon: 'ti ti-switch-horizontal',
action: () => switchAccount(account.id),
}, {
text: i18n.ts.logout,
icon: 'ti ti-trash',
danger: true,
action: () => removeAccount(account.id),
}];
}

os.popupMenu(menu, ev.currentTarget ?? ev.target);
}

function addAccount(ev: MouseEvent) {
Expand All @@ -68,9 +92,9 @@ function addAccount(ev: MouseEvent) {
}], ev.currentTarget ?? ev.target);
}

async function removeAccount(account: Misskey.entities.UserDetailed) {
await _removeAccount(account.id);
accounts.value = accounts.value.filter(x => x.id !== account.id);
async function removeAccount(id: string) {
await _removeAccount(id);
accounts.value.delete(id);
}

function addExistingAccount() {
Expand All @@ -90,9 +114,9 @@ function createAccount() {
});
}

async function switchAccount(account: Misskey.entities.UserDetailed) {
async function switchAccount(id: string) {
const fetchedAccounts = await getAccounts();
const token = fetchedAccounts.find(x => x.id === account.id)!.token;
const token = fetchedAccounts.find(x => x.id === id)!.token;
switchAccountWithToken(token);
}

Expand All @@ -112,6 +136,49 @@ definePageMetadata(() => ({

<style lang="scss" module>
.user {
cursor: pointer;
cursor: pointer;
}

.unknownUser {
display: flex;
align-items: center;
text-align: start;
padding: 16px;
background: var(--MI_THEME-panel);
border-radius: 8px;
font-size: 0.9em;
}

.unknownUserAvatarMock {
display: block;
width: 34px;
height: 34px;
line-height: 34px;
text-align: center;
font-size: 16px;
margin-right: 12px;
background-color: color-mix(in srgb, var(--MI_THEME-fg), transparent 85%);
color: color-mix(in srgb, var(--MI_THEME-fg), transparent 25%);
border-radius: 50%;
}

.unknownUserTitle {
display: block;
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 18px;
}

.unknownUserSub {
display: block;
width: 100%;
font-size: 95%;
opacity: 0.7;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 16px;
}
</style>
Loading
Loading