Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Oct 29, 2025

Added camera status OSD (On-Screen Display) notifications to the
notification panel

  1. Added two new icon files: osd_camera_on.dci and osd_camera_off.dci
    for camera status indicators
  2. Updated main.qml to include new notification types for camera on/
    off states
  3. Added ListElement entries for CameraOn and CameraOff types with
    corresponding icons and translated text
    This enhancement provides visual feedback to users when their camera
    is turned on or off, improving the user experience for camera-related
    operations

Log: Added camera status notifications in OSD panel

Influence:

  1. Test camera on/off notifications appear in OSD when camera state
    changes
  2. Verify camera on icon (osd_camera_on) displays correctly
  3. Verify camera off icon (osd_camera_off) displays correctly
  4. Check notification text is properly translated in different languages
  5. Ensure notifications integrate properly with existing OSD
    notification system

feat: 添加摄像头状态 OSD 通知

在通知面板中添加摄像头状态 OSD(屏幕显示)通知功能

  1. 新增两个图标文件:osd_camera_on.dci 和 osd_camera_off.dci 用于摄像头
    状态指示
  2. 更新 main.qml 文件,添加摄像头开关状态的新通知类型
  3. 添加 CameraOn 和 CameraOff 类型的 ListElement 条目,包含对应图标和翻
    译文本
    此增强功能在用户摄像头开启或关闭时提供视觉反馈,改善摄像头相关操作用户
    体验

Log: 在 OSD 面板中添加摄像头状态通知

Influence:

  1. 测试摄像头状态变化时 OSD 中是否显示开关通知
  2. 验证摄像头开启图标(osd_camera_on)正确显示
  3. 验证摄像头关闭图标(osd_camera_off)正确显示
  4. 检查通知文本在不同语言环境下是否正确翻译
  5. 确保通知与现有 OSD 通知系统正确集成

PMS: BUG-338439

Summary by Sourcery

New Features:

  • Add camera on/off status notifications to the OSD panel with corresponding icons and translated text

@sourcery-ai
Copy link

sourcery-ai bot commented Oct 29, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Introduces camera status OSD notifications by adding new icon assets and extending the OSD notification panel with CameraOn/CameraOff entries including translated text.

Class diagram for updated OSD notification types

classDiagram
    class NotificationType {
      +type: String
      +iconName: String
      +text: String
    }
    NotificationType <|-- CameraOn
    NotificationType <|-- CameraOff
    class CameraOn {
      +type = "CameraOn"
      +iconName = "osd_camera_on"
      +text = "Camera on"
    }
    class CameraOff {
      +type = "CameraOff"
      +iconName = "osd_camera_off"
      +text = "Camera off"
    }
Loading

File-Level Changes

Change Details Files
Added camera on/off icon assets
  • Created icon file for camera-on state
  • Created icon file for camera-off state
panels/notification/osd/default/package/osd_camera_on.dci
panels/notification/osd/default/package/osd_camera_off.dci
Extended OSD notification panel with new camera status types
  • Inserted ListElement for CameraOn with icon and qsTr text
  • Inserted ListElement for CameraOff with icon and qsTr text
panels/notification/osd/default/package/main.qml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey there - I've reviewed your changes - here's some feedback:

  • Ensure that your notification backend emits the exact type strings “CameraOn” and “CameraOff” so these new ListElements are actually triggered.
  • Don’t forget to add qsTr translations for “Camera on” and “Camera off” to your .po files so the new notifications are localized correctly.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Ensure that your notification backend emits the exact type strings “CameraOn” and “CameraOff” so these new ListElements are actually triggered.
- Don’t forget to add qsTr translations for “Camera on” and “Camera off” to your .po files so the new notifications are localized correctly.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Added camera status OSD (On-Screen Display) notifications to the
notification panel
1. Added two new icon files: osd_camera_on.dci and osd_camera_off.dci
for camera status indicators
2. Updated main.qml to include new notification types for camera on/
off states
3. Added ListElement entries for CameraOn and CameraOff types with
corresponding icons and translated text
This enhancement provides visual feedback to users when their camera
is turned on or off, improving the user experience for camera-related
operations

Log: Added camera status notifications in OSD panel

Influence:
1. Test camera on/off notifications appear in OSD when camera state
changes
2. Verify camera on icon (osd_camera_on) displays correctly
3. Verify camera off icon (osd_camera_off) displays correctly
4. Check notification text is properly translated in different languages
5. Ensure notifications integrate properly with existing OSD
notification system

feat: 添加摄像头状态 OSD 通知

在通知面板中添加摄像头状态 OSD(屏幕显示)通知功能
1. 新增两个图标文件:osd_camera_on.dci 和 osd_camera_off.dci 用于摄像头
状态指示
2. 更新 main.qml 文件,添加摄像头开关状态的新通知类型
3. 添加 CameraOn 和 CameraOff 类型的 ListElement 条目,包含对应图标和翻
译文本
此增强功能在用户摄像头开启或关闭时提供视觉反馈,改善摄像头相关操作用户
体验

Log: 在 OSD 面板中添加摄像头状态通知

Influence:
1. 测试摄像头状态变化时 OSD 中是否显示开关通知
2. 验证摄像头开启图标(osd_camera_on)正确显示
3. 验证摄像头关闭图标(osd_camera_off)正确显示
4. 检查通知文本在不同语言环境下是否正确翻译
5. 确保通知与现有 OSD 通知系统正确集成

PMS: BUG-338439
@deepin-ci-robot
Copy link

deepin pr auto review

我来对这个 git diff 进行代码审查:

  1. 功能变更分析:
    这个变更主要添加了摄像头的 OSD(On Screen Display)通知功能,包括:
  • 添加了两个新的图标资源(osd_camera_on.dci 和 osd_camera_off.dci)
  • 在 main.qml 中添加了摄像头开关的 ListElement
  • 在所有语言翻译文件中添加了 "Camera on" 和 "Camera off" 的翻译条目
  • 在测试脚本中添加了相关的测试用例
  1. 代码质量评估:
    优点:
  • 代码结构清晰,遵循了现有的代码模式
  • 国际化支持完整,添加了所有语言的翻译条目
  • 包含了相应的测试用例

改进建议:

  1. 翻译文件格式统一性:
  • 所有翻译文件都正确添加了 encoding="utf-8" 声明
  • XML 格式规范化,确保所有文件都有正确的换行符
  1. 代码组织:
  • 建议在 main.qml 中将相关的 ListElement 按功能分组,并添加注释说明
  • 可以考虑将摄像头相关的配置项放在一起,便于维护
  1. 测试覆盖:
  • test.sh 中已经添加了 CameraOn 和 CameraOff 的测试用例,这很好
  • 建议添加更多的边界测试用例
  1. 性能考虑:
  • 使用 DCI 格式的图标资源是合适的,这种格式支持主题切换
  • 没有明显的性能问题
  1. 安全性:
  • 变更不涉及安全敏感的操作
  • 摄像头状态显示是用户需要知道的重要信息
  1. 文档建议:
  • 建议在相关代码中添加注释,说明摄像头状态变更的触发条件
  • 可以考虑添加使用说明文档

总结:
这是一个合理的变更,实现了摄像头 OSD 显示功能。代码质量良好,遵循了现有的代码规范。建议在后续版本中完善翻译内容,并考虑添加更多的注释说明。变更不会对现有功能造成影响,可以安全合并。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, BLumia

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@18202781743 18202781743 merged commit f167635 into linuxdeepin:master Oct 29, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants