ke: 鸿蒙 UI 整改:emoji→AmIcon 图标、宽屏侧栏、Md 第三方库、通知可配置项
- common/Icons.ets(生成器产出):43 枚与 WebUI icons.tsx 同几何的 Path 图标 - NavItems.ts:icon(emoji) → iconKey,与 WebUI 导航同图标 - 全页面 emoji 清除(空态改单行灰字,按钮/头像/刷新等换 AmIcon) - MailDetailPage 接入 @luvi/lv-markdown-in(第三方,替代手写解析器) - WideSidebar + MainPage isWide(≥768vp):宽屏侧栏 60vp 图标轨、藏底部条、onAreaChange 断点 - 通知=可配置项(默认关):PushService.isEnabled/setEnabled + reportToken 最前 gate (关=不取token/不弹权限/不打网关)+ SettingsPage Toggle + 服务端通道状态提示 - EntryAbility.onCreate 解析 want:冷启点通知也能路由(原来只有 onNewWant) - 判据:harmony-widescreen(4) + harmony-push-optin(4) 新增;harmony-nav 同步 iconKey/条件 padding
This commit is contained in:
@ -11,6 +11,7 @@ import { SendMailRequest } from '../model/Models';
|
||||
import { ComposeParams } from '../model/RouteParams';
|
||||
import { hilog } from '@kit.PerformanceAnalysisKit';
|
||||
import { picker } from '@kit.CoreFileKit';
|
||||
import { AmIcon } from '../common/Icons';
|
||||
|
||||
@Entry
|
||||
@Component
|
||||
@ -165,7 +166,7 @@ struct ComposePage {
|
||||
request.attachment_ids = this.attachmentIds;
|
||||
}
|
||||
await mailApi.send(request);
|
||||
this.getUIContext().getPromptAction().showToast({ message: '✅ 邮件已发送' });
|
||||
this.getUIContext().getPromptAction().showToast({ message: '邮件已发送' });
|
||||
this.getUIContext().getRouter().back();
|
||||
} catch (e) {
|
||||
const apiError = e as ApiError;
|
||||
@ -228,7 +229,7 @@ struct ComposePage {
|
||||
.fontWeight(this.selectedAccountId === acct.id ? FontWeight.Bold : FontWeight.Normal)
|
||||
.layoutWeight(1)
|
||||
if (this.selectedAccountId === acct.id) {
|
||||
Text('✓').fontSize(14).fontColor(Theme.accent)
|
||||
AmIcon({ iconName: 'check', iconSize: 14, iconColor: Theme.accent })
|
||||
}
|
||||
}
|
||||
.width('100%').height(40).padding({ left: 40, right: 12 })
|
||||
@ -279,12 +280,13 @@ struct ComposePage {
|
||||
Column() {
|
||||
ForEach(this.attachmentNames, (name: string, idx: number) => {
|
||||
Row() {
|
||||
Text('📎 ' + name)
|
||||
AmIcon({ iconName: 'paperclip', iconSize: 12, iconColor: Theme.textMuted })
|
||||
Text(name)
|
||||
.fontSize(12).fontColor(Theme.textPrimary)
|
||||
.margin({ left: 6 })
|
||||
.layoutWeight(1)
|
||||
.maxLines(1).textOverflow({ overflow: TextOverflow.Ellipsis })
|
||||
Text('✕')
|
||||
.fontSize(14).fontColor(Theme.danger)
|
||||
AmIcon({ iconName: 'close', iconSize: 14, iconColor: Theme.danger })
|
||||
.onClick(() => { this.removeAttachment(idx); })
|
||||
}
|
||||
.width('100%').height(32)
|
||||
@ -297,9 +299,12 @@ struct ComposePage {
|
||||
|
||||
// 底部工具栏
|
||||
Row() {
|
||||
Text('📎 添加附件')
|
||||
.fontSize(13).fontColor(Theme.accent)
|
||||
.onClick(() => { this.pickAttachment(); })
|
||||
Row() {
|
||||
AmIcon({ iconName: 'paperclip', iconSize: 14, iconColor: Theme.accent })
|
||||
Text('添加附件')
|
||||
.fontSize(13).fontColor(Theme.accent).margin({ left: 6 })
|
||||
.onClick(() => { this.pickAttachment(); })
|
||||
}
|
||||
|
||||
if (this.uploading) {
|
||||
Text(this.status)
|
||||
|
||||
Reference in New Issue
Block a user