~aleteoryx/muditaos

0e7ae160e61e10c821f3772e9d8f065ccf78c0a2 — Adam Wulkiewicz 2 years ago 950cf78
[BH-1639] Add welcome message with charging info

Add new bell welcome window
Add new close reasons
Add new actions
Bump assets version
Remove bold text from welcome message
Remove bold text from onboarding popups
M image/system_a/data/lang/Deutsch.json => image/system_a/data/lang/Deutsch.json +7 -6
@@ 666,11 666,10 @@
  "app_bell_relaxation_looped": "geschlungen",
  "app_bell_relaxation_loop_description": "der Titel wird abgespielt, bis Sie ihn ausschalten",
  "app_bell_relaxation_error_message": "Nicht unterstütztes Dateiformat",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>ist ausgeschaltet</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Drehen </text><text weight='light' size='38'>um auszuwählen</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Leichter Klick </text><text weight='light' size='38'>um fortzufahren</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Sie haben </text><text weight='regular' size='38'>tief gedrückt</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Seien Sie sanfter,<br></br>versuchen </text><text weight='regular' size='38'>Sie diesmal </text><text weight='light' size='38'>leicht klicken</text>",
  "app_bell_onboarding_info_rotate": "Drehen um auszuwählen",
  "app_bell_onboarding_info_light_click": "Leichter Klick um fortzufahren",
  "app_bell_onboarding_info_deep_click_warning": "Sie haben tief gedrückt",
  "app_bell_onboarding_info_deep_click_correction": "<text>Seien Sie sanfter,<br />versuchen Sie diesmal leicht klicken</text>",
  "app_bell_onboarding_welcome": "Willkommen",
  "app_bell_onboarding_shortcuts_question": "Möchten Sie sich die Anleitung für die Kurzbefehle ansehen?",
  "app_bell_onboarding_shortcuts_start": "Start",


@@ 744,5 743,7 @@
  "app_meditation_countdown_desc": "Beginnt in",
  "app_meditation_summary_total": "<text>Gesamt:<br /><token>$VALUE</token></text>",
  "app_meditation_summary_average": "Durchschnitt/tag:",
  "app_meditation_summary_title": "<text>Letzte <token>$VALUE</token> tage</text>"
  "app_meditation_summary_title": "<text>Letzte <token>$VALUE</token> tage</text>",
  "app_bell_welcome_message": "<text>Mudita Harmony<br/>ist ausgeschaltet</text>",
  "app_bell_welcome_charge_message": "<text>Charge Harmony<br/>und leicht drücken</text>"
}

M image/system_a/data/lang/English.json => image/system_a/data/lang/English.json +6 -5
@@ 644,11 644,10 @@
  "app_bell_meditation_interval_none": "None",
  "app_bell_meditation_put_down_and_wait": "<text>Put down Mudita Harmony<br>and wait for the gong</text>",
  "app_bell_meditation_thank_you_for_session": "<text>Thank you for<br>the session</text>",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>is switched OFF</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Rotate </text><text weight='light' size='38'>to select</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Light click </text><text weight='light' size='38'>to continue</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>You've </text><text weight='regular' size='38'>deep pressed</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Be more gentle,<br></br>try </text><text weight='regular' size='38'>light click </text><text weight='light' size='38'>this time</text>",
  "app_bell_onboarding_info_rotate": "Rotate to select",
  "app_bell_onboarding_info_light_click": "Light click to continue",
  "app_bell_onboarding_info_deep_click_warning": "You've deep pressed",
  "app_bell_onboarding_info_deep_click_correction": "<text>Be more gentle,<br />try light click this time</text>",
  "app_bell_onboarding_welcome": "Welcome",
  "app_bell_onboarding_shortcuts_question": "Do you want to see Shortcuts instruction?",
  "app_bell_onboarding_shortcuts_start": "Start",


