cleanup
This commit is contained in:
-32
@@ -1,32 +0,0 @@
|
||||
# Upgrade from 1.1.* to 1.2.0
|
||||
|
||||
## lucent.php config file
|
||||
|
||||
There is now an array of commands, accepting more than one.
|
||||
|
||||
from
|
||||
```php
|
||||
"generateCommand" => env("LUCENT_GENERATE_COMMAND", "generate:static"),
|
||||
```
|
||||
|
||||
to
|
||||
```php
|
||||
"commands" => [
|
||||
"generate:static" => "Build Website",
|
||||
],
|
||||
```
|
||||
## config/filesystems.php
|
||||
|
||||
Lucent has its own filesystem.
|
||||
|
||||
You should now add:
|
||||
|
||||
```
|
||||
'lucent' => [
|
||||
'driver' => 'local',
|
||||
'root' => storage_path('app/public'),
|
||||
'url' => env('APP_URL').'/storage',
|
||||
'visibility' => 'public',
|
||||
'throw' => false,
|
||||
],
|
||||
```
|
||||
+1
-1
@@ -4,7 +4,7 @@ return [
|
||||
"env" => env("LUCENT_ENV", "production"),
|
||||
"schemas_path" => env("LUCENT_SCHEMAS_PATH", "resources/lucent/schemas"),
|
||||
"database" => env('LUCENT_DB_CONNECTION', env('DB_CONNECTION', "sqlite")),
|
||||
"name" => env("LUCENT_NAME", "Lucent"),
|
||||
"name" => env("LUCENT_NAME", "Stoic"),
|
||||
"url" => env("LUCENT_URL", env('APP_URL')),
|
||||
"previewTarget" => env("LUCENT_PREVIEW_TARGET", "previewTarget"),
|
||||
/*
|
||||
|
||||
@@ -1,174 +0,0 @@
|
||||
<script>
|
||||
import {onDestroy, onMount} from 'svelte';
|
||||
import {Editor} from '@tiptap/core'
|
||||
import Document from '@tiptap/extension-document'
|
||||
import Paragraph from '@tiptap/extension-paragraph'
|
||||
import Dropcursor from '@tiptap/extension-dropcursor'
|
||||
import Text from '@tiptap/extension-text'
|
||||
import Heading from '@tiptap/extension-heading'
|
||||
import HardBreak from '@tiptap/extension-hard-break'
|
||||
import Blockquote from '@tiptap/extension-blockquote';
|
||||
import CodeBlock from '@tiptap/extension-code-block';
|
||||
import Bold from '@tiptap/extension-bold';
|
||||
import BulletList from '@tiptap/extension-bullet-list';
|
||||
import Code from '@tiptap/extension-code';
|
||||
import History from '@tiptap/extension-history';
|
||||
import Italic from '@tiptap/extension-italic';
|
||||
import ListItem from '@tiptap/extension-list-item';
|
||||
import OrderedList from '@tiptap/extension-ordered-list';
|
||||
import Strike from '@tiptap/extension-strike';
|
||||
import Table from '@tiptap/extension-table';
|
||||
import TableRow from '@tiptap/extension-table-row';
|
||||
import TableCell from '@tiptap/extension-table-cell';
|
||||
import TableHeader from '@tiptap/extension-table-header';
|
||||
import Underline from '@tiptap/extension-underline';
|
||||
import Image from '@tiptap/extension-image';
|
||||
import Icon from "../common/Icon.svelte";
|
||||
|
||||
let element;
|
||||
let editor;
|
||||
export let value = "";
|
||||
|
||||
onMount(() => {
|
||||
editor = new Editor({
|
||||
element: element,
|
||||
extensions: [
|
||||
Document,
|
||||
Paragraph,
|
||||
Text,
|
||||
Bold,
|
||||
ListItem,
|
||||
BulletList,
|
||||
Code,
|
||||
CodeBlock,
|
||||
History,
|
||||
Italic,
|
||||
HardBreak,
|
||||
OrderedList,
|
||||
Strike,
|
||||
Table,
|
||||
TableRow,
|
||||
TableCell,
|
||||
TableHeader,
|
||||
Underline,
|
||||
Dropcursor,
|
||||
Image,
|
||||
Heading.configure({
|
||||
levels: [1, 2, 3],
|
||||
}),
|
||||
Blockquote
|
||||
],
|
||||
content: value,
|
||||
editable: true,
|
||||
onTransaction: () => {
|
||||
// force re-render so `editor.isActive` works as expected
|
||||
editor = editor;
|
||||
},
|
||||
onUpdate: ({editor}) => {
|
||||
value = editor.getHTML()
|
||||
},
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
if (editor) {
|
||||
editor.destroy();
|
||||
}
|
||||
});
|
||||
|
||||
export function insertMedia(info){
|
||||
editor.chain().focus().setImage({ src: info.url }).run()
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if editor}
|
||||
<div class="editor-toolbar">
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
|
||||
class:active={editor.isActive('heading', { level: 1 })}
|
||||
>
|
||||
H1
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleHeading({ level: 2 }).run()}
|
||||
class:active={editor.isActive('heading', { level: 2 })}
|
||||
>
|
||||
H2
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleBold().run()}
|
||||
class:active={editor.isActive('bold')}
|
||||
>
|
||||
B
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleItalic().run()}
|
||||
class:active={editor.isActive('italic')}
|
||||
>
|
||||
<em>IT</em>
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleUnderline().run()}
|
||||
class:active={editor.isActive('underline')}
|
||||
>
|
||||
<u>U</u>
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleStrike().run()}
|
||||
class:active={editor.isActive('strike')}
|
||||
>
|
||||
<s>S</s>
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.commands.unsetAllMarks()}
|
||||
>
|
||||
Clear
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleCode().run()}
|
||||
class:active={editor.isActive('code')}
|
||||
>
|
||||
Code
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleBulletList().run()}
|
||||
class:active={editor.isActive('bulletList')}
|
||||
>
|
||||
<Icon icon="list"></Icon>
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleOrderedList().run()}
|
||||
class:active={editor.isActive('orderedList')}
|
||||
>
|
||||
<Icon icon="ordered-list"></Icon>
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleBlockquote().run()}
|
||||
class:active={editor.isActive('blockquote')}
|
||||
>
|
||||
""
|
||||
</button>
|
||||
<button
|
||||
class="button"
|
||||
on:click={() => editor.chain().focus().toggleCodeBlock().run()}
|
||||
class:active={editor.isActive('codeBlock')}
|
||||
>
|
||||
cb
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div bind:this={element} class="content"/>
|
||||
@@ -1,5 +1,8 @@
|
||||
@extends("lucent::layouts.account")
|
||||
|
||||
@section("title")
|
||||
Log in
|
||||
@endsection
|
||||
@section("content")
|
||||
<div class="scope-login">
|
||||
<div class="bg-image">
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
@extends("lucent::layouts.account")
|
||||
|
||||
@section("title")
|
||||
Enter
|
||||
@endsection
|
||||
@section("content")
|
||||
<div class="scope-login">
|
||||
<div class="bg-image">
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
@php
|
||||
$side = $side ?? 48;
|
||||
|
||||
$colors = [
|
||||
"#00AA55",
|
||||
"#009FD4",
|
||||
"#B381B3",
|
||||
"#939393",
|
||||
"#E3BC00",
|
||||
"#D47500",
|
||||
"#DC2A2A",
|
||||
"#3ede91",
|
||||
"#377dd4",
|
||||
"#0256b0",
|
||||
"#053d82",
|
||||
"#3d026e",
|
||||
"#b378e3",
|
||||
"#c4065c",
|
||||
"#543208",
|
||||
"#d97811",
|
||||
"#0c6b40",
|
||||
];
|
||||
$initials = function($name){
|
||||
$segs = explode(" ",$name);
|
||||
if(count($segs) > 1){
|
||||
return strtoupper($segs[0][0]).strtoupper($segs[1][0]);
|
||||
}
|
||||
return strtoupper($segs[0][0]).strtoupper($segs[0][1]);
|
||||
};
|
||||
|
||||
$name = $user["name"];
|
||||
$charIndex = ord($name[1]) + strlen($name);
|
||||
$colorIndex = $charIndex % 19;
|
||||
$bgColor = $colors[$colorIndex];
|
||||
@endphp
|
||||
|
||||
<div
|
||||
class="avatar"
|
||||
title="{{$name}}"
|
||||
style="background-color:{{$bgColor}};height: {{$side}}px;width: {{$side}}px; font-size:{{$side / 2}}px"
|
||||
>
|
||||
<div class="avatar__letters">{{$initials($user["name"])}}</div>
|
||||
</div>
|
||||
@@ -1,4 +0,0 @@
|
||||
<button class="bt bt-primary">
|
||||
{{$slot}}
|
||||
<img alt="indicator" id="indicator" class="htmx-indicator" src="/img/spinner.svg"/>
|
||||
</button>
|
||||
@@ -1,4 +0,0 @@
|
||||
<div class="notice {{$type ?? "info"}}">
|
||||
<div class="title">{{$title}}</div>
|
||||
<div class="content">{{ $slot }}</div>
|
||||
</div>
|
||||
@@ -1,23 +0,0 @@
|
||||
@extends("lucent::layouts.channel")
|
||||
|
||||
@section("content")
|
||||
<h3 class="header-small mb-4">Latest Content changes</h3>
|
||||
|
||||
|
||||
@if($records->isNotEmpty())
|
||||
<div class="lx-card mb-4">
|
||||
<div class="lx-table p-0">
|
||||
<table class="">
|
||||
<tbody>
|
||||
@foreach($records as $record)
|
||||
<tr>
|
||||
@include("lucent::records.card-row")
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@endsection
|
||||
@@ -0,0 +1,11 @@
|
||||
@if(config("lucent.env") == "production")
|
||||
<!-- if production -->
|
||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.js']["css"][0] }}"/>
|
||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
||||
@else
|
||||
<!-- if development -->
|
||||
@php
|
||||
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
|
||||
@endphp
|
||||
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
||||
@endif
|
||||
@@ -1,21 +0,0 @@
|
||||
<div class="d-flex align-items-center ">
|
||||
|
||||
<a class="nav-item" href="{channel.lucentUrl}/members">Members</a>
|
||||
|
||||
@if($channel->generateCommand)
|
||||
<a href="{channel.lucentUrl}/build-report" class="btn btn-outline-primary btn-sm d-">Build website</a>
|
||||
@endif
|
||||
|
||||
<!-- <div>-->
|
||||
<!-- <form method="GET">-->
|
||||
<!-- <input type="search" name="filter[search_regex]" placeholder="Search"-->
|
||||
<!-- class="form-control" required/>-->
|
||||
<!-- </form>-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<div>
|
||||
<a class="nav-item" href="/lucent/profile">
|
||||
<x-lucent::avatar side="28" :user="$user"></x-lucent::avatar>
|
||||
|
||||
</a>
|
||||
</div>
|
||||
@@ -1,34 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>@yield('title') - Lucent Data Platform</title>
|
||||
|
||||
@if(config("lucent.env") === "production")
|
||||
<!-- if production -->
|
||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.js']["css"][0] }}"/>
|
||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
||||
@else
|
||||
<!-- if development -->
|
||||
@php
|
||||
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
|
||||
@endphp
|
||||
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
||||
@endif
|
||||
|
||||
|
||||
{{-- <link rel="icon" type="image/x-icon" href="/favicon.ico"/>--}}
|
||||
|
||||
<title>@yield('title') - {{ config("lucent.name") }}</title>
|
||||
@include("lucent::includes.assets")
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
@yield('content')
|
||||
</div>
|
||||
|
||||
@yield('content')
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,33 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="csrf-token" content="{{ csrf_token() }}">
|
||||
<title>@yield('title') - Lucent Data Platform</title>
|
||||
@if(config("lucent.env") == "production")
|
||||
<!-- if production -->
|
||||
<link rel="stylesheet" href="/vendor/lucent/dist/{{ $manifest['main.js']["css"][0] }}"/>
|
||||
<script type="module" src="/vendor/lucent/dist/{{ $manifest['main.js']["file"] }}"></script>
|
||||
@else
|
||||
<!-- if development -->
|
||||
@php
|
||||
echo '<script type="module" crossorigin src="http://127.0.0.1:5173/@vite/client"></script>';
|
||||
@endphp
|
||||
<script type="module" crossorigin src="http://127.0.0.1:5173/main.js"></script>
|
||||
@endif
|
||||
|
||||
<title>@yield('title') - {{ config("lucent.name") }}</title>
|
||||
@include("lucent::includes.assets")
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
|
||||
@yield('content')
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
@php
|
||||
$schema = $schemas->where("name",$record->schema)->first();
|
||||
@endphp
|
||||
<td>
|
||||
@if($schema->type === "files")
|
||||
<Preview {record} size="tiny"/>
|
||||
@else
|
||||
<a
|
||||
href="/lucent/records/{{$record->id}}"
|
||||
class="text-decoration-none text-dark d-block"
|
||||
>
|
||||
{{$viewModel->getRecordName($record, $schemas)}}
|
||||
</a>
|
||||
|
||||
{{$record->status->value === "draft" ? "Draft" : ""}}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td><a
|
||||
class="text-decoration-none lx-small-text"
|
||||
href="/lucent/content/{{$schema->name}}">{{$schema->label}}</a
|
||||
>
|
||||
</td>
|
||||
|
||||
|
||||
<td>
|
||||
{{-- <div class="d-flex">--}}
|
||||
{{-- <Avatar name={usernameById(users, record._sys.updatedBy)} side={24}/>--}}
|
||||
{{-- <div class="ms-2">--}}
|
||||
{{-- {frieldlyUpdatedAt}--}}
|
||||
{{-- </div>--}}
|
||||
{{-- </div>--}}
|
||||
</td>
|
||||
@@ -1,7 +0,0 @@
|
||||
@php
|
||||
$currentSchema = $currentSchema ?? null;
|
||||
$activeClass = $schema->name === $currentSchema?->name ? "active" : "";
|
||||
@endphp
|
||||
|
||||
<a class="sidebar-item {{$activeClass}}" aria-current="page"
|
||||
href="/lucent/content/{{$schema->name}}">{{$schema->label}}</a>
|
||||
@@ -1,22 +0,0 @@
|
||||
<a class="nav-item" href="/lucent">{{$channel->name}}</a>
|
||||
<div class="sidebar">
|
||||
|
||||
<div class="sidebar-header">
|
||||
Content
|
||||
</div>
|
||||
@foreach($schemas->where("type.value", "collection")->where("isEntry",true) as $schema)
|
||||
@include("lucent::sidebar.sidebar-item", ["schema" => $schema])
|
||||
@endforeach
|
||||
<div class="sidebar-header">
|
||||
Files
|
||||
</div>
|
||||
@foreach($schemas->where("type.value", "files") as $schema)
|
||||
@include("lucent::sidebar.sidebar-item", ["schema" => $schema])
|
||||
@endforeach
|
||||
<div class="sidebar-header">
|
||||
Other
|
||||
</div>
|
||||
@foreach($schemas->where("type.value", "collection")->where("isEntry",false) as $schema)
|
||||
@include("lucent::sidebar.sidebar-item", ["schema" => $schema])
|
||||
@endforeach
|
||||
</div>
|
||||
@@ -1,13 +1,11 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
import path from 'path'
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig({
|
||||
plugins: [svelte()],
|
||||
root: 'js',
|
||||
build: {
|
||||
// generate manifest.json in outDir
|
||||
|
||||
outDir: '../dist',
|
||||
emptyOutDir: true,
|
||||
manifest: "manifest.json",
|
||||
@@ -15,7 +13,5 @@ export default defineConfig({
|
||||
// overwrite default .html entry
|
||||
input: path.resolve(__dirname, 'js/main.js')
|
||||
},
|
||||
|
||||
|
||||
},
|
||||
})
|
||||
|
||||
@@ -13,7 +13,6 @@ use Lucent\Account\AuthService;
|
||||
use Lucent\Channel\ChannelService;
|
||||
use Lucent\LucentException;
|
||||
use Lucent\Svelte\Svelte;
|
||||
use Lucent\Util\Form\FormException;
|
||||
use Lucent\Util\Form\ResponseFormError;
|
||||
use function Lucent\Response\fail;
|
||||
use function Lucent\Response\ok;
|
||||
@@ -38,12 +37,10 @@ class AuthController
|
||||
return redirect($this->channelService->channel->lucentUrl . "/login");
|
||||
}
|
||||
|
||||
|
||||
return $this->svelte->render(
|
||||
layout: "account",
|
||||
view: "register",
|
||||
title: "Create an account",
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user