-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.js
76 lines (73 loc) · 8.72 KB
/
settings.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
'use strict';
var tslib_es6 = require('./tslib.es6-fde326af.js');
var obsidian = require('obsidian');
var AmpliFlowSettingTab = /** @class */ (function (_super) {
tslib_es6.__extends(AmpliFlowSettingTab, _super);
function AmpliFlowSettingTab(app, plugin) {
var _this = _super.call(this, app, plugin) || this;
_this.plugin = plugin;
return _this;
}
AmpliFlowSettingTab.prototype.display = function () {
var _this = this;
var containerEl = this.containerEl;
containerEl.empty();
new obsidian.Setting(containerEl)
.setName('Tenant')
.setDesc('Your AmpliFlow tenant name')
.addText(function (text) { return text
.setPlaceholder('Enter your tenant')
.setValue(_this.plugin.settings.tenant)
.onChange(function (value) { return tslib_es6.__awaiter(_this, void 0, void 0, function () {
return tslib_es6.__generator(this, function (_a) {
switch (_a.label) {
case 0:
this.plugin.settings.tenant = value;
return [4 /*yield*/, this.plugin.saveSettings()];
case 1:
_a.sent();
return [2 /*return*/];
}
});
}); }); });
new obsidian.Setting(containerEl)
.setName('Email')
.setDesc('Your AmpliFlow email address')
.addText(function (text) { return text
.setPlaceholder('Enter your email')
.setValue(_this.plugin.settings.email)
.onChange(function (value) { return tslib_es6.__awaiter(_this, void 0, void 0, function () {
return tslib_es6.__generator(this, function (_a) {
switch (_a.label) {
case 0:
this.plugin.settings.email = value;
return [4 /*yield*/, this.plugin.saveSettings()];
case 1:
_a.sent();
return [2 /*return*/];
}
});
}); }); });
new obsidian.Setting(containerEl)
.setName('Password')
.setDesc('Your AmpliFlow password')
.addText(function (text) { return text
.setPlaceholder('Enter your password')
.setValue(_this.plugin.settings.password)
.onChange(function (value) { return tslib_es6.__awaiter(_this, void 0, void 0, function () {
return tslib_es6.__generator(this, function (_a) {
switch (_a.label) {
case 0:
this.plugin.settings.password = value;
return [4 /*yield*/, this.plugin.saveSettings()];
case 1:
_a.sent();
return [2 /*return*/];
}
});
}); }); });
};
return AmpliFlowSettingTab;
}(obsidian.PluginSettingTab));
module.exports = AmpliFlowSettingTab;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dGluZ3MuanMiLCJzb3VyY2VzIjpbInNldHRpbmdzLnRzIl0sInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBBbXBsaUZsb3dQdWJsaXNoZXIgZnJvbSBcIm1haW5cIjtcclxuaW1wb3J0IHsgUGx1Z2luU2V0dGluZ1RhYiwgQXBwLCBTZXR0aW5nIH0gZnJvbSBcIm9ic2lkaWFuXCI7XHJcblxyXG5pbnRlcmZhY2UgQW1wbGlGbG93U2V0dGluZ3Mge1xyXG4gICAgdGVuYW50OiBzdHJpbmc7XHJcbiAgICBlbWFpbDogc3RyaW5nO1xyXG4gICAgcGFzc3dvcmQ6IHN0cmluZztcclxuICB9XHJcbiAgXHJcbiAgY29uc3QgREVGQVVMVF9TRVRUSU5HUzogQW1wbGlGbG93U2V0dGluZ3MgPSB7XHJcbiAgICB0ZW5hbnQ6ICcnLFxyXG4gICAgZW1haWw6ICcnLFxyXG4gICAgcGFzc3dvcmQ6ICcnXHJcbiAgfTtcclxuXHJcbiAgZXhwb3J0IGRlZmF1bHQgY2xhc3MgQW1wbGlGbG93U2V0dGluZ1RhYiBleHRlbmRzIFBsdWdpblNldHRpbmdUYWIge1xyXG4gICAgcGx1Z2luOiBBbXBsaUZsb3dQdWJsaXNoZXI7XHJcbiAgXHJcbiAgICBjb25zdHJ1Y3RvcihhcHA6IEFwcCwgcGx1Z2luOiBBbXBsaUZsb3dQdWJsaXNoZXIpIHtcclxuICAgICAgc3VwZXIoYXBwLCBwbHVnaW4pO1xyXG4gICAgICB0aGlzLnBsdWd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