nostr added to lecturer form

This commit is contained in:
HolgerHatGarKeineNode
2023-02-23 23:12:00 +01:00
parent e6811f70ae
commit 1aaa955567
4 changed files with 21 additions and 51 deletions

View File

@@ -22,12 +22,13 @@ class ContentCreatorForm extends Component
public function rules()
{
return [
'image' => [Rule::requiredIf(! $this->lecturer->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'],
'image' => [Rule::requiredIf(!$this->lecturer->id), 'nullable', 'mimes:jpeg,png,jpg,gif', 'max:10240'],
'lecturer.name' => 'required',
'lecturer.active' => 'boolean',
'lecturer.subtitle' => 'required',
'lecturer.intro' => 'required',
'lecturer.nostr' => 'nullable|string',
'lecturer.twitter_username' => 'nullable|string',
'lecturer.website' => 'nullable|url',
'lecturer.lightning_address' => 'nullable|string',
@@ -38,14 +39,14 @@ class ContentCreatorForm extends Component
public function mount()
{
if (! $this->lecturer) {
if (!$this->lecturer) {
$this->lecturer = new Lecturer([
'intro' => '',
'active' => true,
'team_id' => true,
]);
}
if (! $this->fromUrl) {
if (!$this->fromUrl) {
$this->fromUrl = url()->previous();
}
}

View File

@@ -1,6 +1,6 @@
{
"relays": {
"wss://nostr.einundzwanzig.space": {
"wss://nostr.easify.de": {
"read": true,
"write": true
},
@@ -8,45 +8,9 @@
"read": true,
"write": true
},
"wss://nostr.fmt.wiz.biz": {
"read": true,
"write": true
},
"wss://relay.damus.io": {
"read": true,
"write": true
},
"wss://nostr-pub.wellorder.net": {
"read": true,
"write": true
},
"wss://relay.nostr.info": {
"read": true,
"write": true
},
"wss://offchain.pub": {
"read": true,
"write": true
},
"wss://nos.lol": {
"read": true,
"write": true
},
"wss://brb.io": {
"read": true,
"write": true
},
"wss://relay.snort.social": {
"read": true,
"write": true
},
"wss://relay.current.fyi": {
"read": true,
"write": true
},
"wss://nostr.relayer.se": {
"read": true,
"write": true
}
},
"following": null,

View File

@@ -49,6 +49,11 @@
<span class="text-gray-400 text-xs py-2">{{ __('This is the introduction text that is shown on the landing page.') }}</span>
</x-input.group>
<x-input.group :for="md5('lecturer.nostr')" :label="__('Nostr public key')">
<x-input autocomplete="off" wire:model.debounce="lecturer.nostr"
:placeholder="__('Nostr public key')" :hint="__('starts with npub...')"/>
</x-input.group>
<x-input.group :for="md5('lecturer.twitter_username')" :label="__('Twitter Username')">
<x-input autocomplete="off" wire:model.debounce="lecturer.twitter_username"
:placeholder="__('Twitter Username')" :hint="__('Without @')"/>

View File

@@ -38,7 +38,7 @@
<div>
{{ __('Author') }}
</div>
<x-button xs href="/nova/resources/lecturers/new" target="_blank">
<x-button xs href="{{ route('contentCreator.form', ['country' => 'de']) }}">
<i class="fa fa-thin fa-plus"></i>
{{ __('Create new author') }}
</x-button>