penguin/AstroJS

Javascript framework for my blog

commit 15ed39bbeeb6f60cc77f1d01f85d438b26110dd9

author斟酌 鵬兄 <tgckpg@gmail.com>
date2022-07-31T17:34:46Z
subjectFixed some snippet conf not set properly
commit 15ed39bbeeb6f60cc77f1d01f85d438b26110dd9
Author: 斟酌 鵬兄 <tgckpg@gmail.com>
Date:   2022-07-31T17:34:46Z

    Fixed some snippet conf not set properly
---
 botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js                |  4 ++--
 botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Spoiler.js |  1 +
 .../_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.js       | 10 ++++++++++
 3 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js b/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js
index 848c1f1..dbd8be8 100644
--- a/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js
+++ b/botanjs/src/Astro/Blog/AstroEdit/SiteLibrary.js
@@ -53,8 +53,8 @@
 			{
 				return [
 					new DataKey("id", data.id)
-					, new DataKey("title", decodeURI(data.name))
-					, new DataKey("author", decodeURI(data.author))
+					, new IKey("data-title", data.name)
+					, new IKey("data-author", data.author)
 					, new DataKey("hash", data.hash)
 				];
 			}
diff --git a/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Spoiler.js b/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Spoiler.js
index 9daff8e..471ae76 100644
--- a/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Spoiler.js
+++ b/botanjs/src/Astro/Blog/AstroEdit/Visualizer/Snippet/Spoiler.js
@@ -50,6 +50,7 @@
 			, "OK", "Cancel", visualizer.bind({title: input_title, content:v_snippetInput, expanded: input_expanded, stage: this._stage})).show();
 		}
 		
+		/* @type override {_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.Override} */
 		, visualizer = function( submitted, override )
 		{
 			var content, title, expanded
diff --git a/botanjs/src/externs/_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.js b/botanjs/src/externs/_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.js
new file mode 100644
index 0000000..c660e6f
--- /dev/null
+++ b/botanjs/src/externs/_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.js
@@ -0,0 +1,10 @@
+/** @type {Object} */
+_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler = {};
+
+_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.Override = {};
+/** @type String */
+_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.Override.title;
+/** @type String */
+_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.Override.expanded;
+/** @type String */
+_AstXObject_.AstroEdit.Visualizer.Snippet.Spoiler.Override.value;