1c36cf2e9Sopenharmony_ci/* 2c36cf2e9Sopenharmony_ci * Copyright (c) 2023-2023 Huawei Device Co., Ltd. 3c36cf2e9Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4c36cf2e9Sopenharmony_ci * you may not use this file except in compliance with the License. 5c36cf2e9Sopenharmony_ci * You may obtain a copy of the License at 6c36cf2e9Sopenharmony_ci * 7c36cf2e9Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8c36cf2e9Sopenharmony_ci * 9c36cf2e9Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10c36cf2e9Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11c36cf2e9Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12c36cf2e9Sopenharmony_ci * See the License for the specific language governing permissions and 13c36cf2e9Sopenharmony_ci * limitations under the License. 14c36cf2e9Sopenharmony_ci */ 15c36cf2e9Sopenharmony_ci 16c36cf2e9Sopenharmony_ciimport { Log } from '@ohos/common'; 17c36cf2e9Sopenharmony_ciimport router from '@ohos.router'; 18c36cf2e9Sopenharmony_ci 19c36cf2e9Sopenharmony_ciconst TAG = 'AboutPageComponent' 20c36cf2e9Sopenharmony_ci@Component 21c36cf2e9Sopenharmony_ciexport struct AboutPageComponent { 22c36cf2e9Sopenharmony_ci @State bckColor: Resource = $r('app.color.preview_background_color'); 23c36cf2e9Sopenharmony_ci 24c36cf2e9Sopenharmony_ci build(){ 25c36cf2e9Sopenharmony_ci Image($r('app.media.ic_public_detail')).width($r('app.float.image_comp_width')).height($r('app.float.image_comp_height')) 26c36cf2e9Sopenharmony_ci .onClick(() => { 27c36cf2e9Sopenharmony_ci Log.info(TAG, 'PrivacyStatementPage onClick'); 28c36cf2e9Sopenharmony_ci router.pushUrl({ 29c36cf2e9Sopenharmony_ci url: 'pages/AboutPage' 30c36cf2e9Sopenharmony_ci }) 31c36cf2e9Sopenharmony_ci }) 32c36cf2e9Sopenharmony_ci .backgroundColor(this.bckColor) 33c36cf2e9Sopenharmony_ci .clip(new Circle({width: 24, height: 24})).onTouch((event) => { 34c36cf2e9Sopenharmony_ci Log.info("ClickableImage", "event.type: " + JSON.stringify(event.type)); 35c36cf2e9Sopenharmony_ci if (event.type === TouchType.Down) { 36c36cf2e9Sopenharmony_ci this.bckColor = $r('sys.color.ohos_fa_click_effect') 37c36cf2e9Sopenharmony_ci } else if (event.type === TouchType.Up) { 38c36cf2e9Sopenharmony_ci Log.info("ClickableImage", "onTouch is Up"); 39c36cf2e9Sopenharmony_ci this.bckColor = $r('app.color.preview_background_color'); 40c36cf2e9Sopenharmony_ci } 41c36cf2e9Sopenharmony_ci }) 42c36cf2e9Sopenharmony_ci } 43c36cf2e9Sopenharmony_ci}