mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2025-12-06 02:30:46 -08:00
Lots of improvements to the plugin library
* Moved “add new plugin” into a modal wizard * Adopt big friendly buttons * Add plugin icons and readmes to “add new plugin” modal * Use tabs for splitting plugins/themes/languages * Consistent styling between the “add new plugin” modal and the “installed plugins” control panel tab * Behind the scenes, moved from addressing the library as `recipes/defaults/tiddlers/<etc>` to `recipes/library/tiddlers<etc>`
This commit is contained in:
parent
421ac16389
commit
24435a46be
17 changed files with 227 additions and 222 deletions
|
|
@ -18,8 +18,8 @@ window.addEventListener("message",function listener(event){
|
|||
console.log("plugin library: Message content",event.data);
|
||||
switch(event.data.verb) {
|
||||
case "GET":
|
||||
if(event.data.url === "recipes/default/tiddlers.json") {
|
||||
// Route for recipes/default/tiddlers.json
|
||||
if(event.data.url === "recipes/library/tiddlers.json") {
|
||||
// Route for recipes/library/tiddlers.json
|
||||
event.source.postMessage({
|
||||
verb: "GET-RESPONSE",
|
||||
status: "200",
|
||||
|
|
@ -28,9 +28,9 @@ window.addEventListener("message",function listener(event){
|
|||
type: "application/json",
|
||||
body: JSON.stringify(assetList,null,4)
|
||||
},"*");
|
||||
} else if(event.data.url.indexOf("recipes/default/tiddlers/") === 0) {
|
||||
var url = "recipes/default/tiddlers/" + encodeURIComponent(removePrefix(event.data.url,"recipes/default/tiddlers/"));
|
||||
// Route for recipes/default/tiddlers/<uri-encoded-tiddler-title>.json
|
||||
} else if(event.data.url.indexOf("recipes/library/tiddlers/") === 0) {
|
||||
var url = "recipes/library/tiddlers/" + encodeURIComponent(removePrefix(event.data.url,"recipes/library/tiddlers/"));
|
||||
// Route for recipes/library/tiddlers/<uri-encoded-tiddler-title>.json
|
||||
httpGet(url,function(err,responseText) {
|
||||
if(err) {
|
||||
event.source.postMessage({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue