• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 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 Constants from '../constant';
17
18@Component
19struct EncryptingPanel {
20  @Link processing: boolean;
21
22  build() {
23    if (this.processing) {
24      Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center,
25        direction: FlexDirection.Column }) {
26        Flex({ alignItems: ItemAlign.Center, justifyContent: FlexAlign.Center }) {
27          Column() {
28            Row() {
29              Text($r('app.string.header_title'))
30                .fontWeight(FontWeight.Medium)
31                .fontFamily($r('app.string.typeface'))
32                .fontColor($r('sys.color.ohos_id_color_text_primary'))
33                .fontSize(Constants.HEADER_TEXT_FRONT_SIZE)
34                .lineHeight(Constants.HEADER_TEXT_LINE_HEIGHT)
35                .width(Constants.HEADER_TEXT_WIDTH)
36                .align(Alignment.Start)
37            }
38            .width(Constants.HEADER_COLUMN_WIDTH)
39            .height(Constants.HEADER_COLUMN_HEIGHT)
40            .padding({
41              left: Constants.HEADER_COLUMN_PADDING_LEFT,
42              right: Constants.HEADER_COLUMN_PADDING_RIGHT
43            })
44
45            Row() {
46              LoadingProgress()
47                .color(Color.Blue)
48                .height(Constants.ENCRYPTION_LOADING_ICON_HEIGHT)
49                .width(Constants.ENCRYPTION_LOADING_ICON_HEIGHT)
50            }
51
52            Row() {
53              Text($r('app.string.encryption_loading_title'))
54                .fontSize($r('sys.float.ohos_id_text_size_body1'))
55                .fontColor(0xCCCCCC)
56                .width(Constants.HEADER_TEXT_WIDTH)
57                .textAlign(TextAlign.Center)
58            }
59          }
60          .width(Constants.HEADER_COLUMN_WIDTH)
61          .height(Constants.ENCRYPTION_LOADING_HEIGHT)
62          .backgroundColor($r('app.color.da_button_color'))
63          .borderRadius(Constants.INDEX_BORDER_RADIUS)
64        }
65      }
66    }
67  }
68}
69
70export { EncryptingPanel };
71