update resources

Signed-off-by: Jeam_wang <jeam.wangwei@huawei.com>
This commit is contained in:
Jeam_wang 2024-06-18 11:11:32 +08:00
parent bae9b8d8f7
commit 3d367c04fc
4 changed files with 5 additions and 5 deletions

View File

@ -71,10 +71,10 @@ Note:If the text contains special characters, please escape them according to th
name="services/dialog/PasteboardDialog/entry/src/main/resources/base/media/pasteboardImg.svg"
desc="hap svg image"/>
<filteritem type="filepath"
name="services/dialog/PasteboardDialog/entry/src/main/resources/rawfile/pasteboard.mp4"
name="services/dialog/PasteboardDialog/entry/src/main/resources/rawfile/clipboard.mp4"
desc="hap mp4"/>
<filteritem type="filepath"
name="services/dialog/PasteboardDialog/entry/src/main/resources/rawfile/pasteboard_dark.mp4"
name="services/dialog/PasteboardDialog/entry/src/main/resources/rawfile/clipboard_dark.mp4"
desc="hap mp4"/>
</filefilter>
</filefilterlist>

View File

@ -47,7 +47,7 @@ struct PasteboardSwitch {
@State imageHeight: number = 0;
@State textWidth: number = 0;
@State gapLength: number = 0;
@State videoSrc: Resource = $rawfile('pasteboard.mp4');
@State videoSrc: Resource = $rawfile('clipboard.mp4');
@State isShow: boolean = false;
@State portraitFunc: mediaQuery.MediaQueryResult | void | null = null;
private videoController: VideoController | undefined = undefined;
@ -58,10 +58,10 @@ struct PasteboardSwitch {
onPortrait(mediaQueryResult: mediaQuery.MediaQueryResult) {
console.log(TAG + 'onPortrait in');
if (mediaQueryResult.matches as boolean) {
this.videoSrc = $rawfile('pasteboard_dark.mp4');
this.videoSrc = $rawfile('clipboard_dark.mp4');
this.extContext?.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_DARK);
} else {
this.videoSrc = $rawfile('pasteboard.mp4');
this.videoSrc = $rawfile('clipboard.mp4');
this.extContext?.getApplicationContext().setColorMode(ConfigurationConstant.ColorMode.COLOR_MODE_LIGHT);
}
}