Skip to content
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

feat: add more actions to track menu and updated simplified chinese translation #966

Merged
merged 1 commit into from
Sep 2, 2024

Conversation

dyphire
Copy link
Contributor

@dyphire dyphire commented Sep 1, 2024

No description provided.

@tomasklaen
Copy link
Owner

This will need some more tweaking, and refactoring of the code above since I'd want the shortcuts to be f5 and del, not the current modifiers of enter, and current code doesn't allow that. I also see a bug in my code. Gimme a sec.

@tomasklaen
Copy link
Owner

tomasklaen commented Sep 1, 2024

All right:

  1. Rebase.

  2. Remove the modifier code from handle_activate function for these two actions.

  3. Split the remove and reload code into remove() and reload() functions.

  4. Create a new:

---@param event MenuEventKey
local function handle_key(event)
	if event.id == 'f5' then
		reload()
	elseif event.id == 'del' then
		remove()
	end
end

and add it to on_key prop below.

@dyphire
Copy link
Contributor Author

dyphire commented Sep 1, 2024

Since on_key doesn't pass the event.value, I can't get it to work properly.

Edit: I got something wrong and now implement it correctly.

@tomasklaen
Copy link
Owner

Eh, there's lots more things to refactor here, but I won't torment you with these back and forths further. I'll take care of it. Thx for PR!

@tomasklaen tomasklaen merged commit bb83e40 into tomasklaen:main Sep 2, 2024
dyphire pushed a commit to dyphire/uosc that referenced this pull request Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants