chore: translate tray
This commit is contained in:
@@ -21,19 +21,6 @@ class _HomePageState extends State<HomePage> with TrayListener {
|
|||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
trayManager.addListener(this);
|
trayManager.addListener(this);
|
||||||
trayManager.setIcon(''); // TODO
|
|
||||||
Menu menu = Menu(
|
|
||||||
items: [
|
|
||||||
MenuItem(
|
|
||||||
key: 'show_window',
|
|
||||||
label: 'Show Window',
|
|
||||||
onClick: (menuItem) {
|
|
||||||
windowManager.show();
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
trayManager.setContextMenu(menu);
|
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,6 +47,20 @@ class _HomePageState extends State<HomePage> with TrayListener {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
trayManager.setIcon(''); // TODO
|
||||||
|
Menu menu = Menu(
|
||||||
|
items: [
|
||||||
|
MenuItem(
|
||||||
|
key: 'show_window',
|
||||||
|
label: AppLocalizations.of(context)!.showWindow,
|
||||||
|
onClick: (menuItem) {
|
||||||
|
windowManager.show();
|
||||||
|
},
|
||||||
|
),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
trayManager.setContextMenu(menu);
|
||||||
|
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Row(
|
body: Row(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
@@ -125,7 +126,7 @@ class _HomePageState extends State<HomePage> with TrayListener {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
void onTrayIconMouseDown() {
|
void onTrayIconMouseDown() {
|
||||||
trayManager.popUpContextMenu();
|
windowManager.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@@ -18,5 +18,6 @@
|
|||||||
"notImplement": "Work in progress",
|
"notImplement": "Work in progress",
|
||||||
"disconnect": "Disconnect",
|
"disconnect": "Disconnect",
|
||||||
"use": "Use It",
|
"use": "Use It",
|
||||||
"configNameComment": "Write a name for this config"
|
"configNameComment": "Write a name for this config",
|
||||||
|
"showWindow": "Show Window"
|
||||||
}
|
}
|
@@ -18,5 +18,6 @@
|
|||||||
"notImplement": "功能尚未开发, 敬请期待~",
|
"notImplement": "功能尚未开发, 敬请期待~",
|
||||||
"disconnect": "断开连接",
|
"disconnect": "断开连接",
|
||||||
"use": "使用",
|
"use": "使用",
|
||||||
"configNameComment": "给这个配置备注一个名字"
|
"configNameComment": "给这个配置备注一个名字",
|
||||||
|
"showWindow": "显示主面板"
|
||||||
}
|
}
|
Reference in New Issue
Block a user