mirror of https://github.com/MarceauKa/shaark.git
✨ Ability to add Custom JS #64
This commit is contained in:
parent
7945fa51a2
commit
ed6648c575
|
@ -14,6 +14,7 @@ use Spatie\Valuestore\Valuestore;
|
|||
* @method bool getPrivateDownload()
|
||||
* @method bool getUseDefaultSearch()
|
||||
* @method string getPostsOrder()
|
||||
* @method string getAdditionalJs()
|
||||
* @method bool getIsDark()
|
||||
* @method string getCustomBackground()
|
||||
* @method string getCustomIcon()
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
## Added
|
||||
|
||||
- Ability to add Custom JS ([#64](https://github.com/MarceauKa/shaark/issues/64))
|
||||
- Shaark is now a Web Share Target (Work in progress, only on Android [#65](https://github.com/MarceauKa/shaark/issues/65))
|
||||
|
||||
## Fixed
|
||||
|
|
|
@ -34,6 +34,10 @@ return [
|
|||
'default' => 'created',
|
||||
'rules' => ['required', 'in:created,updated'],
|
||||
],
|
||||
'additional_js' => [
|
||||
'default' => null,
|
||||
'rules' => ['nullable'],
|
||||
],
|
||||
'is_dark' => [
|
||||
'default' => false,
|
||||
'rules' => ['nullable', 'in:on,off']
|
||||
|
|
|
@ -14,6 +14,7 @@ return [
|
|||
'posts_order' => 'Bevorzugte Reihenfolge der Beiträge',
|
||||
'created' => 'Erstellungsdatum',
|
||||
'updated' => 'Datum des letzten Updates',
|
||||
'additional_js' => 'Zusätzliche JS',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -14,6 +14,7 @@ return [
|
|||
'posts_order' => 'Preferred posts order',
|
||||
'created' => 'Creation date',
|
||||
'updated' => 'Last update date',
|
||||
'additional_js' => 'Additional JS',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -14,6 +14,7 @@ return [
|
|||
'posts_order' => 'Ordre des posts',
|
||||
'created' => 'Date de création',
|
||||
'updated' => 'Date de dernière modification',
|
||||
'additional_js' => 'Javascript personnalisé',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -14,6 +14,7 @@ return [
|
|||
'posts_order' => '優先投稿順',
|
||||
'created' => '作成日',
|
||||
'updated' => '最終更新日',
|
||||
'additional_js' => 'カスタムJS',
|
||||
],
|
||||
|
||||
'appearance' => [
|
||||
|
|
|
@ -5,4 +5,5 @@
|
|||
<script src="{{ mix('js/manifest.js') }}" defer></script>
|
||||
<script src="{{ mix('js/vendor.js') }}" defer></script>
|
||||
<script src="{{ mix('js/app.js') }}" defer></script>
|
||||
@if(app('shaark')->getAdditionalJs()){!! app('shaark')->getAdditionalJs() !!}@endif
|
||||
@stack('js')
|
||||
|
|
|
@ -77,6 +77,16 @@
|
|||
<span class="text-danger" role="alert">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="additional_js">{{ __('shaark.settings.general.additional_js') }}</label>
|
||||
<textarea name="additional_js" id="additional_js"
|
||||
class="form-control" placeholder="<script>...</script>, <script src='...'></script>"
|
||||
>{{ old('additional_js', $settings['additional_js']) }}</textarea>
|
||||
@error('additional_js')
|
||||
<span class="text-danger" role="alert">{{ $message }}</span>
|
||||
@enderror
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in New Issue