Change public to show on echo/file areas to enable limiting whats shown in the activity graph

This commit is contained in:
2023-07-28 13:22:39 +10:00
parent ddb8c349b6
commit f1ccca25ea
9 changed files with 20 additions and 18 deletions

View File

@@ -272,7 +272,7 @@ class Tic extends FTNBase
if (! $this->area->exists) {
$this->area->description = $areadesc;
$this->area->active = TRUE;
$this->area->public = FALSE;
$this->area->show = FALSE;
$this->area->notes = 'Autocreated';
$this->area->domain_id = $this->from->zone->domain_id;
$this->area->save();

View File

@@ -21,10 +21,10 @@ class EchoareaController extends Controller
'name' => 'required|min:4|max:35|regex:/^[a-zA-Z-_~]{4,}$/|unique:echoareas,name,'.($o->exists ? $o->id : 0),
'description' => 'required',
'active' => 'required|boolean',
'public' => 'required|boolean',
'show' => 'required|boolean',
]);
foreach (['name','description','active','public','notes','domain_id'] as $key)
foreach (['name','description','active','show','notes','domain_id'] as $key)
$o->{$key} = $request->post($key);
$o->save();

View File

@@ -20,11 +20,11 @@ class FileareaController extends Controller
'name' => 'required|min:4|max:35|regex:/^[a-zA-Z-_~]{4,}$/|unique:fileareas,name,'.($o->exists ? $o->id : 0),
'description' => 'required',
'active' => 'required|boolean',
'public' => 'required|boolean',
'show' => 'required|boolean',
'nodelist' => 'nullable|string|max:12'
]);
foreach (['name','description','active','public','notes','domain_id'] as $key)
foreach (['name','description','active','show','notes','domain_id'] as $key)
$o->{$key} = $request->post($key);
$o->save();

View File

@@ -84,7 +84,7 @@ class EchoareaImport implements ShouldQueue
$o->name = $area;
$o->description = ($this->prefix ?: '').$description;
$o->active = TRUE;
$o->public = TRUE;
$o->show = TRUE;
$this->do->echoareas()->save($o);
}

View File

@@ -102,6 +102,7 @@ class Domain extends Model
];
})->values(),
'dashStyle' => 'ShortDot',
'visible'=>(bool)$item->first()->echoarea->show,
];
})->values();