mirror of https://github.com/MarceauKa/shaark.git
add setting
This commit is contained in:
parent
7070eff064
commit
a16c2dd60c
|
@ -26,8 +26,8 @@ class PuppeteerProvider extends BaseProvider
|
|||
|
||||
$page->pdf([
|
||||
'path' => storage_path($filename),
|
||||
'width' => 1440,
|
||||
'height' => 960,
|
||||
'width' => app('shaark')->getArchivePdfWidth(),
|
||||
'height' => app('shaark')->getArchivePdfHeight(),
|
||||
'printBackground' => true,
|
||||
'preferCSSPageSize' => true,
|
||||
'margin' => [
|
||||
|
|
|
@ -21,6 +21,8 @@ use Spatie\Valuestore\Valuestore;
|
|||
* @method string getCustomIcon()
|
||||
* @method bool getLinkArchivePdf()
|
||||
* @method string getNodeBin()
|
||||
* @method int getArchivePdfWidth()
|
||||
* @method int getArchivePdfHeight()
|
||||
* @method bool getLinkArchiveMedia()
|
||||
* @method string getYoutubeDlBin()
|
||||
* @method string getPythonBin()
|
||||
|
|
|
@ -78,6 +78,14 @@ return [
|
|||
'default' => '/usr/bin/node',
|
||||
'rules' => ['required']
|
||||
],
|
||||
'archive_pdf_width' => [
|
||||
'default' => '1440',
|
||||
'rules' => ['required', 'numeric', 'min:100', 'max:3840']
|
||||
],
|
||||
'archive_pdf_height' => [
|
||||
'default' => '960',
|
||||
'rules' => ['required', 'numeric', 'min:100', 'max:2160']
|
||||
],
|
||||
'youtube_dl_bin' => [
|
||||
'default' => '/usr/bin/youtube-dl',
|
||||
'rules' => ['required']
|
||||
|
|
|
@ -37,6 +37,8 @@ return [
|
|||
'title' => 'Archiving',
|
||||
'link_archive_pdf' => 'PDF archiving (Web pages to PDF)',
|
||||
'node_bin' => 'Node.js binary',
|
||||
'archive_pdf_width' => 'Page width',
|
||||
'archive_pdf_height' => 'Page height',
|
||||
'link_archive_media' => 'Media archiving (Youtube, Soundcloud, ...)',
|
||||
'youtube_dl_bin' => 'Youtube-dl binary',
|
||||
'python_bin' => 'Python binary',
|
||||
|
|
|
@ -192,6 +192,24 @@
|
|||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="archive_pdf_width">{{ __('shaark.settings.archiving.archive_pdf_width') }}</label>
|
||||
<input type="number" class="form-control {{ $errors->has('archive_pdf_width') ? ' is-invalid' : '' }}" step="1" min="800" max="5000"
|
||||
name="archive_pdf_width" id="archive_pdf_width" value="{{ old('archive_pdf_width', $settings['archive_pdf_width']) }}">
|
||||
@error('archive_pdf_width')
|
||||
<span class="invalid-feedback" role="alert">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="archive_pdf_height">{{ __('shaark.settings.archiving.archive_pdf_height') }}</label>
|
||||
<input type="number" class="form-control {{ $errors->has('archive_pdf_height') ? ' is-invalid' : '' }}" step="1" min="800" max="5000"
|
||||
name="archive_pdf_height" id="archive_pdf_height" value="{{ old('archive_pdf_height', $settings['archive_pdf_height']) }}">
|
||||
@error('archive_pdf_height')
|
||||
<span class="invalid-feedback" role="alert">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="custom-control custom-switch">
|
||||
<input type="checkbox" class="custom-control-input"
|
||||
|
|
Loading…
Reference in New Issue