@@ 719,6 718,8 @@
  "app_bell_turn_off_question": "Turn off Mudita Harmony?",
  "app_bell_goodbye": "Goodbye",
  "app_bell_reset_message": "<text>Resetting Mudita<br />Harmony</text>",
  "app_bell_welcome_message": "<text>Mudita Harmony<br/>is switched OFF</text>",
  "app_bell_welcome_charge_message": "<text>Charge Harmony<br/>and press light click</text>",
  "app_bell_greeting_msg": [
    "<text>Good Morning!<br />It's a Beautiful Day!</text>",
    "<text>Rise and shine!<br />Seize the day</text>",

M image/system_a/data/lang/Espanol.json => image/system_a/data/lang/Espanol.json +7 -6
@@ 651,11 651,10 @@
  "app_bell_settings_time_units_time_fmt_top_message": "Formato de hora",
  "app_bell_settings_time_units_time_message": "Hora",
  "app_bell_settings_temp_scale": "Escala de temperatura",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>está apagado</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Girar </text><text weight='light' size='38'>para seleccionar</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Click ligeramente </text><text weight='light' size='38'>para continuar</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Has presionado </text><text weight='regular' size='38'>muy profundo</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Sé más suave, <br></br>intenta </text><text weight='regular' size='38'>presionar ligeramente </text><text weight='light' size='38'>esta vez</text>",
  "app_bell_onboarding_info_rotate": "Girar para seleccionar",
  "app_bell_onboarding_info_light_click": "Click ligeramente para continuar",
  "app_bell_onboarding_info_deep_click_warning": "Has presionado muy profundo",
  "app_bell_onboarding_info_deep_click_correction": "<text>Sé más suave,<br />intenta presionar ligeramente esta vez</text>",
  "app_bell_onboarding_welcome": "Bienvenido",
  "app_bell_onboarding_shortcuts_question": "¿Quieres ver instrucciones de accesos directos?",
  "app_bell_onboarding_shortcuts_start": "Comenzar",


@@ 744,5 743,7 @@
  "app_meditation_countdown_desc": "Empieza en",
  "app_meditation_summary_total": "<text>Total:<br /><token>$VALUE</token></text>",
  "app_meditation_summary_average": "Promedio/por día:",
  "app_meditation_summary_title": "<text>Últimos <token>$VALUE</token> días</text>"
  "app_meditation_summary_title": "<text>Últimos <token>$VALUE</token> días</text>",
  "app_bell_welcome_message": "<text>Mudita Harmony<br/>está apagado</text>",
  "app_bell_welcome_charge_message": "<text>Carga tu Harmony<br/>y pulsa levemente</text>"
}

M image/system_a/data/lang/Francais.json => image/system_a/data/lang/Francais.json +7 -6
@@ 626,11 626,10 @@
  "app_bell_settings_time_units_time_fmt_top_message": "Format de l'heure",
  "app_bell_settings_time_units_time_message": "Heure",
  "app_bell_settings_temp_scale": "Échelle de température",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>est désactivé</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Tourner </text><text weight='light' size='38'>pour sélectionner</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Cliquer doucement </text><text weight='light' size='38'>pour continuer</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Vous avez </text><text weight='regular' size='38'>appuyé fort</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Soyez plus doux, <br></br>essayez </text><text weight='regular' size='38'>de cliquer plus </text><text weight='light' size='38'>légèrement cette fois</text>",
  "app_bell_onboarding_info_rotate": "<text>Tourner pour<br />sélectionner</text>",
  "app_bell_onboarding_info_light_click": "Cliquer doucement pour continuer",
  "app_bell_onboarding_info_deep_click_warning": "Vous avez appuyé fort",
  "app_bell_onboarding_info_deep_click_correction": "<text>Soyez plus doux,<br />essayez de cliquer plus légèrement cette fois</text>",
  "app_bell_onboarding_welcome": "Bienvenu",
  "app_bell_onboarding_shortcuts_question": "Voulez-vous voir les instructions sur les raccourcis ?",
  "app_bell_onboarding_shortcuts_start": "Commencer",


@@ 715,5 714,7 @@
  "app_meditation_countdown_desc": "Début dans",
  "app_meditation_summary_total": "<text>Total :<br /><token>$VALUE</token></text>",
  "app_meditation_summary_average": "Moyenne/jour :",
  "app_meditation_summary_title": "<text>Derniers <token>$VALUE</token> jours</text>"
  "app_meditation_summary_title": "<text>Derniers <token>$VALUE</token> jours</text>",
  "app_bell_welcome_message": "<text>Mudita Harmony<br/>est désactivé</text>",
  "app_bell_welcome_charge_message": "<text>Rechargez Harmony<br/>et appuyez légèrement</text>"
}

M image/system_a/data/lang/Polski.json => image/system_a/data/lang/Polski.json +7 -6
@@ 650,11 650,10 @@
  "app_bellmain_relaxation": "Relaks",
  "app_bellmain_settings": "Ustawienia",
  "app_bellmain_main_window_title": "Mudita Harmony",
  "app_bell_onboarding_welcome_message": "<text>Mudita Harmony<br/>jest wyłączony</text>",
  "app_bell_onboarding_info_rotate": "<text weight='regular' size='38'>Obróć, </text><text weight='light' size='38'>aby wybrać</text>",
  "app_bell_onboarding_info_light_click": "<text weight='regular' size='38'>Kliknij lekko, </text><text weight='light' size='38'>aby kontynuować</text>",
  "app_bell_onboarding_info_deep_click_warning": "<text weight='light' size='38'>Głęboko </text><text weight='regular' size='38'>wciśnięty</text>",
  "app_bell_onboarding_info_deep_click_correction": "<text weight='light' size='38'>Bądź bardziej delikatny,<br></br>spróbuj </text><text weight='regular' size='38'>tym razem<br></br></text><text weight='light' size='38'>lekko kliknąć</text>",
  "app_bell_onboarding_info_rotate": "Obróć, aby wybrać",
  "app_bell_onboarding_info_light_click": "Kliknij lekko, aby kontynuować",
  "app_bell_onboarding_info_deep_click_warning": "Głęboko wciśnięty",
  "app_bell_onboarding_info_deep_click_correction": "<text>Delikatniej, tym razem<br />spróbuj lekko kliknąć</text>",
  "app_bell_onboarding_welcome": "Witamy",
  "app_bell_onboarding_shortcuts_question": "Czy chcesz zobaczyć instrukcję Skrótów?",
  "app_bell_onboarding_shortcuts_start": "Start",


@@ 745,5 744,7 @@
  "app_meditation_countdown_desc": "Startuje za",
  "app_meditation_summary_total": "<text>Suma:<br /><token>$VALUE</token></text>",
  "app_meditation_summary_average": "Średnia/dzień:",
  "app_meditation_summary_title": "<text>Ostatnie <token>$VALUE</token> dni</text>"
  "app_meditation_summary_title": "<text>Ostatnie <token>$VALUE</token> dni</text>",
  "app_bell_welcome_message": "<text>Mudita Harmony<br/>jest wyłączony</text>",
  "app_bell_welcome_charge_message": "<text>Naładuj Harmony<br/>i kliknij lekko</text>"
}

M module-apps/application-desktop/ApplicationDesktop.cpp => module-apps/application-desktop/ApplicationDesktop.cpp +6 -1
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "ApplicationDesktop.hpp"


@@ 64,6 64,11 @@ namespace app
            requestShutdownWindow(app::window::name::closing_window);
            return actionHandled();
        });

        addActionReceiver(app::manager::actions::DisplayChargeAtExit, [this](auto &&data) {
            requestShutdownWindow(app::window::name::closing_window);
            return actionHandled();
        });
    }

    // Invoked upon receiving data message

M module-apps/application-desktop/include/application-desktop/ApplicationDesktop.hpp => module-apps/application-desktop/include/application-desktop/ApplicationDesktop.hpp +2 -1
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 62,6 62,7 @@ namespace app
                     manager::actions::DisplayLowBatteryScreen,
                     manager::actions::SystemBrownout,
                     manager::actions::DisplayLogoAtExit,
                     manager::actions::DisplayChargeAtExit,
                     manager::actions::PhoneModeChanged,
                     manager::actions::BluetoothModeChanged,
                     manager::actions::NotificationsChanged,

M module-services/service-appmgr/include/service-appmgr/Actions.hpp => module-services/service-appmgr/include/service-appmgr/Actions.hpp +2 -1
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 52,6 52,7 @@ namespace app::manager
            DisplayLowBatteryScreen,
            SystemBrownout,
            DisplayLogoAtExit,
            DisplayChargeAtExit,
            DisplayFactoryResetInProgressScreen,
            SMSRejectedByOfflineNotification,
            CallRejectedByOfflineNotification,

A module-services/service-appmgr/include/service-appmgr/messages/OnboardingPowerDownRequest.hpp => module-services/service-appmgr/include/service-appmgr/messages/OnboardingPowerDownRequest.hpp +12 -0
@@ 0,0 1,12 @@
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once

#include "BaseMessage.hpp"

namespace app
{
    class OnboardingPowerDownRequest : public sys::DataMessage
    {};
} // namespace app

M module-services/service-appmgr/model/ApplicationManagerCommon.cpp => module-services/service-appmgr/model/ApplicationManagerCommon.cpp +4 -1
@@ 38,7 38,8 @@ namespace app::manager
        {
            return action == app::manager::actions::DisplayFactoryResetInProgressScreen ||
                   action == app::manager::actions::DisplayLogoAtExit ||
                   action == app::manager::actions::SystemBrownout;
                   action == app::manager::actions::SystemBrownout ||
                   action == app::manager::actions::DisplayChargeAtExit;
        }

        ActionRequest getCloseableAction(const app::ApplicationName &senderName, const sys::CloseReason closeReason)


@@ 49,6 50,8 @@ namespace app::manager
                return ActionRequest{senderName, app::manager::actions::SystemBrownout, nullptr};
            case sys::CloseReason::FactoryReset:
                return ActionRequest{senderName, app::manager::actions::DisplayFactoryResetInProgressScreen, nullptr};
            case sys::CloseReason::OnboardingPowerDown:
                return ActionRequest{senderName, app::manager::actions::DisplayChargeAtExit, nullptr};
            default:
                return ActionRequest{senderName, app::manager::actions::DisplayLogoAtExit, nullptr};
            }

M module-sys/SystemManager/SystemManagerCommon.cpp => module-sys/SystemManager/SystemManagerCommon.cpp +7 -0
@@ 16,6 16,7 @@
#include <service-evtmgr/Constants.hpp>
#include <service-evtmgr/EventManagerServiceAPI.hpp>
#include <service-evtmgr/EVMessages.hpp>
#include <service-appmgr/messages/OnboardingPowerDownRequest.hpp>
#include <service-appmgr/messages/UserPowerDownRequest.hpp>
#include <service-desktop/Constants.hpp>
#include <service-appmgr/Constants.hpp>


