mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Start work on conversion for the content server
This commit is contained in:
parent
38e2a5bdc1
commit
91dcd80f8c
1
imgsrc/srv/convert.svg
Normal file
1
imgsrc/srv/convert.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16.933333 16.933333"><g transform="translate(0,-280.06667)"><path d="m 16.183572,290.33818 q 0,0.0517 -0.01032,0.0723 -0.661458,2.76987 -2.76987,4.4907 -2.108385,1.72082 -4.9402735,1.72082 -1.508945,0 -2.919703,-0.56843 -1.410759,-0.56846 -2.516638,-1.62264 l -1.333261,1.33324 q -0.196374,0.19637 -0.465085,0.19637 -0.268711,0 -0.465085,-0.19637 -0.196372,-0.19635 -0.196372,-0.46506 v -4.63021 q 0,-0.26871 0.196373,-0.46508 0.196374,-0.19637 0.465085,-0.19637 h 4.630208 q 0.268711,0 0.465085,0.19637 0.196374,0.19637 0.196374,0.46508 0,0.26872 -0.196374,0.46509 l -1.415944,1.41594 q 0.733822,0.68213 1.663991,1.05421 0.930169,0.37206 1.932701,0.37206 1.384935,0 2.5838155,-0.67181 1.198906,-0.67177 1.922356,-1.84999 0.113692,-0.17571 0.547794,-1.20925 0.08268,-0.2377 0.310038,-0.2377 h 1.984375 q 0.134356,0 0.232543,0.0982 0.09819,0.0982 0.09819,0.23255 z m 0.258392,-8.26823 v 4.6302 q 0,0.26872 -0.196374,0.46509 -0.196374,0.19637 -0.465085,0.19637 h -4.630208 q -0.268711,0 -0.465084,-0.19637 -0.196375,-0.19637 -0.196375,-0.46509 0,-0.2687 0.196375,-0.46507 l 1.426262,-1.42626 q -1.529609,-1.41595 -3.6070115,-1.41595 -1.384934,0 -2.583814,0.67181 -1.198907,0.67177 -1.922384,1.85002 -0.113665,0.17568 -0.547766,1.20921 -0.08268,0.2377 -0.310039,0.2377 h -2.056739 q -0.134355,0 -0.232542,-0.0982 -0.09819,-0.0982 -0.09819,-0.23255 v -0.0723 q 0.671804,-2.76986 2.790534,-4.4907 2.11873,-1.72082 4.960937,-1.72082 1.5089455,0 2.9352085,0.57362 1.426289,0.57359 2.532168,1.61748 l 1.343581,-1.33327 q 0.196374,-0.19637 0.465084,-0.19637 0.268711,0 0.465085,0.19637 0.196374,0.19638 0.196374,0.46509 z"/></g></svg>
|
After Width: | Height: | Size: 1.6 KiB |
@ -470,6 +470,7 @@ def add_top_bar_buttons(container_id):
|
||||
container = document.getElementById(container_id)
|
||||
if container:
|
||||
clear_buttons(container)
|
||||
add_button(container, 'convert', action=convert_book, tooltip=_('Convert this book to another format'))
|
||||
add_button(container, 'edit', action=edit_metadata, tooltip=_('Edit the metadata for this book'))
|
||||
add_button(container, 'trash', action=delete_book, tooltip=_('Delete this book'))
|
||||
book_id = parse_url_params().book_id
|
||||
@ -600,6 +601,12 @@ def edit_metadata():
|
||||
show_panel('edit_metadata', query=q, replace=False)
|
||||
|
||||
|
||||
def convert_book():
|
||||
q = parse_url_params()
|
||||
q.book_id = (read_book.book_id or q.book_id) + ''
|
||||
show_panel('convert_book', query=q, replace=False)
|
||||
|
||||
|
||||
def create_more_actions_panel(container_id):
|
||||
container = document.getElementById(container_id)
|
||||
create_top_bar(container, title=_('More actions…'), action=back, icon='close')
|
||||
|
Loading…
x
Reference in New Issue
Block a user