- App.tsx: full navigation (Auth stack + Main tabs with 5 screens) - Auth: LoginScreen, RegisterScreen, ForgotPasswordScreen - HomeScreen: dashboard with IoT metrics, weather widget, alerts, quick actions, sensors - MapScreen: interactive map with layer toggles (6 layers) - MarketplaceScreen: categories (6), products (5), search - ChatScreen: AI chat with quick prompts (4), bot responses - ProfileScreen: user info, stats, menu (9 items), logout - AlertsScreen: alert list with severity, acknowledge - SensorsScreen: sensor list with type filters (6 types), search - ZonesScreen: zone cards with stats - SettingsScreen: language picker (FR/EN/ES/DE), privacy, about - Stores: iotStore (sensors, zones, alerts), notificationStore, uiStore + i18n - Hooks: useSensors, useAlerts, useNotifications, useLocation - Components: Card, Button, LoadingSpinner, ErrorBoundary, Header - Services: iotService, notificationService (with axios API client) - Utils: formatters (temp, AQI, noise, dates), validators (email, password, IBAN) - Theme: colors.ts with full design system (Blue Ocean palette) - Ditto: fixed MongoDB connection, new JWT secrets, official gateway image
35 lines
926 B
Markdown
35 lines
926 B
Markdown
# better-opn
|
|
|
|
> A better opn. Reuse the same tab on Chrome for 👨💻. Inspire by [create-react-app](https://github.com/facebook/create-react-app)
|
|
|
|
## Install
|
|
|
|
> `$ yarn add better-opn`
|
|
|
|
> `$ npm install better-opn`
|
|
|
|
|
|
## Usage
|
|
|
|
If you wish to overwrite the default browser, override `BROWSER` environment variable to your desired browser name (name is platform dependent).
|
|
|
|
```js
|
|
const opn = require('better-opn');
|
|
|
|
opn('http://localhost:3000');
|
|
```
|
|
|
|
### Reuse tab by match host
|
|
|
|
In case your app can navigate to another pathnames and still want to reuse opened tab, set environment variable `OPEN_MATCH_HOST_ONLY=true` can tell this program to find reusable tab by only match the host part of your URL.
|
|
|
|
```js
|
|
process.env.OPEN_MATCH_HOST_ONLY = 'true';
|
|
|
|
opn('http://localhost:3000/foo/bar'); // This will reuse any tab with URL starting with http://localhost:3000/
|
|
```
|
|
|
|
## Author
|
|
|
|
- [Michael Lin](https://michaellin.me)
|