-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into KisaragiEffective-patch-1
- Loading branch information
Showing
11 changed files
with
126 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,10 +13,12 @@ jobs: | |
runs-on: ubuntu-latest | ||
env: | ||
DOCKER_CONTENT_TRUST: 1 | ||
DOCKLE_VERSION: 0.4.14 | ||
steps: | ||
- uses: actions/[email protected] | ||
- run: | | ||
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v0.4.10/dockle_0.4.10_Linux-64bit.deb" | ||
- name: Download and install dockle v${{ env.DOCKLE_VERSION }} | ||
run: | | ||
curl -L -o dockle.deb "https://github.com/goodwithtech/dockle/releases/download/v${DOCKLE_VERSION}/dockle_${DOCKLE_VERSION}_Linux-64bit.deb" | ||
sudo dpkg -i dockle.deb | ||
- run: | | ||
cp .config/docker_example.env .config/docker.env | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
packages/frontend/src/components/MkInstanceCardMini.stories.impl.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* SPDX-FileCopyrightText: syuilo and misskey-project | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
*/ | ||
|
||
/* eslint-disable @typescript-eslint/explicit-function-return-type */ | ||
import { StoryObj } from '@storybook/vue3'; | ||
import { HttpResponse, http } from 'msw'; | ||
import { federationInstance } from '../../.storybook/fakes.js'; | ||
import { commonHandlers } from '../../.storybook/mocks.js'; | ||
import MkInstanceCardMini from './MkInstanceCardMini.vue'; | ||
import { getChartResolver } from './MkChart.stories.impl.js'; | ||
export const Default = { | ||
render(args) { | ||
return { | ||
components: { | ||
MkInstanceCardMini, | ||
}, | ||
setup() { | ||
return { | ||
args, | ||
}; | ||
}, | ||
computed: { | ||
props() { | ||
return { | ||
...this.args, | ||
}; | ||
}, | ||
}, | ||
template: '<MkInstanceCardMini v-bind="props" />', | ||
}; | ||
}, | ||
args: { | ||
instance: federationInstance(), | ||
}, | ||
parameters: { | ||
layout: 'centered', | ||
msw: { | ||
handlers: [ | ||
...commonHandlers, | ||
http.get('/undefined/preview.webp', async ({ request }) => { | ||
const urlStr = new URL(request.url).searchParams.get('url'); | ||
if (urlStr == null) { | ||
return new HttpResponse(null, { status: 404 }); | ||
} | ||
const url = new URL(urlStr); | ||
|
||
if (url.href.startsWith('https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/')) { | ||
const image = await (await fetch(`client-assets/${url.pathname.split('/').pop()}`)).blob(); | ||
return new HttpResponse(image, { | ||
headers: { | ||
'Content-Type': 'image/jpeg', | ||
}, | ||
}); | ||
} else { | ||
return new HttpResponse(null, { status: 404 }); | ||
} | ||
}), | ||
http.get('/api/charts/instance', getChartResolver(['requests.received'])), | ||
], | ||
}, | ||
}, | ||
} satisfies StoryObj<typeof MkInstanceCardMini>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters