mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-27 01:28:56 +08:00
37 lines
615 B
JavaScript
37 lines
615 B
JavaScript
|
|
(rl => { if (rl) {
|
|
|
|
class ExampleAdminSettings
|
|
{
|
|
constructor()
|
|
{
|
|
this.php = ko.observable('');
|
|
this.loading = ko.observable(false);
|
|
}
|
|
|
|
onBuild()
|
|
{
|
|
this.loading(true);
|
|
|
|
rl.pluginRemoteRequest((iError, oData) => {
|
|
|
|
this.loading(false);
|
|
|
|
if (iError) {
|
|
console.error({
|
|
iError: iError,
|
|
oData: oData
|
|
});
|
|
} else {
|
|
this.php(oData.Result.PHP || '');
|
|
}
|
|
|
|
}, 'JsonAdminGetData');
|
|
|
|
}
|
|
}
|
|
|
|
rl.addSettingsViewModelForAdmin(ExampleAdminSettings, 'ExampleAdminSettingsTab',
|
|
'SETTINGS_EXAMPLE_ADMIN_EXAMPLE_TAB_PLUGIN/TAB_NAME', 'Example');
|
|
|
|
}})(window.rl);
|