@@ 601,6 602,11 @@ namespace sys
            return MessageNone{};
        });

        connect(app::OnboardingPowerDownRequest(), [&](Message *) {
            CloseSystemHandler(CloseReason::OnboardingPowerDown);
            return MessageNone{};
        });

        connect(ReadyToCloseMessage(), [&](Message *msg) {
            ServiceReadyToCloseHandler(msg);
            return MessageNone{};


@@ 713,6 719,7 @@ namespace sys

        switch (closeReason) {
        case CloseReason::RegularPowerDown:
        case CloseReason::OnboardingPowerDown:
        case CloseReason::SystemBrownout:
        case CloseReason::LowBattery:
            DestroyServices(sys::state::regularClose::whitelist);

M module-sys/common/include/system/Common.hpp => module-sys/common/include/system/Common.hpp +1 -0
@@ 48,6 48,7 @@ namespace sys
    enum class CloseReason
    {
        RegularPowerDown,
        OnboardingPowerDown,
        Reboot,
        RebootToRecovery,
        FactoryReset,

M products/BellHybrid/apps/Application.cpp => products/BellHybrid/apps/Application.cpp +6 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include <Application.hpp>


@@ 78,10 78,14 @@ namespace app
                                          return std::make_unique<gui::BellTurnOffWindow>(
                                              app, std::make_unique<gui::BellPowerOffPresenter>(app));
                                      });
                windowsFactory.attach(gui::BellWelcomeWindow::defaultName,
                windowsFactory.attach(gui::BellWelcomeWindow::name,
                                      [](ApplicationCommon *app, const std::string &name) {
                                          return std::make_unique<gui::BellWelcomeWindow>(app);
                                      });
                windowsFactory.attach(gui::BellChargeWelcomeWindow::name,
                                      [](ApplicationCommon *app, const std::string &name) {
                                          return std::make_unique<gui::BellChargeWelcomeWindow>(app);
                                      });
                break;
            case ID::Reboot:
                windowsFactory.attach(window::reboot_window, [](ApplicationCommon *app, const std::string &name) {

M products/BellHybrid/apps/application-bell-main/ApplicationBellMain.cpp => products/BellHybrid/apps/application-bell-main/ApplicationBellMain.cpp +7 -2
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "include/application-bell-main/ApplicationBellMain.hpp"


@@ 59,7 59,12 @@ namespace app
        });

        addActionReceiver(app::manager::actions::DisplayLogoAtExit, [this](auto &&data) {
            requestShutdownWindow(gui::BellWelcomeWindow::defaultName);
            requestShutdownWindow(gui::BellWelcomeWindow::name);
            return actionHandled();
        });

        addActionReceiver(app::manager::actions::DisplayChargeAtExit, [this](auto &&data) {
            requestShutdownWindow(gui::BellChargeWelcomeWindow::name);
            return actionHandled();
        });


M products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp => products/BellHybrid/apps/application-bell-main/include/application-bell-main/ApplicationBellMain.hpp +2 -1
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 61,6 61,7 @@ namespace app
            return {{manager::actions::Launch,
                     manager::actions::ShowAlarm,
                     manager::actions::DisplayLogoAtExit,
                     manager::actions::DisplayChargeAtExit,
                     manager::actions::SystemBrownout,
                     {manager::actions::ChangeHomescreenLayout, manager::actions::ActionFlag::AcceptWhenInBackground}}};
        }

M products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingOnOffWindow.cpp => products/BellHybrid/apps/application-bell-onboarding/windows/OnBoardingOnOffWindow.cpp +3 -3
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "OnBoardingOnOffWindow.hpp"


@@ 116,7 116,7 @@ namespace gui
    void OnBoardingOnOffWindow::registerCallbacks()
    {
        timerCallback = [this](Item &, sys::Timer &timer) {
            presenter->powerOff();
            presenter->powerOff(sys::CloseReason::OnboardingPowerDown);
            return true;
        };
    }


@@ 128,7 128,7 @@ namespace gui
            return true;
        }
        else if (inputEvent.isShortRelease(KeyCode::KEY_RF)) {
            presenter->powerOff();
            presenter->powerOff(sys::CloseReason::OnboardingPowerDown);
            return false;
        }
        return false;

M products/BellHybrid/apps/common/include/common/windows/BellWelcomeWindow.hpp => products/BellHybrid/apps/common/include/common/windows/BellWelcomeWindow.hpp +29 -6
@@ 1,4 1,4 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#pragma once


@@ 11,7 11,7 @@ namespace gui
{
    class BellBaseLayout;

    class BellWelcomeWindow : public AppWindow
    class BellWelcomeWindowBase : public AppWindow
    {
        static constexpr auto midline_correction = 40U;
        static constexpr auto midline_w          = 480U;


@@ 19,17 19,40 @@ namespace gui

      public:
        using Callback                    = std::function<void()>;
        static constexpr auto defaultName = "BellWelcomeWindow";

        explicit BellWelcomeWindow(app::ApplicationCommon *app,
                                   const std::string &name = defaultName,
                                   Callback onAction       = {});
        explicit BellWelcomeWindowBase(app::ApplicationCommon *app,
                                       const std::string &name,
                                       const std::string &icon,
                                       const std::string &message,
                                       Callback onAction = {});

        void buildInterface() override;
        bool onInput(const InputEvent &inputEvent) override;

      private:
        BellBaseLayout *body{nullptr};
        std::string icon;
        std::string message;
        Callback onAction;
    };

    class BellWelcomeWindow : public BellWelcomeWindowBase
    {
      public:
        static constexpr auto name    = "BellWelcomeWindow";
        static constexpr auto icon    = "bell_mudita_logo";
        static constexpr auto message = "app_bell_welcome_message";

        explicit BellWelcomeWindow(app::ApplicationCommon *app, Callback onAction = {});
    };

    class BellChargeWelcomeWindow : public BellWelcomeWindowBase
    {
      public:
        static constexpr auto name    = "BellChargeWelcomeWindow";
        static constexpr auto icon    = "bell_welcome_battery";
        static constexpr auto message = "app_bell_welcome_charge_message";

        explicit BellChargeWelcomeWindow(app::ApplicationCommon *app, Callback onAction = {});
    };
} /* namespace gui */

M products/BellHybrid/apps/common/src/BellPowerOffPresenter.cpp => products/BellHybrid/apps/common/src/BellPowerOffPresenter.cpp +8 -3
@@ 1,9 1,10 @@
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "BellPowerOffPresenter.hpp"

#include <common/windows/BellWelcomeWindow.hpp>
#include <service-appmgr/messages/OnboardingPowerDownRequest.hpp>
#include <service-appmgr/messages/UserPowerDownRequest.hpp>
#include <SystemManager/SystemManagerCommon.hpp>
#include <system/Constants.hpp>


@@ 19,10 20,14 @@ namespace gui
        case sys::CloseReason::FactoryReset:
            sys::SystemManagerCommon::FactoryReset(application);
            break;
        default:
        case sys::CloseReason::OnboardingPowerDown: {
            auto msg = std::make_shared<app::OnboardingPowerDownRequest>();
            application->bus.sendUnicast(std::move(msg), service::name::system_manager);
        } break;
        default: {
            auto msg = std::make_shared<app::UserPowerDownRequest>();
            application->bus.sendUnicast(std::move(msg), service::name::system_manager);
            break;
        } break;
        }
    }
    void BellPowerOffPresenter::reboot()

