fix bulk add

This commit is contained in:
koplenov 2025-08-17 02:33:24 +03:00
parent cac5814c99
commit 6145f441b3
11 changed files with 37 additions and 5 deletions

File diff suppressed because one or more lines are too long

View file

@ -13980,12 +13980,18 @@ var $;
} }
} }
} }
__decorate([
$mol_action
], $hd_canary_app.prototype, "add_site", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "users", null); ], $hd_canary_app.prototype, "users", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "home", null); ], $hd_canary_app.prototype, "home", null);
__decorate([
$mol_action
], $hd_canary_app.prototype, "bulk_add", null);
$$.$hd_canary_app = $hd_canary_app; $$.$hd_canary_app = $hd_canary_app;
})($$ = $.$$ || ($.$$ = {})); })($$ = $.$$ || ($.$$ = {}));
})($ || ($ = {})); })($ || ($ = {}));

File diff suppressed because one or more lines are too long

View file

@ -13980,12 +13980,18 @@ var $;
} }
} }
} }
__decorate([
$mol_action
], $hd_canary_app.prototype, "add_site", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "users", null); ], $hd_canary_app.prototype, "users", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "home", null); ], $hd_canary_app.prototype, "home", null);
__decorate([
$mol_action
], $hd_canary_app.prototype, "bulk_add", null);
$$.$hd_canary_app = $hd_canary_app; $$.$hd_canary_app = $hd_canary_app;
})($$ = $.$$ || ($.$$ = {})); })($$ = $.$$ || ($.$$ = {}));
})($ || ($ = {})); })($ || ($ = {}));

View file

@ -13971,12 +13971,18 @@ var $;
} }
} }
} }
__decorate([
$mol_action
], $hd_canary_app.prototype, "add_site", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "users", null); ], $hd_canary_app.prototype, "users", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "home", null); ], $hd_canary_app.prototype, "home", null);
__decorate([
$mol_action
], $hd_canary_app.prototype, "bulk_add", null);
$$.$hd_canary_app = $hd_canary_app; $$.$hd_canary_app = $hd_canary_app;
})($$ = $.$$ || ($.$$ = {})); })($$ = $.$$ || ($.$$ = {}));
})($ || ($ = {})); })($ || ($ = {}));

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -12777,12 +12777,18 @@ var $;
} }
} }
} }
__decorate([
$mol_action
], $hd_canary_app.prototype, "add_site", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "users", null); ], $hd_canary_app.prototype, "users", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "home", null); ], $hd_canary_app.prototype, "home", null);
__decorate([
$mol_action
], $hd_canary_app.prototype, "bulk_add", null);
$$.$hd_canary_app = $hd_canary_app; $$.$hd_canary_app = $hd_canary_app;
})($$ = $.$$ || ($.$$ = {})); })($$ = $.$$ || ($.$$ = {}));
})($ || ($ = {})); })($ || ($ = {}));

File diff suppressed because one or more lines are too long

View file

@ -12777,12 +12777,18 @@ var $;
} }
} }
} }
__decorate([
$mol_action
], $hd_canary_app.prototype, "add_site", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "users", null); ], $hd_canary_app.prototype, "users", null);
__decorate([ __decorate([
$mol_mem $mol_mem
], $hd_canary_app.prototype, "home", null); ], $hd_canary_app.prototype, "home", null);
__decorate([
$mol_action
], $hd_canary_app.prototype, "bulk_add", null);
$$.$hd_canary_app = $hd_canary_app; $$.$hd_canary_app = $hd_canary_app;
})($$ = $.$$ || ($.$$ = {})); })($$ = $.$$ || ($.$$ = {}));
})($ || ($ = {})); })($ || ($ = {}));

View file

@ -51,6 +51,7 @@ namespace $.$$ {
this.add_title(''); this.add_title('');
} }
@$mol_action
add_site(url: string, title: string) { add_site(url: string, title: string) {
const new_site = this.home().Sites(null)!.make({ '': $hyoo_crus_rank_rule }) const new_site = this.home().Sites(null)!.make({ '': $hyoo_crus_rank_rule })
new_site.url(null)!.val(url) new_site.url(null)!.val(url)
@ -94,6 +95,7 @@ namespace $.$$ {
return home return home
} }
@$mol_action
bulk_add(sites_input: string) { bulk_add(sites_input: string) {
const sites = sites_input.split(/\r?\n/).map( site => site.trim()).filter(site => site != "") const sites = sites_input.split(/\r?\n/).map( site => site.trim()).filter(site => site != "")
for (const site of sites) { for (const site of sites) {