https://github.com/cloudmosa/cloudphone-react-sample
Cloud Phone sample widget using React
https://github.com/cloudmosa/cloudphone-react-sample
cloudphone javascript react
Last synced: 2 months ago
JSON representation
Cloud Phone sample widget using React
- Host: GitHub
- URL: https://github.com/cloudmosa/cloudphone-react-sample
- Owner: cloudmosa
- License: apache-2.0
- Created: 2024-12-21T04:37:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-06T05:15:20.000Z (over 1 year ago)
- Last Synced: 2026-01-02T04:57:44.560Z (6 months ago)
- Topics: cloudphone, javascript, react
- Language: JavaScript
- Homepage: https://cloudmosa.github.io/cloudphone-react-sample/
- Size: 1.19 MB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# [Cloud Phone](https://www.cloudfone.com/) - React Sample Widget
:beginner: This is a beginner guide on [Cloud Phone](https://www.cloudfone.com/) widget development, created using [Vite](https://vite.dev/guide/), as a sample repository.
[https://cloudmosa.github.io/cloudphone-react-sample/](https://cloudmosa.github.io/cloudphone-react-sample/)
Below are screenshots of this sample application on the [Itel NEO R60+ 4G](https://itel-pk.com/products/neo-r60), a QVGA (240x320) Cloud Phone with WiFi connectivity.
## :notebook: Prerequisites
* [Node & npm](https://nodejs.org/en/download/)
* [Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)
* A [GitHub](https://github.com/signup) account :octocat:
## :page_facing_up: Pages
### ``
The default page that uses an OptionsMenu for navigating to About, Settings, or Privacy (external).
### ``
A simple page displaying a static description.
### ``
A page for configuring the application. By default, the application will detect the best candidate from the browser's language. Users can override this on the settings page.
## :wrench: Components
### ``
A header displayed at the top of the screen. Includes a fixed logo and a `title` property that updates both `document.title` and an `h1` tag displaying the title on screen.
### ``
A modal containing a list of menu items. Supports T9 keyboard navigation. Focus is moved using `ArrowUp` and `ArrowDown`. Menu items are selected using `Enter`.
### ``
An on-screen menu bar with three actions in the positions `start` (left), `center`, and `end` (right). Supports both icon and text actions triggered via a global `keydown` event listener.
On Cloud Phone, soft keys are mapped as follows:
| Name | Key | Function |
| --------------------- | ------------- | ----------------- |
| Left Soft Key (LSK) | `Escape` | Programmable |
| Right Soft Key (RSK) | N/A | `history.back()` |
| Enter | `Enter` | Programmable |
Because developers cannot override the RSK behavior, clicking RSK also calls `history.back()` to reproduce the same behavior on desktop browsers.
## :rocket: Deploy to GitHub Pages
[GitHub Pages](https://pages.github.com/) offers free hosting for public open-source repositories. This project uses the [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) GitHub Action to build and deploy HTML, CSS, and JS to the `gh-pages` branch.
> [!WARNING]
> Although it's possible to configure [custom domain names](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages), "GitHub Pages is not intended for or allowed to be used... either facilitating commercial transactions or providing commercial software" ([see Prohibited Uses](https://docs.github.com/en/pages/getting-started-with-github-pages/about-github-pages#prohibited-uses)). Use GitHub Pages for production applications at your own risk.
## :sunglasses: Developer Program
Register for the [Cloud Phone Developer Program](https://www.cloudfone.com/developer-program) to upload test widgets and use the Cloud Phone Simulator.


## :free: License
Licensed under the [Apache 2.0](./LICENSE) license