M products/BellHybrid/apps/common/src/windows/BellWelcomeWindow.cpp => products/BellHybrid/apps/common/src/windows/BellWelcomeWindow.cpp +24 -7
@@ 1,4 1,4 @@
// Copyright (c) 2017-2022, Mudita Sp. z.o.o. All rights reserved.
// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md

#include "windows/BellWelcomeWindow.hpp"


@@ 11,13 11,17 @@

namespace gui
{
    BellWelcomeWindow::BellWelcomeWindow(app::ApplicationCommon *app, const std::string &name, Callback onAction)
        : AppWindow(app, name), onAction{onAction}
    BellWelcomeWindowBase::BellWelcomeWindowBase(app::ApplicationCommon *app,
                                                 const std::string &name,
                                                 const std::string &icon,
                                                 const std::string &message,
                                                 Callback onAction)
        : AppWindow(app, name), icon(icon), message(message), onAction{onAction}
    {
        buildInterface();
    }

    void BellWelcomeWindow::buildInterface()
    void BellWelcomeWindowBase::buildInterface()
    {
        AppWindow::buildInterface();
        statusBar->setVisible(false);


@@ 26,7 30,7 @@ namespace gui

        body = new BellBaseLayout(this, 0, 0, style::window_width, style::window_height, false);

        auto muditaLogo = new ImageBox(body->firstBox, new Image("bell_mudita_logo", ImageTypeSpecifier::W_G));
        auto muditaLogo = new ImageBox(body->firstBox, new Image(this->icon, ImageTypeSpecifier::W_G));
        muditaLogo->setMinimumSizeToFitImage();

        auto welcomeText = new TextFixedSize(body->centerBox);


@@ 35,7 39,7 @@ namespace gui
        welcomeText->setFont(style::window::font::largelight);
        welcomeText->setAlignment(Alignment(Alignment::Horizontal::Center, Alignment::Vertical::Center));
        welcomeText->drawUnderline(false);
        welcomeText->setRichText(utils::translate("app_bell_onboarding_welcome_message"));
        welcomeText->setRichText(utils::translate(this->message));

        auto midLine = new Rect(body->centerBox, 0, 0, 0, 0);
        midLine->setMinimumSize(midline_w, midline_h);


@@ 55,7 59,7 @@ namespace gui
        body->resize();
    }

    bool BellWelcomeWindow::onInput(const InputEvent &inputEvent)
    bool BellWelcomeWindowBase::onInput(const InputEvent &inputEvent)
    {
        if (inputEvent.isKeyRelease(KeyCode::KEY_ENTER)) {
            if (onAction) {


@@ 65,4 69,17 @@ namespace gui
        return false;
    }

    BellWelcomeWindow::BellWelcomeWindow(app::ApplicationCommon *app, Callback onAction)
        : BellWelcomeWindowBase(
              app, BellWelcomeWindow::name, BellWelcomeWindow::icon, BellWelcomeWindow::message, onAction)
    {}

    BellChargeWelcomeWindow::BellChargeWelcomeWindow(app::ApplicationCommon *app, Callback onAction)
        : BellWelcomeWindowBase(app,
                                BellChargeWelcomeWindow::name,
                                BellChargeWelcomeWindow::icon,
                                BellChargeWelcomeWindow::message,
                                onAction)
    {}

} /* namespace gui */

M products/BellHybrid/assets/assets_common.json => products/BellHybrid/assets/assets_common.json +1 -0
@@ 21,6 21,7 @@
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/big_alarm_snoozed_W_M.vpi", "output": "assets/images/big_alarm_snoozed_W_M.vpi"},
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/bell_battery_lvl2_W_M.vpi", "output": "assets/images/bell_battery_lvl2_W_M.vpi"},
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/bell_mudita_logo_W_G.vpi", "output": "assets/images/bell_mudita_logo_W_G.vpi"},
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/bell_welcome_battery_W_G.vpi", "output": "assets/images/bell_welcome_battery_W_G.vpi"},
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/bell_status_battery_lvl5_W_G.vpi", "output": "assets/images/bell_status_battery_lvl5_W_G.vpi"},
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/button_deep_press_W_G.vpi", "output": "assets/images/button_deep_press_W_G.vpi"},
        {"name": "release.tgz", "tarfile" :"image/assets/images/bell/bell_big_logo_W_G.vpi", "output": "assets/images/bell_big_logo_W_G.vpi"},