mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-24 07:55:07 +01:00
Simplify rendering of content type pages and logic of selecting config
This commit is contained in:
parent
260272dca2
commit
ea3dc2cfa3
3 changed files with 1 additions and 5 deletions
|
@ -35,8 +35,6 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
<button type="button" id="add-repository-button">Add Repository</button>
|
<button type="button" id="add-repository-button">Add Repository</button>
|
||||||
<h4 style="display: none;">You probably don't need to edit these.</h4>
|
|
||||||
|
|
||||||
<table style="display: none;" >
|
<table style="display: none;" >
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -44,8 +44,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h4 style="display: none;">You probably don't need to edit these.</h4>
|
|
||||||
|
|
||||||
<table style="display: none;" >
|
<table style="display: none;" >
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -38,7 +38,7 @@ if not state.demo:
|
||||||
search_type=None,
|
search_type=None,
|
||||||
processor=None,
|
processor=None,
|
||||||
)
|
)
|
||||||
current_config = state.config if state.config else json.loads(default_full_config.json())
|
current_config = state.config or json.loads(default_full_config.json())
|
||||||
return templates.TemplateResponse("config.html", context={"request": request, "current_config": current_config})
|
return templates.TemplateResponse("config.html", context={"request": request, "current_config": current_config})
|
||||||
|
|
||||||
@web_client.get("/config/content_type/github", response_class=HTMLResponse)
|
@web_client.get("/config/content_type/github", response_class=HTMLResponse)
|
||||||
|
|
Loading…
Reference in a new issue