Example app

This commit is contained in:
chip committed 2020-09-27 01:56:26 +02:00
1 parent ce704a9087
commit 3a172a425b
4 files changed
+31 -1

No files matched your search

+1 -1
View File
@@ -79,7 +79,7 @@ function Phone() {
return null;
}
const calling = true;
const calling = false;
return (
<ThemeProvider theme={currentTheme()}>
@@ -0,0 +1,18 @@
import React from "react";
import { AppWrapper } from "../../../ui/components";
import { AppTitle } from "../../../ui/components/AppTitle";
import { AppContent } from "../../../ui/components/AppContent";
import { useApp } from "../../../os/apps/hooks/useApps";
export const ExampleApp = () => {
const example = useApp("EXAMPLE");
return (
<AppWrapper>
<AppTitle app={example} />
<AppContent>
<h1>This is an example</h1>
</AppContent>
</AppWrapper>
);
};
+1
View File
@@ -7,6 +7,7 @@
"APPS_CALCULATOR": "Calculator",
"APPS_SETTINGS": "Settings",
"APPS_BANK": "WhoDis Banking",
"APPS_EXAMPLE": "Example app",
"APPS_BANK_DEPOSIT": "Deposit",
"APPS_BANK_WITHDRAW": "Withdraw",
"APPS_BANK_TRANSFER": "Transfer",
+11
View File
@@ -11,6 +11,7 @@ import {
import ContactsIcon from "@material-ui/icons/Contacts";
import SettingsIcon from "@material-ui/icons/Settings";
import PhoneIcon from "@material-ui/icons/Phone";
import CalendarTodayIcon from "@material-ui/icons/CalendarToday";
import AccountBalanceIcon from "@material-ui/icons/AccountBalance";
import MessageIcon from "@material-ui/icons/Message";
import { atom } from "recoil";
@@ -22,6 +23,7 @@ import { CalculatorApp } from "../../../apps/calculator/components/CalculatorApp
import { SettingsApp } from "../../../apps/settings/components/SettingsApp";
import { BankApp } from "../../../apps/bank/components/BankApp";
import { MessagesApp } from "../../../apps/messages/components/MessagesApp";
import { ExampleApp } from "../../../apps/example/components/ExampleApp";
const appsState = atom({
key: "apps",
@@ -81,6 +83,15 @@ const appsState = atom({
path: "/bank",
Route: () => <Route path="/bank" component={BankApp} />,
},
{
id: "EXAMPLE",
nameLocale: "APPS_EXAMPLE",
icon: <CalendarTodayIcon />,
backgroundColor: blue[500],
color: blue[50],
path: "/example",
Route: () => <Route path="/example" component={ExampleApp} />,
},
],
},
});