try use one land for all

This commit is contained in:
koplenov 2025-08-17 04:04:43 +03:00
parent e3cdd4b6e2
commit 6c7bc07447
11 changed files with 52 additions and 18 deletions

File diff suppressed because one or more lines are too long

View file

@ -13956,7 +13956,8 @@ var $;
this.add_title(''); this.add_title('');
} }
add_site(url, title) { add_site(url, title) {
const new_site = this.home().Sites(null).make({ '': $hyoo_crus_rank_rule }); const new_site = this.home().Sites(null).make(null);
new_site.land().give(null, $hyoo_crus_rank_rule);
new_site.url(null).val(url); new_site.url(null).val(url);
new_site.title(null).val(title); new_site.title(null).val(title);
} }

File diff suppressed because one or more lines are too long

View file

@ -10615,11 +10615,19 @@ var $;
}) { }) {
tick() { tick() {
this.$.$mol_state_time.now(5000); this.$.$mol_state_time.now(5000);
console.log(this.land().ref().description); this.$.$mol_log3_done({
place: this,
message: this.land().ref().description,
});
if (this.can_change()) { if (this.can_change()) {
const url = this.url().val(); const url = this.url().val();
const title = this.title().val(); const title = this.title().val();
console.log({ action: "tick", url, title }); console.log({ url, title });
this.$.$mol_log3_done({
place: this,
message: this.land().ref().description,
...{ action: "tick", url, title }
});
const request = $mol_fetch.response(url); const request = $mol_fetch.response(url);
this.last_ping_status(null).val(request.code() == 200); this.last_ping_status(null).val(request.code() == 200);
this.last_ping_time(null).val(new $mol_time_moment); this.last_ping_time(null).val(new $mol_time_moment);
@ -13948,7 +13956,8 @@ var $;
this.add_title(''); this.add_title('');
} }
add_site(url, title) { add_site(url, title) {
const new_site = this.home().Sites(null).make({ '': $hyoo_crus_rank_rule }); const new_site = this.home().Sites(null).make(null);
new_site.land().give(null, $hyoo_crus_rank_rule);
new_site.url(null).val(url); new_site.url(null).val(url);
new_site.title(null).val(title); new_site.title(null).val(title);
} }
@ -14082,14 +14091,25 @@ var $;
]; ];
class $hd_canary extends $hyoo_crus_app_node { class $hd_canary extends $hyoo_crus_app_node {
_stat_update() { _stat_update() {
this.$.$mol_log3_done({
place: this,
message: "_stat_update",
...{ action: "tick", url: "_stat_update", title: "_stat_update" }
});
const home_land = this.$.$hyoo_crus_glob.home($hd_canary_app_home).land(); const home_land = this.$.$hyoo_crus_glob.home($hd_canary_app_home).land();
const list = home_land.Node($hyoo_crus_dict).Item(''); const list = home_land.Node($hyoo_crus_dict).Item('');
for (const ref of list.keys()) { for (const ref of list.keys()) {
try {
const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home); const user = this.$.$hyoo_crus_glob.Node($hyoo_crus_ref(ref), $hd_canary_app_home);
for (const site of user.Sites(null).remote_list()) { for (const site of user.Sites(null)?.remote_list() ?? []) {
site.tick(); site.tick();
} }
} }
catch (error) {
$mol_fail_log(error);
continue;
}
}
} }
join() { join() {
return new $hd_canary_join; return new $hd_canary_join;

View file

@ -13947,7 +13947,8 @@ var $;
this.add_title(''); this.add_title('');
} }
add_site(url, title) { add_site(url, title) {
const new_site = this.home().Sites(null).make({ '': $hyoo_crus_rank_rule }); const new_site = this.home().Sites(null).make(null);
new_site.land().give(null, $hyoo_crus_rank_rule);
new_site.url(null).val(url); new_site.url(null).val(url);
new_site.title(null).val(title); new_site.title(null).val(title);
} }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -12753,7 +12753,8 @@ var $;
this.add_title(''); this.add_title('');
} }
add_site(url, title) { add_site(url, title) {
const new_site = this.home().Sites(null).make({ '': $hyoo_crus_rank_rule }); const new_site = this.home().Sites(null).make(null);
new_site.land().give(null, $hyoo_crus_rank_rule);
new_site.url(null).val(url); new_site.url(null).val(url);
new_site.title(null).val(title); new_site.title(null).val(title);
} }

File diff suppressed because one or more lines are too long

View file

@ -12673,11 +12673,19 @@ var $;
}) { }) {
tick() { tick() {
this.$.$mol_state_time.now(5000); this.$.$mol_state_time.now(5000);
console.log(this.land().ref().description); this.$.$mol_log3_done({
place: this,
message: this.land().ref().description,
});
if (this.can_change()) { if (this.can_change()) {
const url = this.url().val(); const url = this.url().val();
const title = this.title().val(); const title = this.title().val();
console.log({ action: "tick", url, title }); console.log({ url, title });
this.$.$mol_log3_done({
place: this,
message: this.land().ref().description,
...{ action: "tick", url, title }
});
const request = $mol_fetch.response(url); const request = $mol_fetch.response(url);
this.last_ping_status(null).val(request.code() == 200); this.last_ping_status(null).val(request.code() == 200);
this.last_ping_time(null).val(new $mol_time_moment); this.last_ping_time(null).val(new $mol_time_moment);
@ -12745,7 +12753,8 @@ var $;
this.add_title(''); this.add_title('');
} }
add_site(url, title) { add_site(url, title) {
const new_site = this.home().Sites(null).make({ '': $hyoo_crus_rank_rule }); const new_site = this.home().Sites(null).make(null);
new_site.land().give(null, $hyoo_crus_rank_rule);
new_site.url(null).val(url); new_site.url(null).val(url);
new_site.title(null).val(title); new_site.title(null).val(title);
} }

View file

@ -53,7 +53,9 @@ namespace $.$$ {
@$mol_action @$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(null)
new_site.land().give(null, $hyoo_crus_rank_rule)
new_site.url(null)!.val(url) new_site.url(null)!.val(url)
new_site.title(null)!.val(title) new_site.title(null)!.val(title)
} }