mirror of
https://codeberg.org/davrot/forgejo.git
synced 2025-07-13 07:00:04 +02:00
Use monaco for the git hook editor (#13552)
Migrate git hook editor to monaco, replacing CodeMirror. Had to do a few refactors to make the monaco instantiation generic enough to be of use. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This commit is contained in:
parent
a2efcb6acc
commit
374ff60465
7 changed files with 74 additions and 62 deletions
|
@ -14,13 +14,13 @@
|
|||
{{with .Hook}}
|
||||
<div class="inline field">
|
||||
<label>{{$.i18n.Tr "repo.settings.githook_name"}}</label>
|
||||
<span>{{.Name}}</span>
|
||||
<span class="hook-filename">{{.Name}}</span>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="content">{{$.i18n.Tr "repo.settings.githook_content"}}</label>
|
||||
<textarea id="content" name="content" rows="20" wrap="off" autofocus>{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||
<textarea id="content" name="content" class="hide">{{if .IsActive}}{{.Content}}{{else}}{{.Sample}}{{end}}</textarea>
|
||||
<div class="editor-loading is-loading"></div>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<button class="ui green button">{{$.i18n.Tr "repo.settings.update_githook"}}</button>
|
||||
</div>
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
<div class="item">
|
||||
<span class="text {{if .IsActive}}green{{else}}grey{{end}}">{{svg "octicon-dot-fill"}}</span>
|
||||
<span>{{.Name}}</span>
|
||||
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}"><i class="fa fa-pencil"></i></a>
|
||||
<a class="text blue ui right" href="{{$.RepoLink}}/settings/hooks/git/{{.Name}}">
|
||||
{{svg "octicon-pencil"}}
|
||||
</a>
|
||||
</div>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue