You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/docs/tutorial/config.md
+15-6Lines changed: 15 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,17 @@ A simple example:
35
35
"bongocat": "/example/bongocat.html"
36
36
},
37
37
"startup": ["example.bar", "example.dock"],
38
-
"services": ["notifd.added:/notify.html"]
38
+
"services": [
39
+
{
40
+
"event": "notifd.added",
41
+
"page": "/notify.html"
42
+
},
43
+
{
44
+
"event": "polkitAgent.begin",
45
+
"page": "/example/polkitAgent.html",
46
+
"single": false
47
+
}
48
+
]
39
49
}
40
50
```
41
51
@@ -59,17 +69,16 @@ It’s a list of strings, where each item is a page name—either an alias or a
59
69
60
70
## Services
61
71
62
-
The `services` field defines services to be registered while mika-shell is running.
63
-
It’s a list of strings in the format `<event-name>:<page>`, where `event-name` is the name of a mika-shell event and `page`is the page to open (alias or full path).
72
+
The `services` field is used to configure the services registered at runtime in mika-shell.
73
+
In this field, `event` refers to the name of the mika-shell event, and `page`refers to the page to be opened (either an alias or a full web page path).
64
74
65
-
When the specified event occurs, the given page is opened and the event’s data is passed to the page via a query string.
66
-
You can access the data in JavaScript like this:
75
+
When the specified event occurs, the assigned page will automatically open, and the event data will be passed to the page via a query string. The event data can be retrieved in the web page using
Once the registered page is opened by the event, that service will not trigger again until the page is closed.
81
+
If the `single` field is set to `true`, once the registered page is opened by the event, the service will not be triggered again until the target page is closed.
73
82
74
83
You can find valid `event-name` values here: [Event List](https://github.com/MikaShell/mika-shell/blob/main/src/events.zig#L2).
Copy file name to clipboardExpand all lines: i18n/en.toml
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -3,8 +3,8 @@ get_started = "Get Started"
3
3
features1-title = "Enjoy the Existing Web Tech Ecosystem"
4
4
features1-text = "It’s just about building front-end pages. Whether you use React, Angular, Vue, or any other stack, you can easily integrate it into your project."
0 commit comments