mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-14 13:51:24 +00:00
@@ -24,6 +24,11 @@ function FileSystemAdaptor(options) {
|
||||
$tw.utils.createDirectory($tw.boot.wikiTiddlersPath);
|
||||
}
|
||||
|
||||
FileSystemAdaptor.prototype.isReady = function() {
|
||||
// The file system adaptor is always ready
|
||||
return true;
|
||||
};
|
||||
|
||||
FileSystemAdaptor.prototype.getTiddlerInfo = function(tiddler) {
|
||||
return {};
|
||||
};
|
||||
|
||||
@@ -19,9 +19,14 @@ function TiddlyWebAdaptor(options) {
|
||||
this.wiki = options.wiki;
|
||||
this.host = this.getHost();
|
||||
this.recipe = undefined;
|
||||
this.hasStatus = false;
|
||||
this.logger = new $tw.utils.Logger("TiddlyWebAdaptor");
|
||||
}
|
||||
|
||||
TiddlyWebAdaptor.prototype.isReady = function() {
|
||||
return this.hasStatus;
|
||||
};
|
||||
|
||||
TiddlyWebAdaptor.prototype.getHost = function() {
|
||||
var text = this.wiki.getTiddlerText(CONFIG_HOST_TIDDLER,DEFAULT_HOST_TIDDLER),
|
||||
substitutions = [
|
||||
@@ -51,6 +56,7 @@ TiddlyWebAdaptor.prototype.getStatus = function(callback) {
|
||||
$tw.utils.httpRequest({
|
||||
url: this.host + "status",
|
||||
callback: function(err,data) {
|
||||
self.hasStatus = true;
|
||||
if(err) {
|
||||
return callback(err);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user