-
-
Notifications
You must be signed in to change notification settings - Fork 170
admin2: Add GUI panel for mute #684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you close admin panel while the mute GUI is open, it doesn't close, and then after that I clicked close (with console) and GUI won't close.
Also it's not very user friendly if you want to set a custom time, say 1 month, right now you'd have to open calculator to see how many seconds are in a month. Nobody wants to mute someone for less than 1 minute anyway, so at least the box should be minutes not seconds, and or have different boxes, so you can put amount of seconds, minutes, hours, or days. |
I agree mute duration should be minutes by default, but also allow other units of measurement for custom needs (seconds, hours..) |
Alright, I’ll start working on the fix tonight. |
It works correctly for me. can u explain more what u did? |
You're right, what you have to do is, press mute twice, then close the panel and you're stuck with a second panel. So basically when you click mute, don't make another GUI if one already exists. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this quite resolves #108, as it mutes are not able to persist if the server or resource restarts. There will also need to be a new tab to view, modify, and delete existing mutes.
I don't know where to save the data because admin2 saves some data in conf/***.xml and some in admin.db too |
Use this existing connection to admin.db: connection = dbConnect("sqlite", "admin.db"), And use the dbExec and dbQuery functions and use dbQuery call back function feature. |
Thanks for the review. I've included everything in the last commit, |
I added a mute on myself and don't see it in mutes tab and refresh button is disabled? |
You need to update your acl.xml because I added some new access <right name="general.tab_mutes" access="true"></right>
<right name="command.listmute" access="true"></right> |
New ACL rights need to be added to ACL.xml, otherwise the admin2 resource won’t add them with the rest of the rights on start. |
Ty, I thought I should make a PR in mtasa-blue to update the ACL, but I didn’t see this file. |
Summary
Preview:
Edited
I did a mention for issue 106 by mistake