mirror of
https://github.com/openharmony/applications_systemui.git
synced 2026-07-20 03:58:57 -04:00
!138 systemui 手机ux适配-通知管理
Merge pull request !138 from matchZhou/master
This commit is contained in:
@@ -14,18 +14,20 @@
|
||||
*/
|
||||
|
||||
import StyleManager from './StyleManager';
|
||||
import deviceInfo from '@ohos.deviceInfo';
|
||||
|
||||
const TAG = 'Common-StyleConfiguration';
|
||||
const deviceTypeInfo = deviceInfo.deviceType
|
||||
|
||||
export default class StyleConfiguration {
|
||||
static getCommonStyle() {
|
||||
const key: string = TAG + "-Common";
|
||||
return StyleManager.getStyle(key, () => {
|
||||
return {
|
||||
statusBarFontSize: '16fp',
|
||||
statusBarFontSize: deviceTypeInfo === 'phone' ? '12fp' : '16fp',
|
||||
statusBarIconWidth: '24vp',
|
||||
statusBarIconHeight: '24vp',
|
||||
statusBarMarginLeftRight: '5vp',
|
||||
statusBarMarginLeftRight: deviceTypeInfo === 'phone' ? '0vp' : '5vp',
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
+43
-16
@@ -56,78 +56,104 @@ export default struct AppItemComponent {
|
||||
Text(this.appTitle)
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body1'))
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_3)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.margin({ top: $r('app.float.appitem_label_margin_t'), bottom: $r('app.float.appitem_label_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
top: $r('app.float.appitem_label_margin_t'),
|
||||
bottom: $r('app.float.appitem_label_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
Row() {
|
||||
if (this.appSwitch === 3) {
|
||||
if (parseInt(this.appValue) == 0) {
|
||||
Text($r('app.string.slot_unknown'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
} else if (parseInt(this.appValue) == 1) {
|
||||
Text($r('app.string.slot_social_communication'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
} else if (parseInt(this.appValue) == 2) {
|
||||
Text($r('app.string.slot_service_information'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
} else if (parseInt(this.appValue) == 3) {
|
||||
Text($r('app.string.slot_content_information'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
} else if (parseInt(this.appValue) == 0xFFFF) {
|
||||
Text($r('app.string.slot_other'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
} else {
|
||||
Text('')
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
}
|
||||
} else {
|
||||
Text($r('app.string.version'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
.visibility(Visibility.Visible)
|
||||
.margin({ bottom: $r('app.float.appitem_version_margin_b'), left: $r('app.float.page_notice_info_label_margin') });
|
||||
.margin({
|
||||
bottom: $r('app.float.appitem_version_margin_b'),
|
||||
left: $r('app.float.page_notice_info_label_margin')
|
||||
});
|
||||
Text(this.appSummary)
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
@@ -180,6 +206,7 @@ export default struct AppItemComponent {
|
||||
} else {
|
||||
Toggle({ type: ToggleType.Switch, isOn: this.canNotice })
|
||||
.align(Alignment.End)
|
||||
.selectedColor($r("app.color.font_color_007DFF"))
|
||||
.width($r('app.float.toggle_comp_width'))
|
||||
.height($r('app.float.toggle_comp_height'))
|
||||
.enabled(this.isCanChange)
|
||||
|
||||
@@ -43,7 +43,7 @@ struct HeadComponent {
|
||||
Text(this.headName)
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('app.float.page_phrases_tittle_font'))
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.width(ConfigData.WH_100_100)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
@@ -51,7 +51,6 @@ struct HeadComponent {
|
||||
}
|
||||
.width(ConfigData.WH_100_100)
|
||||
.height($r('app.float.page_title_height'))
|
||||
.margin({top:$r('app.float.page_header_margin_t')})
|
||||
.alignItems(VerticalAlign.Center)
|
||||
.align(Alignment.Start)
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ export default struct ItemComponent {
|
||||
.fontColor($r('app.color.itemComp_title_color'))
|
||||
.width(ConfigData.WH_45_100)
|
||||
.textAlign(TextAlign.Start)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
Blank()
|
||||
Text(this.value)
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
|
||||
+11
-5
@@ -13,7 +13,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import Log from '../../../../../../../../../common/src/main/ets/default/Log';
|
||||
import ConfigData, {DoNotDisturbType} from '../../common/constants';
|
||||
import ConfigData, { DoNotDisturbType } from '../../common/constants';
|
||||
import ViewModel from '../../vm/noDisturbComponentViewModel'
|
||||
|
||||
const TAG = 'ManagementComponent-NoDisturbComponent';
|
||||
@@ -52,8 +52,9 @@ export default struct NoDisturbComponent {
|
||||
.fontSize($r('app.float.itemComp_titel_font'))
|
||||
.fontColor($r('app.color.itemComp_title_color'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
}
|
||||
|
||||
Row() {
|
||||
if (this.mRefreshCnt > 0) {
|
||||
if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_ONCE) {
|
||||
@@ -65,6 +66,7 @@ export default struct NoDisturbComponent {
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
.fontColor($r('app.color.itemComp_font_color'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
|
||||
} else if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_DAILY) {
|
||||
Text($r('app.string.noDisturb_daily_label'))
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
@@ -74,6 +76,7 @@ export default struct NoDisturbComponent {
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
.fontColor($r('app.color.itemComp_font_color'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
|
||||
} else if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_CLEARLY) {
|
||||
Text($r('app.string.noDisturb_clearly_label'))
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
@@ -83,11 +86,13 @@ export default struct NoDisturbComponent {
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
.fontColor($r('app.color.itemComp_font_color'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
|
||||
} else {
|
||||
Text($r('app.string.noDisturb_closed'))
|
||||
.fontSize($r('app.float.itemComp_value_font'))
|
||||
.fontColor($r('app.color.itemComp_font_color'))
|
||||
.textAlign(TextAlign.Start)
|
||||
.margin({ top: $r("app.float.noDisturb_text_margin_vertical") })
|
||||
}
|
||||
} else {
|
||||
Blank();
|
||||
@@ -106,6 +111,7 @@ export default struct NoDisturbComponent {
|
||||
.align(Alignment.End)
|
||||
.width($r('app.float.toggle_comp_width'))
|
||||
.height($r('app.float.toggle_comp_height'))
|
||||
.selectedColor($r("app.color.font_color_007DFF"))
|
||||
.onChange((data) => {
|
||||
Log.showInfo(TAG, `Toggle onChange param: data = ${data}`)
|
||||
if (this.mPrevGetCnt == 0) {
|
||||
@@ -124,8 +130,8 @@ export default struct NoDisturbComponent {
|
||||
this.mViewModel.repeatMode = this.mViewModel.isEffective ? this.mPrevReapMode : DoNotDisturbType.TYPE_NONE;
|
||||
if (this.mViewModel.repeatMode == DoNotDisturbType.TYPE_NONE) {
|
||||
this.mViewModel.refreshDate.bind(this.mViewModel)(this.mViewModel.repeatMode,
|
||||
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY),
|
||||
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY));
|
||||
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY),
|
||||
this.mViewModel.getDateByHHMI(ConfigData.TIME_EMPTY));
|
||||
} else {
|
||||
this.mViewModel.refreshDate.bind(this.mViewModel)(this.mViewModel.repeatMode,
|
||||
this.mPrevStartTime,
|
||||
@@ -140,7 +146,7 @@ export default struct NoDisturbComponent {
|
||||
.flexShrink(0)
|
||||
.align(Alignment.End)
|
||||
.alignItems(VerticalAlign.Center)
|
||||
.padding({ right: $r('sys.float.ohos_id_max_padding_end') })
|
||||
.padding({ right: $r('sys.float.ohos_id_default_padding_end') })
|
||||
}
|
||||
.width(ConfigData.WH_100_100)
|
||||
.height($r('app.float.itemComp_noDisturb_height'))
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ export default struct SlotLstComponent {
|
||||
Text($r('app.string.slotType'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.width(ConfigData.WH_100_100)
|
||||
.maxLines(ConfigData.MAX_LINES_1)
|
||||
.textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
|
||||
+5
-3
@@ -34,11 +34,11 @@ export default struct SwitchComponent {
|
||||
Text(this.title)
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body1'))
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.align(Alignment.Start)
|
||||
Text(this.describe)
|
||||
.fontColor($r('sys.color.ohos_id_color_text_primary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body1'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.align(Alignment.Start)
|
||||
.visibility((this.describe ? true : false) ? Visibility.Visible : Visibility.None)
|
||||
}.alignItems(HorizontalAlign.Start)
|
||||
@@ -53,6 +53,8 @@ export default struct SwitchComponent {
|
||||
Row() {
|
||||
Toggle({ type: ToggleType.Switch, isOn: this.initState })
|
||||
.align(Alignment.End)
|
||||
.offset({ x: $r("app.float.noDisturb_offset_x"), y: 0 })
|
||||
.selectedColor($r("app.color.font_color_007DFF"))
|
||||
.width($r('app.float.toggle_comp_width'))
|
||||
.height($r('app.float.toggle_comp_height'))
|
||||
.enabled(this.isCanChange)
|
||||
@@ -66,7 +68,7 @@ export default struct SwitchComponent {
|
||||
.align(Alignment.End)
|
||||
.padding({ right: $r('app.float.switchComp_padding_r') })
|
||||
}.width(ConfigData.WH_100_100)
|
||||
.height($r('app.float.switchComp_height') )
|
||||
.height($r('app.float.switchComp_height'))
|
||||
.border({ width: $r('app.float.border_width'), color: Color.White,
|
||||
radius: $r('app.float.border_radius') })
|
||||
.backgroundColor(Color.White)
|
||||
|
||||
@@ -355,6 +355,18 @@
|
||||
{
|
||||
"name": "noDisturb_margin_16",
|
||||
"value": "16vp"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_offset_x",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_text_margin_vertical",
|
||||
"value": "0vp"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_text_margin_right",
|
||||
"value": "0vp"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
{
|
||||
"color": [
|
||||
{
|
||||
"name": "background_color",
|
||||
"value": "#0xDCDCDC"
|
||||
},
|
||||
{
|
||||
"name": "background_transparent",
|
||||
"value": "#00000000"
|
||||
},
|
||||
{
|
||||
"name": "appitem_label_fontcolor",
|
||||
"value": "#333333"
|
||||
},
|
||||
{
|
||||
"name": "appitem_version_fontcolor",
|
||||
"value": "#999999"
|
||||
},
|
||||
{
|
||||
"name": "divider_color",
|
||||
"value": "#0C000000"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_title_color",
|
||||
"value": "#182431"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_font_color",
|
||||
"value": "#182431"
|
||||
},
|
||||
{
|
||||
"name": "font_color_007DFF",
|
||||
"value": "#007DFF"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,372 @@
|
||||
{
|
||||
"float": [
|
||||
{
|
||||
"name": "page_margin_l",
|
||||
"value": "12pv"
|
||||
},
|
||||
{
|
||||
"name": "page_margin_r",
|
||||
"value": "12pv"
|
||||
},
|
||||
{
|
||||
"name": "page_margin_t",
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"name": "page_margin_b",
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"name": "page_title_font",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "page_title_height",
|
||||
"value": "56vp"
|
||||
},
|
||||
{
|
||||
"name": "page_phrases_font",
|
||||
"value": "14fp"
|
||||
},
|
||||
{
|
||||
"name": "page_phrases_padding_t",
|
||||
"value": "19vp"
|
||||
},
|
||||
{
|
||||
"name": "applist_hieght",
|
||||
"value": "476vp"
|
||||
},
|
||||
{
|
||||
"name": "applist_hieght_phone",
|
||||
"value": "800vp"
|
||||
},
|
||||
{
|
||||
"name": "applist_hieght_bat",
|
||||
"value": "584vp"
|
||||
},
|
||||
{
|
||||
"name": "applist_hieght_bat_phone",
|
||||
"value": "1022vp"
|
||||
},
|
||||
{
|
||||
"name": "page_header_margin_t",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "applist_margin_t",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "page_phrases_height",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "page_phrases_tittle_font",
|
||||
"value": "20fp"
|
||||
},
|
||||
{
|
||||
"name": "dialog_title_height",
|
||||
"value": "60vp"
|
||||
},
|
||||
{
|
||||
"name": "dialog_title_font",
|
||||
"value": "20fp"
|
||||
},
|
||||
{
|
||||
"name": "dialog_title_margin_l",
|
||||
"value": "50"
|
||||
},
|
||||
{
|
||||
"name": "dialog_button_font",
|
||||
"value": "20fp"
|
||||
},
|
||||
{
|
||||
"name": "timeDialog_height",
|
||||
"value": "310vp"
|
||||
},
|
||||
{
|
||||
"name": "timeDialog_datePicker_height",
|
||||
"value": "200vp"
|
||||
},
|
||||
{
|
||||
"name": "repeatDialog_cont_font",
|
||||
"value": "16fp"
|
||||
},
|
||||
{
|
||||
"name": "repeatDialog_height",
|
||||
"value": "320vp"
|
||||
},
|
||||
{
|
||||
"name": "border_width",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "border_radius",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "image_border_radius",
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"name": "appitem_item_height",
|
||||
"value": "72vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_header_icon_width",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_header_icon_height",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_icon_width",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_icon_height",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_icon_info_margin_r",
|
||||
"value": "4vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_icon_info_list_margin_r",
|
||||
"value": "4vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_icon_margin_r",
|
||||
"value": "16vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_label_margin_t",
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"name": "appitem_label_margin_b",
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"name": "appitem_label_font",
|
||||
"value": "20vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_version_font",
|
||||
"value": "18vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_version_margin_b",
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"name": "appitem_version_margin_r",
|
||||
"value": "10"
|
||||
},
|
||||
{
|
||||
"name": "arrow_icon_width",
|
||||
"value": "40"
|
||||
},
|
||||
{
|
||||
"name": "arrow_icon_height",
|
||||
"value": "40"
|
||||
},
|
||||
{
|
||||
"name": "toggle_comp_width",
|
||||
"value": "44vp"
|
||||
},
|
||||
{
|
||||
"name": "toggle_comp_height",
|
||||
"value": "44vp"
|
||||
},
|
||||
{
|
||||
"name": "toggle_check_width",
|
||||
"value": "25"
|
||||
},
|
||||
{
|
||||
"name": "divider_stroke_width",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"name": "divider_margin_l_info",
|
||||
"value": "64vp"
|
||||
},
|
||||
{
|
||||
"name": "divider_margin_l",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "divider_margin_r",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "divider_height",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_height",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_noDisturb_height",
|
||||
"value": "72vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_titel_font",
|
||||
"value": "16vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_value_font",
|
||||
"value": "14fp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_image_width",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_image_height",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_image_margin_left",
|
||||
"value": "30"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_padding_l",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_padding_r",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "itemComp_margin_b",
|
||||
"value": "8vp"
|
||||
},
|
||||
{
|
||||
"name": "slotComp_font",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"name": "page_header_icon_margin_l",
|
||||
"value": "18vp"
|
||||
},
|
||||
{
|
||||
"name": "page_header_margin_l",
|
||||
"value": "18vp"
|
||||
},
|
||||
{
|
||||
"name": "slotComp_image_width",
|
||||
"value": "18vp"
|
||||
},
|
||||
{
|
||||
"name": "slotComp_image_height",
|
||||
"value": "18vp"
|
||||
},
|
||||
{
|
||||
"name": "slotComp_margin_t",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"name": "switchComp_titel_font",
|
||||
"value": "20"
|
||||
},
|
||||
{
|
||||
"name": "switchComp_height",
|
||||
"value": "64vp"
|
||||
},
|
||||
{
|
||||
"name": "switchComp_padding_r",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "slotComp_height",
|
||||
"value": "56vp"
|
||||
},
|
||||
{
|
||||
"name": "distance_24",
|
||||
"value": "15"
|
||||
},
|
||||
{
|
||||
"name": "page_notice_title_margin_t",
|
||||
"value": "8vp"
|
||||
},
|
||||
{
|
||||
"name": "page_notice_part_margin_t",
|
||||
"value": "8vp"
|
||||
},
|
||||
{
|
||||
"name": "page_notice_row_margin_t",
|
||||
"value": "18vp"
|
||||
},
|
||||
{
|
||||
"name": "page_notice_app_item_row_height",
|
||||
"value": "72vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_info_icon_width_l",
|
||||
"value": "64vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_info_icon_height_l",
|
||||
"value": "64vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_info_icon_width",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_info_icon_height",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_infopop_icon_width",
|
||||
"value": "22vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_infopop_icon_height",
|
||||
"value": "22vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_infopop_icon_margin_r",
|
||||
"value": "24vp"
|
||||
},
|
||||
{
|
||||
"name": "appitem_notice_info_icon_margin_r",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "page_notice_info_label_margin",
|
||||
"value": "12vp"
|
||||
},
|
||||
{
|
||||
"name": "notice_title_height",
|
||||
"value": "48vp"
|
||||
},
|
||||
{
|
||||
"name": "notice_row_height",
|
||||
"value": "56vp"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_margin_lf",
|
||||
"value": "4vp"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_margin_16",
|
||||
"value": "16vp"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_offset_x",
|
||||
"value": "-18"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_text_margin_vertical",
|
||||
"value": "2vp"
|
||||
},
|
||||
{
|
||||
"name": "noDisturb_text_margin_right",
|
||||
"value": "12vp"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -28,7 +28,7 @@ const TAG = 'NotificationManagement-BatchSetEnable';
|
||||
export default struct BatchSetEnable {
|
||||
@State mViewModel: ViewModel = new ViewModel();
|
||||
@StorageLink('appManagementList') appList: any[]= [];
|
||||
@State headName:Resource = $r('app.string.notificationManagement')
|
||||
@State headName:Resource = $r('app.string.batch_Management')
|
||||
|
||||
build() {
|
||||
Column() {
|
||||
@@ -58,7 +58,7 @@ export default struct BatchSetEnable {
|
||||
}
|
||||
.divider({
|
||||
strokeWidth: 1,
|
||||
color: $r('app.color.background_color'),
|
||||
color: $r('app.color.divider_color'),
|
||||
startMargin: $r('app.float.divider_margin_l_info'),
|
||||
endMargin: $r('app.float.divider_margin_r')
|
||||
})
|
||||
|
||||
@@ -28,7 +28,7 @@ const TAG = 'NotificationManagement-NoDisturbPre';
|
||||
@Component
|
||||
export default struct notificationManagenment {
|
||||
@State columnMargin: string = '24vp';
|
||||
@State headName: Resource = $r('app.string.notificationManagement')
|
||||
@State headName: Resource = $r('app.string.noDisturb')
|
||||
@State refreshRequest: number= 0
|
||||
|
||||
build() {
|
||||
@@ -45,8 +45,12 @@ export default struct notificationManagenment {
|
||||
Row() {
|
||||
Text($r('app.string.timing_on'))
|
||||
.fontSize($r('app.float.page_phrases_font'))
|
||||
.margin({top:$r('app.float.page_phrases_padding_t')})
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontFamily('HarmonyHeiTi-Medium')
|
||||
.margin({ top: $r('app.float.page_phrases_padding_t') })
|
||||
}
|
||||
.align(Alignment.Start)
|
||||
.width(ConfigData.WH_100_100)
|
||||
.height($r('app.float.page_phrases_height'))
|
||||
.padding({ left: $r('sys.float.ohos_id_default_padding_start') })
|
||||
@@ -58,7 +62,8 @@ export default struct notificationManagenment {
|
||||
.onClick(() => {
|
||||
Log.showInfo(TAG, `NoDisturbComponent on click`)
|
||||
Router.push({ uri: 'pages/noDisturb' });
|
||||
}).width(ConfigData.WH_100_100)
|
||||
})
|
||||
.width(ConfigData.WH_100_100)
|
||||
.backgroundColor(Color.White)
|
||||
.border({ width: $r('app.float.border_width'), color: Color.White,
|
||||
radius: $r('app.float.border_radius') })
|
||||
|
||||
+19
-8
@@ -75,11 +75,15 @@ export default struct notificationManagenment {
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body1'))
|
||||
.fontColor($r('app.color.itemComp_title_color'))
|
||||
.align(Alignment.End)
|
||||
.margin({ right: $r("app.float.noDisturb_text_margin_right") })
|
||||
.fontWeight(FontWeight.Medium)
|
||||
} else {
|
||||
Text($r('app.string.noDisturb_closed'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body1'))
|
||||
.fontColor($r('app.color.itemComp_title_color'))
|
||||
.align(Alignment.End)
|
||||
.margin({ right: $r("app.float.noDisturb_text_margin_right") })
|
||||
.fontWeight(FontWeight.Medium)
|
||||
}
|
||||
Image($r('app.media.ic_settings_arrow'))
|
||||
.align(Alignment.End)
|
||||
@@ -103,11 +107,18 @@ export default struct notificationManagenment {
|
||||
.onClick(() => {
|
||||
Log.showInfo(TAG, `NoDisturbComponent on click`)
|
||||
Router.push({ uri: 'pages/noDisturbPre' });
|
||||
}).width(ConfigData.WH_100_100)
|
||||
})
|
||||
.width(ConfigData.WH_100_100)
|
||||
.flexShrink(0)
|
||||
|
||||
Column() {
|
||||
Divider().color($r('app.color.divider_color')).strokeWidth(1)
|
||||
}.padding({ left: $r('sys.float.ohos_id_default_padding_start'),right:$r('sys.float.ohos_id_default_padding_end') })
|
||||
}
|
||||
.padding({
|
||||
left: $r('sys.float.ohos_id_default_padding_start'),
|
||||
right: $r('sys.float.ohos_id_default_padding_end')
|
||||
})
|
||||
|
||||
Row() {
|
||||
Row() {
|
||||
SwitchComponent({
|
||||
@@ -123,19 +134,19 @@ export default struct notificationManagenment {
|
||||
.backgroundColor(Color.White)
|
||||
.border({ width: $r('app.float.border_width'), color: Color.White,
|
||||
radius: $r('app.float.border_radius') })
|
||||
.margin({top:$r('app.float.page_notice_title_margin_t')});
|
||||
.margin({ top: $r('app.float.page_notice_title_margin_t') });
|
||||
|
||||
Row() {
|
||||
Text($r('app.string.notificationManagement'))
|
||||
.fontColor($r('sys.color.ohos_id_color_text_secondary'))
|
||||
.fontSize($r('sys.float.ohos_id_text_size_body2'))
|
||||
.fontWeight(FontWeight.Bold)
|
||||
.fontWeight(FontWeight.Medium)
|
||||
.fontFamily('HarmonyHeiTi-Medium')
|
||||
.margin({top:$r('app.float.page_phrases_padding_t')})
|
||||
.margin({ top: $r('app.float.page_phrases_padding_t') })
|
||||
}.align(Alignment.Start)
|
||||
.width(ConfigData.WH_100_100)
|
||||
.height($r('app.float.page_phrases_height'))
|
||||
.padding({ left: $r('sys.float.ohos_id_default_padding_start')})
|
||||
.padding({ left: $r('sys.float.ohos_id_default_padding_start') })
|
||||
|
||||
Row() {
|
||||
ItemComponent({ title: $title, value: '', arrow: $arrow })
|
||||
@@ -148,8 +159,8 @@ export default struct notificationManagenment {
|
||||
Column() {
|
||||
AppLstComponent()
|
||||
}.width(ConfigData.WH_100_100)
|
||||
.height(this.mViewModel.isPhone?$r('app.float.applist_hieght_phone'):$r('app.float.applist_hieght'))
|
||||
.margin({top:$r('app.float.applist_margin_t')});
|
||||
.height(this.mViewModel.isPhone ? $r('app.float.applist_hieght_phone') : $r('app.float.applist_hieght'))
|
||||
.margin({ top: $r('app.float.applist_margin_t') });
|
||||
|
||||
}
|
||||
.width(ConfigData.WH_100_100)
|
||||
|
||||
Reference in New Issue
Block a user