fixes and stuff
This commit is contained in:
+110
-110
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
@@ -1,11 +1,11 @@
|
|||||||
{
|
{
|
||||||
"main.js": {
|
"main.js": {
|
||||||
"file": "assets/main-D9joEh0I.js",
|
"file": "assets/main-BC8xx0YD.js",
|
||||||
"name": "main",
|
"name": "main",
|
||||||
"src": "main.js",
|
"src": "main.js",
|
||||||
"isEntry": true,
|
"isEntry": true,
|
||||||
"css": [
|
"css": [
|
||||||
"assets/main-BnJW41Dx.css"
|
"assets/main-BH4PSFwy.css"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -83,7 +83,11 @@
|
|||||||
{#if record._file?.path}
|
{#if record._file?.path}
|
||||||
<div class="file-table-row">
|
<div class="file-table-row">
|
||||||
<Preview record={record} size={record._file?.width > 0 ? "medium" : "small"}/>
|
<Preview record={record} size={record._file?.width > 0 ? "medium" : "small"}/>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
{#if record.status === "draft"}
|
||||||
|
<span style="text-transform: uppercase;font-size:10px">{record.status}</span>
|
||||||
|
{/if}
|
||||||
<a
|
<a
|
||||||
href="{channel.lucentUrl}/records/{record.id}"
|
href="{channel.lucentUrl}/records/{record.id}"
|
||||||
target={inModal ? "_blank" : "_self"}
|
target={inModal ? "_blank" : "_self"}
|
||||||
@@ -109,6 +113,9 @@
|
|||||||
href="{channel.lucentUrl}/records/{record.id}"
|
href="{channel.lucentUrl}/records/{record.id}"
|
||||||
target={inModal ? "_blank" : "_self"}
|
target={inModal ? "_blank" : "_self"}
|
||||||
>
|
>
|
||||||
|
{#if record.status === "draft"}
|
||||||
|
<span style="text-transform: uppercase;font-size:10px">{record.status}</span>
|
||||||
|
{/if}
|
||||||
{previewTitle(channel.schemas, record, graph)}
|
{previewTitle(channel.schemas, record, graph)}
|
||||||
</a>
|
</a>
|
||||||
{/if}
|
{/if}
|
||||||
|
|||||||
@@ -16,6 +16,15 @@ class SetupDatabase extends Command
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$dbConnection = config("lucent.database");
|
||||||
|
$databasePath = config("database.connections.$dbConnection.database");
|
||||||
|
|
||||||
|
if(file_exists($databasePath)){
|
||||||
|
$this->error("Database already exists.");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
touch($databasePath);
|
||||||
$this->tableUsers();
|
$this->tableUsers();
|
||||||
$this->tableRecords();
|
$this->tableRecords();
|
||||||
$this->tableRevisions();
|
$this->tableRevisions();
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
"env" => env("LUCENT_ENV", "production"),
|
"env" => env("LUCENT_ENV", "production"),
|
||||||
"schemas_path" => env("LUCENT_SCHEMAS_PATH", "app/Lucent"),
|
"schemas_path" => env("LUCENT_SCHEMAS_PATH", "resources/lucent/schemas"),
|
||||||
"database" => env('LUCENT_DB_CONNECTION', env('DB_CONNECTION', "sqlite")),
|
"database" => env('LUCENT_DB_CONNECTION', env('DB_CONNECTION', "sqlite")),
|
||||||
"name" => env("LUCENT_NAME", "Lucent"),
|
"name" => env("LUCENT_NAME", "Lucent"),
|
||||||
"url" => env("LUCENT_URL", env('APP_URL')),
|
"url" => env("LUCENT_URL", env('APP_URL')),
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ class Database
|
|||||||
{
|
{
|
||||||
public static function make(): Connection{
|
public static function make(): Connection{
|
||||||
$dbConnection = config("lucent.database");
|
$dbConnection = config("lucent.database");
|
||||||
|
|
||||||
return DB::connection($dbConnection);
|
return DB::connection($dbConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ class FileController extends Controller
|
|||||||
$validator = Validator::make($request->all(), [
|
$validator = Validator::make($request->all(), [
|
||||||
'files.*' => 'required|file|max:100000',
|
'files.*' => 'required|file|max:100000',
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if ($validator->fails()) {
|
if ($validator->fails()) {
|
||||||
return fail($validator->errors()->first());
|
return fail($validator->errors()->first());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ class DatabaseSetupStep implements IStep
|
|||||||
|
|
||||||
$databaseConnectionName = config("lucent.database");
|
$databaseConnectionName = config("lucent.database");
|
||||||
|
|
||||||
|
|
||||||
$databaseConfig = config('database.connections.'.$databaseConnectionName);
|
$databaseConfig = config('database.connections.'.$databaseConnectionName);
|
||||||
|
|
||||||
if (empty($databaseConfig)) {
|
if (empty($databaseConfig)) {
|
||||||
$instructions = <<<EOD
|
$instructions = <<<EOD
|
||||||
# You need to setup a database connection for $databaseConnectionName in database.php config. You can choose either sqlite or pgsql
|
# You need to setup a database connection for $databaseConnectionName in database.php config. You can choose either sqlite or pgsql
|
||||||
@@ -35,6 +37,14 @@ EOD;
|
|||||||
return SetupStep::makeFail($name, $instructions);
|
return SetupStep::makeFail($name, $instructions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if(!in_array($driver = $databaseConfig["driver"],["sqlite","pgsql"])){
|
||||||
|
$instructions = <<<EOD
|
||||||
|
You can choose either sqlite or pgsql. You current config is: $driver
|
||||||
|
EOD;
|
||||||
|
return SetupStep::makeFail($name, $instructions);
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Database::make()->table("records")->get();
|
Database::make()->table("records")->get();
|
||||||
} catch (QueryException $e) {
|
} catch (QueryException $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user