[#32] added setup in readme and support to missing applist.js
This commit is contained in:
committed by
Benoit TELLIER
parent
aa498ac91f
commit
290c7f301b
@@ -75,7 +75,23 @@ And then visit [https://localhost:5000](https://localhost:5000).
|
||||
|
||||
## Configuring it
|
||||
|
||||
More details to be supplied when available.
|
||||
### App grid
|
||||
|
||||
An applist is configurable in the public folder to setup the grid of app accessible within Twake Calendar.
|
||||
|
||||
Each app has three fields:
|
||||
|
||||
- name: the app’s name
|
||||
- icon: the link to the app’s icon
|
||||
- link: the app’s link or URL
|
||||
|
||||
Example:
|
||||
|
||||
```js
|
||||
var appList = [
|
||||
{ name: "My App", icon: "https://myapp.com/myapp.png", link: "https://myapp.com" },
|
||||
];
|
||||
```
|
||||
|
||||
## Roadmap
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ export type AppIconProps = {
|
||||
|
||||
export function Menubar() {
|
||||
const user = useAppSelector((state) => state.user.userData);
|
||||
const applist: AppIconProps[] = (window as any).appList;
|
||||
const applist: AppIconProps[] = (window as any).appList ?? [];
|
||||
const [anchorEl, setAnchorEl] = useState<null | HTMLElement>(null);
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
@@ -93,6 +93,7 @@ function AppIcon({ prop }: { prop: AppIconProps }) {
|
||||
<a
|
||||
key={prop.name}
|
||||
href={prop.link}
|
||||
target="_blank"
|
||||
style={{ textDecoration: "none", color: "inherit" }}
|
||||
>
|
||||
<div>
|
||||
|
||||
Reference in New Issue
Block a user