unify menu icon
This commit is contained in:
parent
91f3048ac2
commit
71c50e6f1e
@ -83,7 +83,7 @@ class PlatformFFI {
|
|||||||
|
|
||||||
static void setMethodCallHandler(FMethod callback) {}
|
static void setMethodCallHandler(FMethod callback) {}
|
||||||
|
|
||||||
static Future<bool> invokeMethod(String method) async {
|
static Future<bool> invokeMethod(String method, [ dynamic arguments]) async {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ class ChatPage extends StatelessWidget implements PageShape {
|
|||||||
@override
|
@override
|
||||||
final appBarActions = [
|
final appBarActions = [
|
||||||
PopupMenuButton<int>(
|
PopupMenuButton<int>(
|
||||||
icon: Icon(Icons.list_alt),
|
icon: Icon(Icons.more_vert),
|
||||||
itemBuilder: (context) {
|
itemBuilder: (context) {
|
||||||
final chatModel = FFI.chatModel;
|
final chatModel = FFI.chatModel;
|
||||||
final serverModel = FFI.serverModel;
|
final serverModel = FFI.serverModel;
|
||||||
@ -176,8 +176,7 @@ class _ChatWindowOverlayState extends State<ChatWindowOverlay> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
checkScreenSize() {
|
checkScreenSize() {}
|
||||||
}
|
|
||||||
|
|
||||||
checkKeyboard() {
|
checkKeyboard() {
|
||||||
final bottomHeight = MediaQuery.of(context).viewInsets.bottom;
|
final bottomHeight = MediaQuery.of(context).viewInsets.bottom;
|
||||||
|
@ -286,7 +286,9 @@ class _WebMenuState extends State<WebMenu> {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
Provider.of<FfiModel>(context);
|
Provider.of<FfiModel>(context);
|
||||||
final username = getUsername();
|
final username = getUsername();
|
||||||
return PopupMenuButton<String>(itemBuilder: (context) {
|
return PopupMenuButton<String>(
|
||||||
|
icon: Icon(Icons.more_vert),
|
||||||
|
itemBuilder: (context) {
|
||||||
return [
|
return [
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate('ID/Relay Server')),
|
child: Text(translate('ID/Relay Server')),
|
||||||
@ -303,7 +305,8 @@ class _WebMenuState extends State<WebMenu> {
|
|||||||
value: "about",
|
value: "about",
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}, onSelected: (value) {
|
},
|
||||||
|
onSelected: (value) {
|
||||||
if (value == 'server') {
|
if (value == 'server') {
|
||||||
showServer();
|
showServer();
|
||||||
}
|
}
|
||||||
|
@ -17,7 +17,9 @@ class ServerPage extends StatelessWidget implements PageShape {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
final appBarActions = [
|
final appBarActions = [
|
||||||
PopupMenuButton<String>(itemBuilder: (context) {
|
PopupMenuButton<String>(
|
||||||
|
icon: Icon(Icons.more_vert),
|
||||||
|
itemBuilder: (context) {
|
||||||
return [
|
return [
|
||||||
PopupMenuItem(
|
PopupMenuItem(
|
||||||
child: Text(translate("Change ID")),
|
child: Text(translate("Change ID")),
|
||||||
@ -35,7 +37,8 @@ class ServerPage extends StatelessWidget implements PageShape {
|
|||||||
enabled: FFI.serverModel.isStart,
|
enabled: FFI.serverModel.isStart,
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
}, onSelected: (value) {
|
},
|
||||||
|
onSelected: (value) {
|
||||||
if (value == "changeID") {
|
if (value == "changeID") {
|
||||||
// TODO
|
// TODO
|
||||||
} else if (value == "changePW") {
|
} else if (value == "changePW") {
|
||||||
@ -43,9 +46,9 @@ class ServerPage extends StatelessWidget implements PageShape {
|
|||||||
} else if (value == "refreshPW") {
|
} else if (value == "refreshPW") {
|
||||||
() async {
|
() async {
|
||||||
showLoading(translate("Waiting"));
|
showLoading(translate("Waiting"));
|
||||||
if(await FFI.serverModel.updatePassword("")){
|
if (await FFI.serverModel.updatePassword("")) {
|
||||||
showSuccess();
|
showSuccess();
|
||||||
}else{
|
} else {
|
||||||
showError();
|
showError();
|
||||||
}
|
}
|
||||||
debugPrint("end updatePassword");
|
debugPrint("end updatePassword");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user