瀏覽代碼

Merge remote-tracking branch 'origin/master'

shalvah 3 年之前
父節點
當前提交
7dd630d2da
共有 2 個文件被更改,包括 9 次插入9 次删除
  1. 2 2
      resources/views/components/field-details.blade.php
  2. 7 7
      src/Writing/HtmlWriter.php

+ 2 - 2
resources/views/components/field-details.blade.php

@@ -43,11 +43,11 @@
         </label>
     @elseif($isList)
         <input type="{{ $inputType }}"
-               name="{{ $fullName.".0" }}"
+               name="{{ $fullName."[0]" }}"
                data-endpoint="{{ $endpointId }}"
                data-component="{{ $component }}" hidden>
         <input type="{{ $inputType }}"
-               name="{{ $fullName.".1" }}"
+               name="{{ $fullName."[1]" }}"
                data-endpoint="{{ $endpointId }}"
                data-component="{{ $component }}" hidden>
     @else

+ 7 - 7
src/Writing/HtmlWriter.php

@@ -76,11 +76,15 @@ class HtmlWriter
         Utils::copyDirectory("{$assetsFolder}/images/", "{$destinationFolder}/images");
 
         $assets = [
-            "{$assetsFolder}/css/theme-$theme.style.css" => ["$destinationFolder/css/", "theme-$theme.style.css"],
-            "{$assetsFolder}/css/theme-$theme.print.css" => ["$destinationFolder/css/", "theme-$theme.print.css"],
-            "{$assetsFolder}/js/theme-$theme.js" => ["$destinationFolder/js/", WritingUtils::getVersionedAsset("theme-$theme.js")],
+            "{$assetsFolder}/css/theme-default.style.css" => ["$destinationFolder/css/", "theme-$theme.style.css"],
+            "{$assetsFolder}/css/theme-default.print.css" => ["$destinationFolder/css/", "theme-$theme.print.css"],
+            "{$assetsFolder}/js/theme-default.js" => ["$destinationFolder/js/", WritingUtils::getVersionedAsset("theme-$theme.js")],
         ];
 
+        if ($this->config->get('try_it_out.enabled', true)) {
+            $assets["{$assetsFolder}/js/tryitout.js"] = ["$destinationFolder/js/", WritingUtils::getVersionedAsset('tryitout.js')];
+        }
+
         foreach ($assets as $path => [$destination, $fileName]) {
             if (file_exists($path)) {
                 if (!is_dir($destination)) {
@@ -89,10 +93,6 @@ class HtmlWriter
                 copy($path, $destination.$fileName);
             }
         }
-
-        if ($this->config->get('try_it_out.enabled', true)) {
-            copy("{$assetsFolder}/js/tryitout.js", $destinationFolder . WritingUtils::getVersionedAsset('/js/tryitout.js'));
-        }
     }
 
     protected function transformMarkdownFileToHTML(string $markdownFilePath): string