1/* 2 * Copyright (C) 2022 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 */ 15import router from '@system.router'; 16 17@Entry 18@Component 19struct Login { 20 build() { 21 Flex({ direction: FlexDirection.Column, alignItems: ItemAlign.Center, justifyContent: FlexAlign.Start }) { 22 Column() { 23 Image($r('app.media.logo')).width('100vp').height('100vp').margin({ top: '180vp' }) 24 Blank() 25 Text($r('app.string.login')) 26 .fontSize('22fp') 27 .fontColor($r('app.color.color_fff')) 28 .fontWeight(FontWeight.Bold) 29 .margin({ bottom: '150vp' }) 30 .border({ width: '1vp', color: $r('app.color.color_fff'), radius: '20vp' }) 31 .width('300vp') 32 .height('45vp') 33 .textAlign(TextAlign.Center) 34 .onClick(() => { 35 router.push({ uri: 'pages/MainPage' }) 36 }) 37 } 38 .width('100%') 39 .height('100%') 40 } 41 .width('100%') 42 .height('100%') 43 .linearGradient({ 44 angle: 135, 45 direction: GradientDirection.Left, 46 colors: [[$r("app.color.colorPrimary"), 0.0], [$r("app.color.colorPrimary"), 1.0]] 47 }) 48 } 49} 50 51