mirror of
https://github.com/grocy/grocy.git
synced 2026-04-05 12:26:15 +02:00
fix openapi ui
This commit is contained in:
parent
45d7febeed
commit
ab83064e2c
|
|
@ -128,7 +128,6 @@ function clean(cb)
|
||||||
// It can also be used within the `series()` composition.
|
// It can also be used within the `series()` composition.
|
||||||
function build(cb)
|
function build(cb)
|
||||||
{
|
{
|
||||||
// body omitted
|
|
||||||
return parallel(
|
return parallel(
|
||||||
js,
|
js,
|
||||||
css,
|
css,
|
||||||
|
|
@ -136,7 +135,9 @@ function build(cb)
|
||||||
viewjs,
|
viewjs,
|
||||||
resourceFileCopy,
|
resourceFileCopy,
|
||||||
copyLocales,
|
copyLocales,
|
||||||
makeLocales)(cb);
|
makeLocales,
|
||||||
|
openApi,
|
||||||
|
)(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
function publish(cb)
|
function publish(cb)
|
||||||
|
|
@ -230,6 +231,14 @@ function copyLocales(cb)
|
||||||
)(cb);
|
)(cb);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openApi(cb)
|
||||||
|
{
|
||||||
|
return parallel(
|
||||||
|
icb => src(['./node_modules/swagger-ui-dist/*.js', './node_modules/swagger-ui-dist/*.js.map']).pipe(dest('./public/js')),
|
||||||
|
icb => src(['./node_modules/swagger-ui-dist/*.css', './node_modules/swagger-ui-dist/*.css.map']).pipe(dest('./public/css')),
|
||||||
|
)(cb);
|
||||||
|
}
|
||||||
|
|
||||||
function live(cb)
|
function live(cb)
|
||||||
{
|
{
|
||||||
watch('./scss/**/*.scss', css);
|
watch('./scss/**/*.scss', css);
|
||||||
|
|
@ -302,5 +311,6 @@ export
|
||||||
publish,
|
publish,
|
||||||
release,
|
release,
|
||||||
bundle,
|
bundle,
|
||||||
makeLocales
|
makeLocales,
|
||||||
|
openApi
|
||||||
}
|
}
|
||||||
|
|
@ -24,5 +24,4 @@ const swaggerUi = SwaggerUIBundle({
|
||||||
docExpansion: "list"
|
docExpansion: "list"
|
||||||
});
|
});
|
||||||
|
|
||||||
window.ui = swaggerUi;
|
window.ui = swaggerUi;
|
||||||
|
|
||||||
|
|
@ -90,6 +90,7 @@
|
||||||
data-apikey-id="{{ $apiKey->id }}"
|
data-apikey-id="{{ $apiKey->id }}"
|
||||||
data-apikey-apikey="{{ $apiKey->api_key }}"
|
data-apikey-apikey="{{ $apiKey->api_key }}"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
|
data-boundary="viewport"
|
||||||
title="{{ $__t('Delete this item') }}">
|
title="{{ $__t('Delete this item') }}">
|
||||||
<i class="fas fa-trash"></i>
|
<i class="fas fa-trash"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -98,6 +99,7 @@
|
||||||
data-apikey-key="{{ $apiKey->api_key }}"
|
data-apikey-key="{{ $apiKey->api_key }}"
|
||||||
data-apikey-type="{{ $apiKey->key_type }}"
|
data-apikey-type="{{ $apiKey->key_type }}"
|
||||||
data-toggle="tooltip"
|
data-toggle="tooltip"
|
||||||
|
data-boundary="viewport"
|
||||||
title="{{ $__t('Show a QR-Code for this API key') }}">
|
title="{{ $__t('Show a QR-Code for this API key') }}">
|
||||||
<i class="fas fa-qrcode"></i>
|
<i class="fas fa-qrcode"></i>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
<title>{{ $__t('REST API & data model documentation') }} | grocy</title>
|
<title>{{ $__t('REST API & data model documentation') }} | grocy</title>
|
||||||
|
|
||||||
<link href="{{ $U('/node_modules/swagger-ui-dist/swagger-ui.css?v=', true) }}{{ $version }}"
|
<link href="{{ $U('/css/swagger-ui.css?v=', true) }}{{ $version }}"
|
||||||
rel="stylesheet">
|
rel="stylesheet">
|
||||||
|
|
||||||
@if(file_exists(GROCY_DATAPATH . '/custom_css.html'))
|
@if(file_exists(GROCY_DATAPATH . '/custom_css.html'))
|
||||||
|
|
@ -60,9 +60,9 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="swagger-ui"></div>
|
<div id="swagger-ui"></div>
|
||||||
|
|
||||||
<script src="{{ $U('/node_modules/swagger-ui-dist/swagger-ui.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/js/swagger-ui.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/swagger-ui-dist/swagger-ui-bundle.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/js/swagger-ui-bundle.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/node_modules/swagger-ui-dist/swagger-ui-standalone-preset.js?v=', true) }}{{ $version }}"></script>
|
<script src="{{ $U('/js/swagger-ui-standalone-preset.js?v=', true) }}{{ $version }}"></script>
|
||||||
<script src="{{ $U('/viewjs', true) }}/openapiui.js?v={{ $version }}"></script>
|
<script src="{{ $U('/viewjs', true) }}/openapiui.js?v={{ $version }}"></script>
|
||||||
|
|
||||||
@if(file_exists(GROCY_DATAPATH . '/custom_js.html'))
|
@if(file_exists(GROCY_DATAPATH . '/custom_js.html'))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user