' + 154 | msg.no_result + 155 | "!
" + 156 | $("#meta-info")[0].innerHTML 157 | ); 158 | } 159 | }, 160 | error: function error() { 161 | $("#meta-info").html( 162 | '' + 163 | msg.search_error + 164 | "!
" + 165 | $("#meta-info")[0].innerHTML 166 | ); 167 | }, 168 | }); 169 | } 170 | } 171 | 172 | function populate_provider() { 173 | $("#metadata_provider").empty(); 174 | $.ajax({ 175 | url: getPath() + "/metadata/provider", 176 | type: "get", 177 | dataType: "json", 178 | success: function success(data) { 179 | data.forEach(function (provider) { 180 | var checked = ""; 181 | if (provider.active) { 182 | checked = "checked"; 183 | } 184 | var $provider_button = 185 | ''; 198 | $("#metadata_provider").append($provider_button); 199 | }); 200 | }, 201 | }); 202 | } 203 | 204 | $(document).on("change", ".pill", function () { 205 | var element = $(this); 206 | var id = element.data("control"); 207 | var initial = element.data("initial"); 208 | var val = element.prop("checked"); 209 | var params = { id: id, value: val }; 210 | if (!initial) { 211 | params["initial"] = initial; 212 | params["query"] = keyword; 213 | } 214 | $.ajax({ 215 | method: "post", 216 | contentType: "application/json; charset=utf-8", 217 | dataType: "json", 218 | url: getPath() + "/metadata/provider/" + id, 219 | data: JSON.stringify(params), 220 | success: function success(data) { 221 | element.data("initial", "true"); 222 | data.forEach(function (book, idx) { 223 | var $book = $(templates.bookResult({ book: book, index: idx })); 224 | $book.find("button").on("click", function () { 225 | populateForm(book, idx); 226 | }); 227 | $("#book-list").append($book); 228 | }); 229 | }, 230 | }); 231 | }); 232 | 233 | $("#meta-search").on("submit", function (e) { 234 | e.preventDefault(); 235 | keyword = $("#keyword").val(); 236 | $(".pill").each(function () { 237 | $(this).data("initial", $(this).prop("checked")); 238 | }); 239 | doSearch(keyword); 240 | }); 241 | 242 | $("#get_meta").click(function () { 243 | populate_provider(); 244 | var bookTitle = $("#title").val(); 245 | $("#keyword").val(bookTitle); 246 | keyword = bookTitle; 247 | doSearch(bookTitle); 248 | }); 249 | $("#metaModal").on("show.bs.modal", function (e) { 250 | $(e.relatedTarget).one("focus", function (e) { 251 | $(this).blur(); 252 | }); 253 | }); 254 | }); 255 | -------------------------------------------------------------------------------- /root/app/calibre-web/cps/static/user-profile-data/CWA-profile-updater.js: -------------------------------------------------------------------------------- 1 | fetch('/user_profiles.json') 2 | .then(response => response.json()) 3 | .then(usernameToImage => { 4 | var usernameElement = document.querySelector('#top_user .hidden-sm'); 5 | if (usernameElement) { 6 | var username = usernameElement.textContent.trim(); 7 | 8 | if (usernameToImage[username]) { 9 | var style = document.createElement('style'); 10 | style.innerHTML = ` 11 | .profileDrop > span:before { 12 | background-image: url(${usernameToImage[username]}) !important; 13 | } 14 | body.me > div.container-fluid > div.row-fluid > div.col-sm-10:before { 15 | background-image: url(${usernameToImage[username]}) !important; 16 | } 17 | `; 18 | document.head.appendChild(style); 19 | } 20 | } 21 | }); 22 | -------------------------------------------------------------------------------- /root/app/calibre-web/cps/templates/config_db.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | {% block flash %} 3 | 6 | {% endblock %} 7 | {% block body %} 8 |18 | Upon loading this page, if you have previously started a run of the CWA Convert Library service either here in the Web UI or through the CLI, you will see the output of the most recent previous run below. 19 | Once you start a run, you are free to leave the page and return whenever you want to check on the run's progress. If you wish to cancel a run that is still in progress, simply press the Cancel button above 20 | and the run will terminate ASAP. If you wish to change the service's target format, please change your target format in the CWA Settings panel as desired. 21 |
22 |No current or previous run to display. Press the Start button above to initiate a run.
39 |18 | Upon loading this page, if you have previously started a run of the CWA Send-to_kindle EPUB Fixer service either here in the Web UI or through the CLI, you will see the output of the most recent previous run below. 19 | Once you start a run, you are free to leave the page and return whenever you want to check on the run's progress. If you wish to cancel a run that is still in progress, simply press the Cancel button above 20 | and the run will terminate ASAP. This tool is based on the Amazon Kindle EPUB Fix tool by innocenat 21 |
22 |No current or previous run to display. Press the Start button above to initiate a run.
39 |Log Date | 20 |Log Filename | 21 |Open Log | 22 |Download Log | 23 |
---|---|---|---|
{{ log_dates[log]["date"] }} {{ log_dates[log]["time"] }} | 27 |{{ log }} | 28 |Open in Browser | 29 |{{ log_path }} | 30 |
{{ log | replace("\n", "
") | safe }}
{{ header }} | 50 | {% endfor %} 51 |
---|
{{ cell }} | 56 | {% endfor %} 57 |
{{ header }} | 72 | {% endfor %} 73 |
---|
{{ cell }} | 78 | {% endfor %} 79 |
{{ header }} | 94 | {% endfor %} 95 |
---|
{{ cell }} | 100 | {% endfor %} 101 |
{{ header }} | 113 | {% endfor %} 114 |
---|
119 | {{ cell | replace("\n", "
120 | ") | safe }} |
121 | {% endfor %}
122 |
{{ header }} | 137 | {% endfor %} 138 |
---|
{{ cell }} | 143 | {% endfor %} 144 |
{{ header }} | 156 | {% endfor %} 157 |
---|
{{ cell }} | 162 | {% endfor %} 163 |
{{ header }} | 11 | {% endfor %} 12 |
---|
17 | {{ cell | replace("\n", "
18 | ") | safe }} |
19 | {% endfor %}
20 |
This is the admin page for managing profile pictures. This feature is currently in development.
114 | 115 |116 | To upload a profile picture, please use the following form. Note: The image data must be in Base64 format. 117 | You can convert an image to Base64 using various online tools. If you use a website such as 118 | www.base64-image.de, 119 | then make sure you use the version that starts with the line "data:image/png;base64," not the URL version. 120 | To display the image as a round shape, it must already be in PNG format with a round frame applied. 121 | It is recommended to use images no larger than 100x100px to avoid using excessive storage space. 122 |
123 | 124 |