1
0
mirror of https://github.com/webrecorder/pywb.git synced 2025-03-15 00:03:28 +01:00

ui: config: rename ui vars to 'vue_calendar_ui' and 'vue_timeline_banner'

ui: fix loading search page
ensure embedded mode is working
update to wombat 3.3.6
bump to 2.7.0b0
This commit is contained in:
Ilya Kreymer 2021-12-13 19:03:43 -08:00
parent eae6a2e3d1
commit 904d790a5d
11 changed files with 60 additions and 33 deletions

View File

@ -1,6 +1,10 @@
# pywb config file
# ========================================
#
debug: true
ui:
vue_calendar_ui: true
vue_timeline_banner: true
collections:
all: $all

View File

@ -791,7 +791,8 @@ class RewriterApp(object):
prefix = self.get_full_prefix(environ)
params = dict(url=wb_url.url,
prefix=prefix)
prefix=prefix,
ui=kwargs.get('ui', {}))
return self.query_view.render_to_string(environ, **params)

View File

@ -21,9 +21,11 @@ This file is part of pywb, https://github.com/webrecorder/pywb
// Creates the default pywb banner.
(function() {
if (window.top !== window) {
return;
}
try {
if (window.parent !== window && window.parent.wbinfo) {
return;
}
} catch (e) { }
/**
* The default banner class

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -24,7 +24,7 @@ window.banner_info = {
</script>
{% if is_framed or old_banner %}
{% if is_framed or not ui.vue_timeline_banner %}
<!-- default banner, create through js -->
<link rel='stylesheet' href='{{ static_prefix }}/default_banner.css'/>
<script src='{{ static_prefix }}/default_banner.js'> </script>
@ -37,7 +37,7 @@ window.banner_info = {
VueUI.main("{{ static_prefix }}", "{{ url }}", "{{ wb_prefix }}", "{{ timestamp }}");
</script>
{% if not old_banner %}
{% if ui.vue_timeline_banner %}
<div id="app" style="width: 100%; height: 200px"></div>
{% endif %}

View File

@ -7,7 +7,7 @@
{% block head %}
{{ super() }}
{% if table_ui %}
{% if not ui.vue_calendar_ui %}
<link rel="stylesheet" href="{{ static_prefix }}/css/query.css">
<script src="{{ static_prefix }}/js/url-polyfill.min.js"></script>
<script src="{{ static_prefix }}/query.js"></script>
@ -23,6 +23,19 @@
{% block body %}
{% if not ui.vue_calendar_ui %}
<div class="container-fluid">
<div class="row justify-content-center">
<h4 class="display-4 text-center text-sm-left p-0">{{ _('Search Results') }}</h4>
</div>
</div>
<div class="container">
<div class="row justify-content-center text-center text-sm-left mt-1" id="display-query-type-info"></div>
</div>
<div class="container mt-3 q-display" id="captures"></div>
{% endif %}
<script>
var text = {
months: {
@ -47,7 +60,8 @@
dateTime: "{{ _('Date Time: ') }}",
};
{% if table_ui %}
{% if not ui.vue_calendar_ui %}
var renderCal = new RenderCalendar({ prefix: "{{ prefix }}", staticPrefix: "{{ static_prefix }}", text: text });
renderCal.init();
@ -58,7 +72,7 @@
</script>
{% if not table_ui %}
{% if ui.vue_calendar_ui %}
<div id="app" style="width: 100%; height: 100%"></div>
{% endif %}

View File

@ -1,4 +1,4 @@
__version__ = '2.6.0'
__version__ = '2.7.0b0'
if __name__ == '__main__':
print(__version__)

View File

@ -1,5 +1,5 @@
<template>
<div class="app" data-app="webrecorder-replay-app">
<div class="app" :class="{expanded: showTimelineView}" data-app="webrecorder-replay-app">
<div class="banner">
<div class="line">
<div class="logo"><img :src="config.logoImg" /></div>
@ -162,12 +162,14 @@ export default {
.app {
font-family: Calibri, Arial, sans-serif;
border-bottom: 1px solid lightcoral;
height: 150px;
width: 100%;
}
.app.expanded {
height: 150px;
}
.full-view {
position: fixed;
top: 150px;
/*position: fixed;*/
/*top: 150px;*/
left: 0;
}
.iframe iframe {

View File

@ -20,7 +20,7 @@ class CDXLoader {
this.isReplay = (timestamp !== undefined);
if (this.isReplay) {
window.WBBanner = new VueBannerWrapper(this);
window.WBBanner = new VueBannerWrapper(this, url);
}
let queryURL;
@ -145,9 +145,9 @@ class CDXLoader {
// ===========================================================================
class VueBannerWrapper
{
constructor(loader) {
constructor(loader, url) {
this.loading = true;
this.lastSurt = null;
this.lastSurt = this.getSurt(url);
this.loader = loader;
}

2
wombat

@ -1 +1 @@
Subproject commit 4edfa768fd20195644e6bff96c52aa0f50baa21f
Subproject commit 72db79431401ad6d7449eb77c37a6a82b84113c8