Compare commits

...

6 Commits

Author SHA1 Message Date
anatawa12 ce75a3207c
Merge branch 'develop' into report-renote-abuse 2023-08-22 17:35:23 +09:00
dependabot[bot] e82c2e7cf9
build(deps): bump cypress-io/github-action from 5 to 6 (#11758)
Bumps [cypress-io/github-action](https://github.com/cypress-io/github-action) from 5 to 6.
- [Release notes](https://github.com/cypress-io/github-action/releases)
- [Changelog](https://github.com/cypress-io/github-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/github-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: cypress-io/github-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-22 15:58:10 +09:00
syuilo 717dffe61e Update misskey-js.api.md 2023-08-22 15:57:45 +09:00
maguroshouta cb80dff7df
x.comでも展開ができるように (#11757) 2023-08-22 15:56:36 +09:00
anatawa12 14d80b5398
fix: abuse menu without actual selection shown 2023-08-22 15:13:23 +09:00
anatawa12 f08babba65
chore: remove copy/report renote from note menu 2023-08-22 15:12:35 +09:00
5 changed files with 17 additions and 7 deletions

View File

@ -101,7 +101,7 @@ jobs:
- name: Cypress install
run: pnpm exec cypress install
- name: Cypress run
uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v6
with:
install: false
start: pnpm start:test

View File

@ -133,7 +133,7 @@ let unknownUrl = $ref(false);
const requestUrl = new URL(props.url);
if (!['http:', 'https:'].includes(requestUrl.protocol)) throw new Error('invalid url');
if (requestUrl.hostname === 'twitter.com' || requestUrl.hostname === 'mobile.twitter.com') {
if (requestUrl.hostname === 'twitter.com' || requestUrl.hostname === 'mobile.twitter.com' || requestUrl.hostname === 'x.com' || requestUrl.hostname === 'mobile.x.com') {
const m = requestUrl.pathname.match(/^\/.+\/status(?:es)?\/(\d+)/);
if (m) tweetId = m[1];
}

View File

@ -292,7 +292,6 @@ export function getNoteMenu(props: {
text: i18n.ts.copyContent,
action: copyContent,
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
, (isRenote ? getCopyNoteLinkMenu(props.note, i18n.ts.copyLinkRenote) : undefined)
, (appearNote.url || appearNote.uri) ? {
icon: 'ti ti-external-link',
text: i18n.ts.showOnRemote,
@ -365,10 +364,9 @@ export function getNoteMenu(props: {
}]
: []
),*/
...(appearNote.userId !== $i.id || (isRenote && props.note.userId !== $i.id) ? [
...(appearNote.userId !== $i.id ? [
null,
appearNote.userId !== $i.id ? getAbuseNoteMenu(appearNote, i18n.ts.reportAbuse) : undefined,
isRenote && props.note.userId !== $i.id ? getAbuseNoteMenu(props.note, i18n.ts.reportAbuseRenote) : undefined,
]
: []
),
@ -398,7 +396,6 @@ export function getNoteMenu(props: {
text: i18n.ts.copyContent,
action: copyContent,
}, getCopyNoteLinkMenu(appearNote, i18n.ts.copyLink)
, (isRenote ? getCopyNoteLinkMenu(props.note, i18n.ts.copyLinkRenote) : undefined)
, (appearNote.url || appearNote.uri) ? {
icon: 'ti ti-external-link',
text: i18n.ts.showOnRemote,

View File

@ -152,4 +152,13 @@ describe('MkUrlPreview', () => {
assert.strictEqual(iframe?.getAttribute('allow'), 'fullscreen;web-share');
assert.strictEqual(iframe?.getAttribute('sandbox'), 'allow-popups allow-scripts allow-same-origin');
});
test('Loading a post in iframe', async () => {
const iframe = await renderAndOpenPreview({
url: 'https://x.com/i/web/status/1685072521782325249',
});
assert.exists(iframe, 'iframe should exist');
assert.strictEqual(iframe?.getAttribute('allow'), 'fullscreen;web-share');
assert.strictEqual(iframe?.getAttribute('sandbox'), 'allow-popups allow-scripts allow-same-origin');
});
});

View File

@ -2172,6 +2172,10 @@ export type Endpoints = {
req: TODO;
res: TODO;
};
'users/flashs': {
req: TODO;
res: TODO;
};
'users/recommendation': {
req: TODO;
res: TODO;
@ -2822,7 +2826,7 @@ type UserSorting = '+follower' | '-follower' | '+createdAt' | '-createdAt' | '+u
//
// src/api.types.ts:16:32 - (ae-forgotten-export) The symbol "TODO" needs to be exported by the entry point index.d.ts
// src/api.types.ts:18:25 - (ae-forgotten-export) The symbol "NoParams" needs to be exported by the entry point index.d.ts
// src/api.types.ts:629:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/api.types.ts:630:18 - (ae-forgotten-export) The symbol "ShowUserReq" needs to be exported by the entry point index.d.ts
// src/streaming.types.ts:33:4 - (ae-forgotten-export) The symbol "FIXME" needs to be exported by the entry point index.d.ts
// (No @packageDocumentation comment for this package)