mirror of
https://github.com/Einundzwanzig-Podcast/einundzwanzig-portal.git
synced 2025-12-11 06:46:47 +00:00
lnbits paid articles added
This commit is contained in:
@@ -24,9 +24,12 @@ class NewsArticleForm extends Component
|
|||||||
public array $temporaryUrls = [];
|
public array $temporaryUrls = [];
|
||||||
|
|
||||||
public ?string $fromUrl = '';
|
public ?string $fromUrl = '';
|
||||||
|
|
||||||
|
public string $type = '';
|
||||||
|
|
||||||
public bool $paid = false;
|
public bool $paid = false;
|
||||||
|
|
||||||
protected $queryString = ['fromUrl' => ['except' => ''], 'paid' => ['except' => false]];
|
protected $queryString = ['fromUrl' => ['except' => ''], 'type' => ['except' => '']];
|
||||||
|
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
@@ -50,6 +53,9 @@ class NewsArticleForm extends Component
|
|||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
|
if ($this->type === 'paid') {
|
||||||
|
$this->paid = true;
|
||||||
|
}
|
||||||
if ($this->libraryItem === null) {
|
if ($this->libraryItem === null) {
|
||||||
$this->libraryItem = new LibraryItem([
|
$this->libraryItem = new LibraryItem([
|
||||||
'type' => 'markdown_article',
|
'type' => 'markdown_article',
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
@if(auth()->user()->lnbits)
|
@if(auth()->user()->lnbits)
|
||||||
<x-button
|
<x-button
|
||||||
class="whitespace-nowrap"
|
class="whitespace-nowrap"
|
||||||
:href="route('news.form', ['paid' => true])"
|
:href="route('news.form', ['type' => 'paid'])"
|
||||||
primary>
|
primary>
|
||||||
<i class="fa fa-thin fa-plus"></i>
|
<i class="fa fa-thin fa-plus"></i>
|
||||||
{{ __('Submit paid news article') }}
|
{{ __('Submit paid news article') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user