mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-23 18:17:20 +00:00
More tw5dropbox updates
This commit is contained in:
parent
63e486298c
commit
d416781110
@ -12,9 +12,13 @@ Startup the Dropbox main app
|
||||
/*global $tw: false */
|
||||
"use strict";
|
||||
|
||||
var titleLoadedWikis = "$:/plugins/dropbox/LoadedWikis";
|
||||
|
||||
exports.startup = function() {
|
||||
$tw.wiki.addTiddler({title: titleLoadedWikis, text: "no"},true);
|
||||
// Load tiddlers
|
||||
$tw.plugins.dropbox.loadWikiFiles("/",function() {
|
||||
$tw.wiki.addTiddler({title: titleLoadedWikis, text: "yes"},true);
|
||||
console.log("Loaded all wikis",$tw.wiki.tiddlers);
|
||||
});
|
||||
};
|
||||
|
@ -2,9 +2,15 @@ title: TiddlyWiki5 in the Sky with Dropbox
|
||||
|
||||
Welcome to TiddlyWiki5 in the Sky with Dropbox.
|
||||
|
||||
<<reveal state:[[$:/plugins/dropbox/LoadedWikis]] type:nomatch text:yes><
|
||||
Loading your wikis from Dropbox
|
||||
>>
|
||||
|
||||
<<reveal state:[[$:/plugins/dropbox/LoadedWikis]] type:match text:yes><
|
||||
! Your ~TiddlyWikis
|
||||
|
||||
((( [tag[wiki]] ))(WikiTemplate))
|
||||
<<transclude filter:[tag[wiki]] templateTitle:WikiTemplate emptyMessage:"You haven't created any wikis yet">>
|
||||
>>
|
||||
|
||||
! Create new ~TiddlyWiki
|
||||
|
||||
|
@ -1,10 +1,4 @@
|
||||
title: WikiTemplate
|
||||
|
||||
<div class="alert">
|
||||
<div>
|
||||
<<view title>>
|
||||
</div>
|
||||
<div>
|
||||
<<view url link>>
|
||||
</div>
|
||||
<div class="alert"><<view title>> - <<link throughField:urlView><View>> <<link throughField:urlEdit><Edit>>
|
||||
</div>
|
||||
|
@ -86,7 +86,8 @@ $tw.plugins.dropbox.loadWikiFiles = function(path,callback) {
|
||||
for(var s=0; s<stats.length; s++) {
|
||||
var stat = stats[s];
|
||||
if(!stat.isFile && stat.isFolder) {
|
||||
$tw.wiki.addTiddler({title: stat.name, text: "wiki", tags: ["wiki"], url: $tw.plugins.dropbox.userInfo.publicAppUrl + stat.path + "/index.html"});
|
||||
var url = $tw.plugins.dropbox.userInfo.publicAppUrl + stat.path + "/index.html";
|
||||
$tw.wiki.addTiddler({title: stat.name, text: "wiki", tags: ["wiki"], urlView: url, urlEdit: url + "?edit=true"});
|
||||
}
|
||||
}
|
||||
callback();
|
||||
|
Loading…
Reference in New Issue
Block a user