feat(mobile app): add admin mobile settings for apple watch
DI
2d ago+596+596+012345678901234567890123456789-3-3-0123456789
Proposed changes (including videos or screenshots)
Adds three admin settings for the Apple Watch quick replies, in Administration > Settings > Mobile > Apple Watch:
| Setting | Default | Allowed range |
|---|---|---|
Apple_Watch_Quick_Actions: the default replies, comma-separated, that seed a user's list at first login | OK,Yes,No,On my way,Will follow up shortly | n/a |
Apple_Watch_Quick_Actions_Max_Count: the most replies a user can keep | 10 | 1 to 100 |
Apple_Watch_Quick_Actions_Max_Length: the most characters in one reply | 30 | 1 to 100 |
All three are public so the app can read them from settings.public before login. The defaults of 10 and 30 match the limits the app used before, so a server on defaults behaves like today's app. There is no on/off toggle: an admin who wants no defaults empties Apple_Watch_Quick_Actions.
The bounds are enforced on save through minValue and maxValue. ISetting only declared them on range settings, so int settings get an ISettingInt type with optional bounds (its own commit and changeset).
The app side is https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/6957.
Issue(s)
https://github.com/RocketChat/Rocket.Chat.ReactNative/pull/6957
Screenshots
Steps to test or reproduce
- Open Administration > Settings > Mobile and expand the Apple Watch section. It shows the three settings with their defaults.
- Try to save
20000in either limit. The server refuses it: the value must be less than or equal to 100. - Save a valid value, for example
20, and checkGET /api/v1/settings.public?_id=Apple_Watch_Quick_Actions_Max_Count,Apple_Watch_Quick_Actions_Max_Lengthreturns it.
Further comments
Summary by CodeRabbit
- New Features
- Added administrator settings for Apple Watch quick replies, with preset replies: “OK,” “Yes,” “No,” “On my way,” and “Will follow up shortly.”
- Configure the maximum number of replies and reply length, each from 1 to 100. Defaults are 10 replies and 30 characters.
- Default replies are added on first login from a device with the Watch app, without replacing existing lists. Excess defaults are omitted, and overlong replies are shortened.
- Localization
- Added translations for Apple Watch quick-reply settings in supported languages.