You've already forked lubo_comment_query
节目建设页 OCR 侧栏点击填入
This commit is contained in:
@@ -9,7 +9,9 @@
|
||||
@include("common.header")
|
||||
|
||||
<main class="flex-grow container mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<div class="max-w-3xl mx-auto">
|
||||
@php($show_ocr_panel = $program->id && !empty($ocr_pivots))
|
||||
<div class="@if($show_ocr_panel) lg:flex lg:gap-6 @else max-w-3xl mx-auto @endif">
|
||||
<div class="@if($show_ocr_panel) flex-1 min-w-0 max-w-3xl @endif">
|
||||
<div class="md:flex md:items-center md:justify-between mb-8">
|
||||
<h1 class="text-2xl font-bold text-gray-900 dark:text-white">
|
||||
@if($program->id) 编辑节目 @else 添加节目 @endif
|
||||
@@ -27,19 +29,19 @@
|
||||
|
||||
<div>
|
||||
<label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-300">节目名称</label>
|
||||
<input type="text" name="name" id="name" required autocomplete="off" value="{{ old("name", $program->name) }}"
|
||||
<input type="text" name="name" id="name" required autocomplete="off" data-ocr-target="name" value="{{ old("name", $program->name) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-2">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="difficulty" class="block text-sm font-medium text-gray-700 dark:text-gray-300">节目难度</label>
|
||||
<input type="text" name="difficulty" id="difficulty" autocomplete="off" value="{{ old("difficulty", $program->difficulty) }}"
|
||||
<input type="text" name="difficulty" id="difficulty" autocomplete="off" data-ocr-target="difficulty" value="{{ old("difficulty", $program->difficulty) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-2">
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<label for="desc" class="block text-sm font-medium text-gray-700 dark:text-gray-300">节目要求</label>
|
||||
<input type="text" name="desc" id="desc" autocomplete="off" value="{{ old("desc", $program->desc) }}"
|
||||
<input type="text" name="desc" id="desc" autocomplete="off" data-ocr-target="desc" value="{{ old("desc", $program->desc) }}"
|
||||
class="mt-1 block w-full rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 shadow-sm focus:border-indigo-500 focus:ring-indigo-500 sm:text-sm py-2">
|
||||
</div>
|
||||
|
||||
@@ -110,8 +112,25 @@
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
@if($show_ocr_panel)
|
||||
<div class="w-full lg:w-96 flex-shrink-0 mt-8 lg:mt-0" id="ocr-fill-panel"
|
||||
data-mode="text"
|
||||
data-pivots='@json($ocr_pivots ?? [])'
|
||||
data-target-labels='{"name":"节目名称","difficulty":"节目难度","desc":"节目要求"}'>
|
||||
<div class="bg-white dark:bg-gray-800 shadow rounded-lg p-4 lg:sticky lg:top-20">
|
||||
<h2 class="text-lg font-bold text-gray-900 dark:text-white mb-3">片段 OCR</h2>
|
||||
<div data-ocr-fill-body class="text-sm text-gray-500 dark:text-gray-400">加载中…</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</main>
|
||||
@if($show_ocr_panel)
|
||||
<script src="{{ mix('/js/manifest.js') }}"></script>
|
||||
<script src="{{ mix('/js/component/ocr_fill.js') }}"></script>
|
||||
<script>document.addEventListener("DOMContentLoaded", function () { OcrFill.init(document.getElementById("ocr-fill-panel")); });</script>
|
||||
@endif
|
||||
@include("common.footer")
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user