mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-23 04:51:49 +08:00
fix(electron): missing video (#4451)
This commit is contained in:
@@ -291,7 +291,7 @@ export const createConfiguration: (
|
|||||||
exclude: [/node_modules/],
|
exclude: [/node_modules/],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
test: /\.(png|jpg|gif|svg|webp)$/,
|
test: /\.(png|jpg|gif|svg|webp|mp4)$/,
|
||||||
type: 'asset/resource',
|
type: 'asset/resource',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,8 +17,10 @@ export default {
|
|||||||
let id = 0;
|
let id = 0;
|
||||||
const image = (
|
const image = (
|
||||||
<video autoPlay muted loop>
|
<video autoPlay muted loop>
|
||||||
<source src="/editingVideo.mp4" type="video/mp4" />
|
<source
|
||||||
<source src="/editingVideo.webm" type="video/webm" />
|
src="http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
|
||||||
|
type="video/mp4"
|
||||||
|
/>
|
||||||
</video>
|
</video>
|
||||||
);
|
);
|
||||||
export const Basic = () => {
|
export const Basic = () => {
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
|
/// <reference types="../../type.d.ts" />
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons';
|
import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons';
|
||||||
import { Modal, type ModalProps } from '@toeverything/components/modal';
|
import { Modal, type ModalProps } from '@toeverything/components/modal';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
import editingVideo from './editingVideo.mp4';
|
||||||
import {
|
import {
|
||||||
arrowStyle,
|
arrowStyle,
|
||||||
buttonDisableStyle,
|
buttonDisableStyle,
|
||||||
@@ -24,6 +26,7 @@ import {
|
|||||||
videoSlideStyle,
|
videoSlideStyle,
|
||||||
videoStyle,
|
videoStyle,
|
||||||
} from './index.css';
|
} from './index.css';
|
||||||
|
import switchVideo from './switchVideo.mp4';
|
||||||
|
|
||||||
export const TourModal = (props: ModalProps) => {
|
export const TourModal = (props: ModalProps) => {
|
||||||
const t = useAFFiNEI18N();
|
const t = useAFFiNEI18N();
|
||||||
@@ -92,8 +95,7 @@ export const TourModal = (props: ModalProps) => {
|
|||||||
})}
|
})}
|
||||||
data-testid="onboarding-modal-editing-video"
|
data-testid="onboarding-modal-editing-video"
|
||||||
>
|
>
|
||||||
<source src="/editingVideo.mp4" type="video/mp4" />
|
<source src={editingVideo} type="video/mp4" />
|
||||||
<source src="/editingVideo.webm" type="video/webm" />
|
|
||||||
</video>
|
</video>
|
||||||
)}
|
)}
|
||||||
<video
|
<video
|
||||||
@@ -106,8 +108,7 @@ export const TourModal = (props: ModalProps) => {
|
|||||||
})}
|
})}
|
||||||
data-testid="onboarding-modal-switch-video"
|
data-testid="onboarding-modal-switch-video"
|
||||||
>
|
>
|
||||||
<source src="/switchVideo.mp4" type="video/mp4" />
|
<source src={switchVideo} type="video/mp4" />
|
||||||
<source src="/switchVideo.webm" type="video/webm" />
|
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Vendored
+4
@@ -0,0 +1,4 @@
|
|||||||
|
declare module '*.mp4' {
|
||||||
|
const src: string;
|
||||||
|
export default src;
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig.json",
|
"extends": "../../tsconfig.json",
|
||||||
"exclude": ["lib"],
|
"exclude": ["lib"],
|
||||||
"include": ["./src/**/*", "./src/**/*.json"],
|
"include": ["./src/**/*", "./src/**/*.json", "./src/type.d.ts"],
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"composite": true,
|
"composite": true,
|
||||||
"noEmit": false,
|
"noEmit": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user