-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Customizable "Open with" applications for repository clone #29320
Conversation
At the moment, it doesn't support user-level customization, because the "user setting" package is not that mature as the system setting package. It should be easy to add user-level setting in the future, just override the system setting. |
7ada444
to
5d387d9
Compare
Can we add a reset button? |
ffbe671 , I am not sure whether it works.
Just clear the textarea, then this setting is reset. |
|
So feel free to remove it. |
Can this be sourced from the config as well? I don't recall if we have a mechanism for that. |
If anyone really needs "sourcing from the config", I could propose a following PR. The "system setting" package has the ability to do so. But I do not think it's worth to do so at the moment. I guess we don't want to maintain too many config systems or config documents. |
I would like to move most configurations from app.ini to database/UI but not the opposite. |
Then perhaps an API/CLI to set these things. My concern is only being able to set/change these from the web UI. Manually fiddling with the database seems like a no-go for deployment purposes. |
Sure, I fully understand this point. So if there is a real requirement in the future, I will propose related solutions. |
Maybe a generic Configuration API is better. |
Could you please add a docs page showing what common editors expect? |
Sorry I didn't quite catch your point. Could you elaborate "what kind of doc page / where to be put" and what is "what common editors expect" ? If you mean that "show users the example links for some editors", you could just click here, then you will see all builtin editors, they could be used as example. |
@@ -15,8 +15,45 @@ type PictureStruct struct { | |||
EnableFederatedAvatar *config.Value[bool] | |||
} | |||
|
|||
type OpenWithEditorApp struct { |
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.
Is there perhaps any way to set a custom icon, i.e. as a file path?
Once we have this option, this feature is truly complete.
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 have left a TODO in code:
iconHTML = svg.RenderHTML("gitea-git", 16, "gt-mr-3") // TODO: it could support user's customized icon in the future
To support "custom icon", it needs far more changes: it needs an extra field, and needs a new UI editor for the config items (at least, a YAML or JSON editor). It still needs the end user to upload the icon to "somewhere", I guess most users would be quite lazy to do so .....
So at the moment, the default "git" icons looks not bad.
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.
SVG icons could be entered as text in that box, e.g. name=url,icon=<svg/>
. That said, I kind of dislike that the current syntax is not pure key=value pairs.
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.
Yup, that's why I think "and needs a new UI editor for the config items (at least, a YAML or JSON editor)".
Let's collect more user feedbacks, to see how to move on.
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 guess we better already change the syntax to yaml/json now.
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.
That's quite easy because it is stored as JSON in database. So, it could be rendered as JSON or YAML in the editor easily. It won't block anything.
I think this approach is simple and flexible enough. And it is a complete solution.
Replace #22378
Close #21121
Close #22149
Default
Customized