Compare commits
2 Commits
e9b5783945
...
7885d3901b
Author | SHA1 | Date | |
---|---|---|---|
7885d3901b | |||
ec139b79a2 |
@ -204,7 +204,8 @@ class AddressIdle implements ShouldQueue
|
||||
->where(fn($query)=>$query->where('point_id',0)->orWhereNull('point_id'))
|
||||
->whereIn('addresses.id',our_nodes($do)->pluck('id'))
|
||||
->when($ao,fn($query)=>$query->where('addresses.id',$ao->id))
|
||||
->where(fn($q)=>$q->where('last_session','<',$age)->orWhereNull('last_session'))
|
||||
->where(fn($q)=>$q->where('last_session','<',$age)
|
||||
->orWhere(fn($q)=>$q->whereNull('last_session')->where('updated_at','<',Carbon::now()->subDays(14)->startOfDay())))
|
||||
->whereRaw(sprintf('((role IS NULL) OR (role=0) OR ((role & %d) > 0))',$flags))
|
||||
->whereRaw(sprintf('((role IS NULL) OR ((role & %d) = 0))',Address::NODE_KEEP))
|
||||
->join('systems',['systems.id'=>'addresses.system_id'])
|
||||
|
@ -11,7 +11,7 @@ use Illuminate\Queue\SerializesModels;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Facades\Notification;
|
||||
|
||||
use App\Models\{Address, Domain, System};
|
||||
use App\Models\{Address,Domain};
|
||||
use App\Notifications\Netmails\NodesNew as NotificationNodesNew;
|
||||
|
||||
class NodesNew implements ShouldQueue
|
||||
@ -43,6 +43,7 @@ class NodesNew implements ShouldQueue
|
||||
|
||||
$result = Address::FTN()
|
||||
->ActiveFTN()
|
||||
->addSelect('addresses.created_at')
|
||||
->join('systems',['systems.id'=>'addresses.system_id'])
|
||||
->join('system_zone',['system_zone.system_id'=>'systems.id','system_zone.zone_id'=>'zones.id'])
|
||||
->whereIn('zones.id',$this->do->zones->pluck('id'))
|
||||
|
@ -60,7 +60,8 @@ class NodesNew extends Netmails //implements ShouldQueue
|
||||
if ($c++)
|
||||
$msg->addText("\r");
|
||||
|
||||
$msg->addText(sprintf("* %s - %s from %s.\r",$oo->ftn4D,$oo->system->sysop,$oo->system->location));
|
||||
$msg->addText(sprintf("* %s - %s (%s) from %s.\r",$oo->ftn4D,$oo->system->sysop,$oo->system->name,$oo->system->location));
|
||||
$msg->addText(sprintf("%s Address registered: %s\r\r",$space,$oo->created_at->format('Y-m-d')));
|
||||
|
||||
if ($oo->system->method) {
|
||||
switch ($oo->system->method) {
|
||||
|
12
public/css/fixes.css
vendored
12
public/css/fixes.css
vendored
@ -23,6 +23,18 @@ select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
/* SimpleMDE Toolbar fixes */
|
||||
.editor-toolbar {
|
||||
background-color: #fff;
|
||||
color: #000;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
div.CodeMirror-wrap.form-control.is-invalid {
|
||||
border-top-left-radius: 0;
|
||||
border-top-right-radius: 0;
|
||||
}
|
||||
|
||||
/* Bootstrap 5 fixes */
|
||||
/* select import, round the right side */
|
||||
.input-group .form-select {
|
||||
|
44
resources/views/components/form/notes.blade.php
Normal file
44
resources/views/components/form/notes.blade.php
Normal file
@ -0,0 +1,44 @@
|
||||
<div class="form-group">
|
||||
@if(isset($label))
|
||||
<label {{ $attributes->only(['class'])->merge(['class'=>'form-label']) }} for="{{ $id ?? $name }}">{!! html_entity_decode($label) !!}</label>
|
||||
@endisset
|
||||
<div class="input-group has-validation">
|
||||
@if(isset($icon) || isset($prepend))
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">@isset($icon)<i class="fas fa-fw {{ $icon }}"></i>@endisset @isset($prepend){!! $prepend !!}@endisset</span>
|
||||
</div>
|
||||
@endif
|
||||
<div class="w-100">
|
||||
<textarea class="form-control {{ $class ?? ''}} @error((! empty($old)) ? $old : $name) is-invalid @enderror" rows="{{ (($l=count(explode("\n",$value ?? ''))) < ($rows ?? 5) ? $rows : (($l > ($y=($max ?? 25))) ? $y : $l)) }}" id="{{ $id ?? $name }}" name="{{ $name }}" @isset($placeholder)placeholder="{{ $placeholder }}"@endisset @readonly(isset($readonly) && $readonly) @required(isset($required) && $required) @disabled(isset($disabled) && $disabled)>{{ old($old ?? $name,$value ?? '') }}</textarea>
|
||||
<span class="invalid-feedback">
|
||||
@error($old ?? $name)
|
||||
{{ $message }}
|
||||
@elseif(isset($feedback))
|
||||
{{ $feedback }}
|
||||
@enderror
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@isset($helper)
|
||||
<span class="input-helper">{{ $helper }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if(isset($simplemde) && $simplemde)
|
||||
@pa(simplemde)
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
new SimpleMDE({
|
||||
element: $('#{{ $id ?? $name }}')[0],
|
||||
forceSync: true
|
||||
});
|
||||
|
||||
@error($old ?? $name)
|
||||
$('div.CodeMirror-wrap').addClass('form-control is-invalid');
|
||||
@enderror
|
||||
});
|
||||
</script>
|
||||
@append
|
||||
@endif
|
@ -1,4 +1,5 @@
|
||||
<!-- $o=Domain::class -->
|
||||
@use(Illuminate\Support\Facades\Gate)
|
||||
@use(App\Models\Echoarea)
|
||||
|
||||
@extends('layouts.app')
|
||||
@ -149,8 +150,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 id="notes" name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
<x-form.notes name="notes" label="Notes" rows=3 placeholder="Notes..." :value="$o->notes" :disabled="Gate::denies('admin',$o)"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -163,11 +163,8 @@
|
||||
<h2 class="cap">Home Page</h2>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="homepage" class="form-label">Home Page Text</label>
|
||||
<div style="background-color: #fff;color: #000;">
|
||||
<textarea class="form-control" rows=5 id="homepage" name="homepage" placeholder="Home Page..." @cannot('admin',$o)disabled @endcannot>{{ old('homepage',$o->homepage) }}</textarea>
|
||||
</div>
|
||||
<div class="col-12" >
|
||||
<x-form.notes name="homepage" label="Home Page Text" rows=5 placeholder="Home Page..." :value="$o->homepage" :disabled="Gate::denies('admin',$o)" :simplemde="true"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -183,12 +180,4 @@
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
@endsection
|
||||
|
||||
@pa(simplemde)
|
||||
|
||||
@section('page-scripts')
|
||||
<script type="text/javascript">
|
||||
var simplemde = new SimpleMDE({ element: $("#homepage")[0] });
|
||||
</script>
|
||||
@append
|
||||
@endsection
|
@ -127,19 +127,18 @@
|
||||
</div>
|
||||
|
||||
@can('admin',$o)
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<x-form.notes name="notes" label="Notes" rows=3 placeholder="Notes..." :value="$o->notes"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('echoarea') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('echoarea') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
@ -128,19 +128,18 @@
|
||||
</div>
|
||||
|
||||
@can('admin',$o)
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<x-form.notes name="notes" label="Notes" rows=3 placeholder="Notes..." :value="$o->notes"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('filearea') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<a href="{{ url('filearea') }}" class="btn btn-danger">Cancel</a>
|
||||
<button type="submit" name="submit" class="btn btn-success float-end">@if ($o->exists)Save @else Add @endif</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
</div>
|
||||
</div>
|
||||
|
@ -19,11 +19,11 @@
|
||||
@csrf
|
||||
|
||||
<div class="row pt-0">
|
||||
<div class="col-2">
|
||||
<div class="col-3">
|
||||
<x-form.select name="to" icon="bi-robot" label="To" feedback="To name required" :value="($x=collect(config('fido.areafilefix')))->first()" :options="$x->map(fn($item)=>['id'=>$item,'value'=>$item])" required/>
|
||||
</div>
|
||||
|
||||
<div class="offset-2 col-3">
|
||||
<div class="offset-1 col-3">
|
||||
<x-form.select name="tftn_id" icon="bi-ui-radios" label="Uplink Address" feedback="Uplink address required" :value="($x=collect(config('fido.areafilefix')))->first()" :options="$o->akas->where('zone_id',$zo->id)->map(fn($item)=>['id'=>$item->id,'value'=>$item->ftn])" required/>
|
||||
</div>
|
||||
</div>
|
||||
@ -53,15 +53,7 @@
|
||||
<div class="row">
|
||||
<!-- Message -->
|
||||
<div class="col-12">
|
||||
<label for="msg" class="form-label">Message</label>
|
||||
<textarea class="form-control @error('msg') is-invalid @enderror" rows=10 name="msg" placeholder="Message..." required>{{ old('msg') }}</textarea>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('msg')
|
||||
{{ $message }}
|
||||
@else
|
||||
Area/filefix commands are required
|
||||
@enderror
|
||||
</span>
|
||||
<x-form.notes name="msg" label="Message" rows=10 placeholder="Message..." helper="Area/filefix commands are required"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -403,8 +403,7 @@
|
||||
<div class="row">
|
||||
<!-- Notes -->
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 id="notes" name="notes" placeholder="Notes...">{{ old('notes',$o->notes) }}</textarea>
|
||||
<x-form.notes name="notes" label="Notes" rows=3 placeholder="Notes..." :value="$o->notes"/>
|
||||
</div>
|
||||
</div>
|
||||
@endcan
|
||||
|
@ -1,4 +1,6 @@
|
||||
<!-- $o=User::class -->
|
||||
@use(Illuminate\Support\Facades\Gate)
|
||||
|
||||
@extends('layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
@ -133,13 +135,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="pgp_pubkey" class="form-label">PGP Public Key</label>
|
||||
<textarea class="form-control @error('pgp_pubkey')is-invalid @enderror" rows=3 id="pgp_pubkey" name="pgp_pubkey" placeholder="PGP Public Key..." @cannot('update',$o)disabled @endcannot>{{ old('pgp_pubkey',$o->pgp_pubkey) }}</textarea>
|
||||
<span class="invalid-feedback" role="alert">
|
||||
@error('pgp_pubkey')
|
||||
{{ $message }}
|
||||
@enderror
|
||||
</span>
|
||||
<x-form.notes name="pgp_pubkey" label="PGP Public Key" rows=5 max=25 placeholder="PGP Public Key..." :value="$o->pgp_pubkey" :disabled="Gate::denies('update',$o)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -138,8 +138,7 @@
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<label for="notes" class="form-label">Notes</label>
|
||||
<textarea class="form-control" rows=3 name="notes" placeholder="Notes..." @cannot('admin',$o)disabled @endcannot>{{ old('notes',$o->notes) }}</textarea>
|
||||
<x-form.notes name="notes" label="Notes" rows=3 placeholder="Notes..." :value="$o->notes" :disabled="Gate::denies('admin',$o)"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user