Merge branch 'develop' into mfm-nyaize-optin
This commit is contained in:
commit
394e89feb6
|
|
@ -23,8 +23,12 @@
|
||||||
- 外部サイトでの実装が必要です。詳細は Misskey Hub をご覧ください
|
- 外部サイトでの実装が必要です。詳細は Misskey Hub をご覧ください
|
||||||
https://misskey-hub.net/docs/advanced/publish-on-your-website.html
|
https://misskey-hub.net/docs/advanced/publish-on-your-website.html
|
||||||
- Feat: AiScript関数`Mk:nyaize()`が追加されました
|
- Feat: AiScript関数`Mk:nyaize()`が追加されました
|
||||||
|
- Enhance: データセーバー有効時はアニメーション付きのアバター画像が停止するように
|
||||||
|
- Enhance: プラグインを削除した際には、使用されていたアクセストークンも同時に削除されるようになりました
|
||||||
- Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正
|
- Fix: 投稿フォームでのユーザー変更がプレビューに反映されない問題を修正
|
||||||
- Fix: ユーザーページの ノート > ファイル付き タブにリプライが表示されてしまう
|
- Fix: ユーザーページの ノート > ファイル付き タブにリプライが表示されてしまう
|
||||||
|
- Fix: 「検索」MFMにおいて一部の検索キーワードが正しく認識されない問題を修正
|
||||||
|
- Fix: 一部の言語でMisskey Webがクラッシュする問題を修正
|
||||||
|
|
||||||
### Server
|
### Server
|
||||||
- Enhance: RedisへのTLのキャッシュをオフにできるように
|
- Enhance: RedisへのTLのキャッシュをオフにできるように
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,12 @@ export const paramDef = {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
properties: {
|
properties: {
|
||||||
tokenId: { type: 'string', format: 'misskey:id' },
|
tokenId: { type: 'string', format: 'misskey:id' },
|
||||||
|
token: { type: 'string' },
|
||||||
},
|
},
|
||||||
required: ['tokenId'],
|
anyOf: [
|
||||||
|
{ required: ['tokenId'] },
|
||||||
|
{ required: ['token'] },
|
||||||
|
],
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
|
|
@ -29,13 +33,24 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
private accessTokensRepository: AccessTokensRepository,
|
private accessTokensRepository: AccessTokensRepository,
|
||||||
) {
|
) {
|
||||||
super(meta, paramDef, async (ps, me) => {
|
super(meta, paramDef, async (ps, me) => {
|
||||||
const tokenExist = await this.accessTokensRepository.exist({ where: { id: ps.tokenId } });
|
if (ps.tokenId) {
|
||||||
|
const tokenExist = await this.accessTokensRepository.exist({ where: { id: ps.tokenId } });
|
||||||
|
|
||||||
if (tokenExist) {
|
if (tokenExist) {
|
||||||
await this.accessTokensRepository.delete({
|
await this.accessTokensRepository.delete({
|
||||||
id: ps.tokenId,
|
id: ps.tokenId,
|
||||||
userId: me.id,
|
userId: me.id,
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
} else if (ps.token) {
|
||||||
|
const tokenExist = await this.accessTokensRepository.exist({ where: { token: ps.token } });
|
||||||
|
|
||||||
|
if (tokenExist) {
|
||||||
|
await this.accessTokensRepository.delete({
|
||||||
|
token: ps.token,
|
||||||
|
userId: me.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,9 @@ const props = defineProps<{
|
||||||
const query = ref(props.q);
|
const query = ref(props.q);
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
window.open(`https://www.google.com/search?q=${query.value}`, '_blank');
|
const sp = new URLSearchParams();
|
||||||
|
sp.append('q', query.value);
|
||||||
|
window.open(`https://www.google.com/search?${sp.toString()}`, '_blank');
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,7 @@ const bound = $computed(() => props.link
|
||||||
? { to: userPage(props.user), target: props.target }
|
? { to: userPage(props.user), target: props.target }
|
||||||
: {});
|
: {});
|
||||||
|
|
||||||
const url = $computed(() => defaultStore.state.disableShowingAnimatedImages
|
const url = $computed(() => (defaultStore.state.disableShowingAnimatedImages || defaultStore.state.enableDataSaverMode)
|
||||||
? getStaticImageUrl(props.user.avatarUrl)
|
? getStaticImageUrl(props.user.avatarUrl)
|
||||||
: props.user.avatarUrl);
|
: props.user.avatarUrl);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,9 +77,11 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
|
|
||||||
const plugins = ref(ColdDeviceStorage.get('plugins'));
|
const plugins = ref(ColdDeviceStorage.get('plugins'));
|
||||||
|
|
||||||
function uninstall(plugin) {
|
async function uninstall(plugin) {
|
||||||
ColdDeviceStorage.set('plugins', plugins.value.filter(x => x.id !== plugin.id));
|
ColdDeviceStorage.set('plugins', plugins.value.filter(x => x.id !== plugin.id));
|
||||||
os.success();
|
await os.apiWithDialog('i/revoke-token', {
|
||||||
|
token: plugin.token,
|
||||||
|
});
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
unisonReload();
|
unisonReload();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,41 @@
|
||||||
import { lang } from '@/config.js';
|
import { lang } from '@/config.js';
|
||||||
|
|
||||||
export const versatileLang = (lang ?? 'ja-JP').replace('ja-KS', 'ja-JP');
|
export const versatileLang = (lang ?? 'ja-JP').replace('ja-KS', 'ja-JP');
|
||||||
export const dateTimeFormat = new Intl.DateTimeFormat(versatileLang, {
|
|
||||||
year: 'numeric',
|
let _dateTimeFormat: Intl.DateTimeFormat;
|
||||||
month: 'numeric',
|
try {
|
||||||
day: 'numeric',
|
_dateTimeFormat = new Intl.DateTimeFormat(versatileLang, {
|
||||||
hour: 'numeric',
|
year: 'numeric',
|
||||||
minute: 'numeric',
|
month: 'numeric',
|
||||||
second: 'numeric',
|
day: 'numeric',
|
||||||
});
|
hour: 'numeric',
|
||||||
export const numberFormat = new Intl.NumberFormat(versatileLang);
|
minute: 'numeric',
|
||||||
|
second: 'numeric',
|
||||||
|
});
|
||||||
|
} catch (err) {
|
||||||
|
console.warn(err);
|
||||||
|
if (_DEV_) console.log('[Intl] Fallback to en-US');
|
||||||
|
|
||||||
|
// Fallback to en-US
|
||||||
|
_dateTimeFormat = new Intl.DateTimeFormat('en-US', {
|
||||||
|
year: 'numeric',
|
||||||
|
month: 'numeric',
|
||||||
|
day: 'numeric',
|
||||||
|
hour: 'numeric',
|
||||||
|
minute: 'numeric',
|
||||||
|
second: 'numeric',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
export const dateTimeFormat = _dateTimeFormat;
|
||||||
|
|
||||||
|
let _numberFormat: Intl.NumberFormat;
|
||||||
|
try {
|
||||||
|
_numberFormat = new Intl.NumberFormat(versatileLang);
|
||||||
|
} catch (err) {
|
||||||
|
console.warn(err);
|
||||||
|
if (_DEV_) console.log('[Intl] Fallback to en-US');
|
||||||
|
|
||||||
|
// Fallback to en-US
|
||||||
|
_numberFormat = new Intl.NumberFormat('en-US');
|
||||||
|
}
|
||||||
|
export const numberFormat = _numberFormat;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue