• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2022-2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16import router from '@ohos.router';
17import {
18  BroadCast,
19  BroadCastConstants,
20  BroadCastManager,
21  BrowserConstants,
22  Log
23} from '@ohos/common';
24import { MediaOperationBasePage } from '@ohos/common/CommonComponents';
25
26const TAG: string = 'MediaOperationPage';
27
28@Entry
29@Component
30struct MediaOperationPage {
31  private appBroadCast: BroadCast = BroadCastManager.getInstance().getBroadCast();
32
33  onBackPress() {
34    Log.info(TAG, 'onBackPress');
35    router.back({
36      url: '',
37      params: {}
38    });
39    return true;
40  }
41
42  onPageShow() {
43    this.appBroadCast.emit(BroadCastConstants.THIRD_ROUTE_PAGE, []);
44  }
45
46  build() {
47    Column() {
48      MediaOperationBasePage()
49    }
50  }
51
52  pageTransition() {
53    PageTransitionExit({ duration: BrowserConstants.OPERATION_EXIT_ANIMATION_DURATION })
54      .opacity(0)
55      .slide(SlideEffect.Right)
56  }
57}