Add new views for App Info, and Configure App

and a way to specify version/url overrides for buefy, vue etc.

also, begin logic for "standard" admin menu
This commit is contained in:
Lance Edgar 2023-01-12 15:19:46 -06:00
parent 2163522e7c
commit d842a3d8e0
11 changed files with 752 additions and 26 deletions

View file

@ -0,0 +1,114 @@
## -*- coding: utf-8; -*-
<%inherit file="/master/index.mako" />
<%def name="render_grid_component()">
<b-collapse class="panel" open>
<template #trigger="props">
<div class="panel-heading"
role="button">
## TODO: for some reason buefy will "reuse" the icon
## element in such a way that its display does not
## refresh. so to work around that, we use different
## structure for the two icons, so buefy is forced to
## re-draw
<b-icon v-if="props.open"
pack="fas"
icon="angle-down">
</b-icon>
<span v-if="!props.open">
<b-icon pack="fas"
icon="angle-right">
</b-icon>
</span>
<strong>Configuration Files</strong>
</div>
</template>
<div class="panel-block">
<div style="width: 100%;">
<b-table :data="configFiles">
% if buefy_0_8:
<template slot-scope="props">
% endif
<b-table-column field="priority"
label="Priority"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.priority }}
</b-table-column>
<b-table-column field="path"
label="File Path"
% if not buefy_0_8:
v-slot="props"
% endif
>
{{ props.row.path }}
</b-table-column>
% if buefy_0_8:
</template>
% endif
</b-table>
</div>
</div>
</b-collapse>
<b-collapse class="panel"
:open="false">
<template #trigger="props">
<div class="panel-heading"
role="button">
## TODO: for some reason buefy will "reuse" the icon
## element in such a way that its display does not
## refresh. so to work around that, we use different
## structure for the two icons, so buefy is forced to
## re-draw
<b-icon v-if="props.open"
pack="fas"
icon="angle-down">
</b-icon>
<span v-if="!props.open">
<b-icon pack="fas"
icon="angle-right">
</b-icon>
</span>
<strong>Installed Packages</strong>
</div>
</template>
<div class="panel-block">
<div style="width: 100%;">
${parent.render_grid_component()}
</div>
</div>
</b-collapse>
</%def>
<%def name="modify_this_page_vars()">
${parent.modify_this_page_vars()}
<script type="text/javascript">
ThisPageData.configFiles = ${json.dumps([dict(path=p, priority=i) for i, p in enumerate(reversed(request.rattail_config.files_read), 1)])|n}
</script>
</%def>
${parent.body()}