core: Default to loading into the ssb app. No more messing around.
All checks were successful
Build Tilde Friends / Build-All (push) Successful in 26m3s

This commit is contained in:
Cory McWilliams 2025-01-05 14:52:27 -05:00
parent d1b7681efc
commit 23db09f9b7
4 changed files with 22 additions and 16 deletions

View File

@ -593,16 +593,19 @@ class TfElement extends LitElement {
)} )}
</div> </div>
`; `;
let contents = let contents = this.guest
this.guest ? ? html`<div
html`<div class="w3-display-middle w3-panel w3-theme-l5 w3-card-4 w3-padding-large w3-round-xlarge w3-xlarge w3-container"
class="w3-display-middle w3-panel w3-theme-l5 w3-card-4 w3-padding-large w3-round-xlarge w3-xlarge w3-container" >
> <p>🦀 Must be logged in to Tilde Friends to scuttle here. 🦀</p>
<p>🦀 Must be logged in to Tilde Friends to scuttle here. 🦀</p> <footer class="w3-center">
<footer class="w3-center"> <a
<a class="w3-button w3-theme-d1" href=${`/login?return=${encodeURIComponent(this.url)}`}>Login</a> class="w3-button w3-theme-d1"
</footer> href=${`/login?return=${encodeURIComponent(this.url)}`}
</div>` >Login</a
>
</footer>
</div>`
: !this.loaded || this.loading : !this.loaded || this.loading
? html`<div ? html`<div
class="w3-display-middle w3-panel w3-theme-l5 w3-card-4 w3-padding-large w3-round-xlarge w3-xlarge" class="w3-display-middle w3-panel w3-theme-l5 w3-card-4 w3-padding-large w3-round-xlarge w3-xlarge"

View File

@ -253,7 +253,10 @@ class TfMessageElement extends LitElement {
render_mentions() { render_mentions() {
let mentions = this.message?.content?.mentions || []; let mentions = this.message?.content?.mentions || [];
mentions = mentions.filter( mentions = mentions.filter(
(x) => this.message?.content?.text?.indexOf(typeof(x) === 'string' ? x : x.link) === -1 (x) =>
this.message?.content?.text?.indexOf(
typeof x === 'string' ? x : x.link
) === -1
); );
if (mentions.length) { if (mentions.length) {
let self = this; let self = this;

View File

@ -339,7 +339,7 @@ static JSValue _util_defaultGlobalSettings(JSContext* context, JSValueConst this
.default_value = _is_mobile() ? JS_NewInt32(context, (int)(1.0f * 365 * 24 * 60 * 60)) : JS_UNDEFINED }, .default_value = _is_mobile() ? JS_NewInt32(context, (int)(1.0f * 365 * 24 * 60 * 60)) : JS_UNDEFINED },
{ .name = "fetch_hosts", .type = "string", .description = "Comma-separated list of host names to which HTTP fetch requests are allowed. None if empty." }, { .name = "fetch_hosts", .type = "string", .description = "Comma-separated list of host names to which HTTP fetch requests are allowed. None if empty." },
{ .name = "http_redirect", .type = "string", .description = "If connecting by HTTP and HTTPS is configured, Location header prefix (ie, \"http://example.com\")" }, { .name = "http_redirect", .type = "string", .description = "If connecting by HTTP and HTTPS is configured, Location header prefix (ie, \"http://example.com\")" },
{ .name = "index", .type = "string", .description = "Default path.", .default_value = JS_NewString(context, "/~core/apps") }, { .name = "index", .type = "string", .description = "Default path.", .default_value = JS_NewString(context, "/~core/ssb/") },
{ .name = "index_map", .type = "textarea", .description = "Mappings from hostname to redirect path, one per line, as in: \"www.tildefriends.net=/~core/index/\"" }, { .name = "index_map", .type = "textarea", .description = "Mappings from hostname to redirect path, one per line, as in: \"www.tildefriends.net=/~core/index/\"" },
{ .name = "peer_exchange", { .name = "peer_exchange",
.type = "boolean", .type = "boolean",

View File

@ -71,7 +71,7 @@ try:
driver = webdriver.Firefox(options = options, service = service) driver = webdriver.Firefox(options = options, service = service)
wait = WebDriverWait(driver, 10) wait = WebDriverWait(driver, 10)
driver.get('http://localhost:8888') driver.get('http://localhost:8888/~core/apps/')
select(driver, ['tf-navigation', 'shadow_root', '=login'], ('click',)) select(driver, ['tf-navigation', 'shadow_root', '=login'], ('click',))
select(driver, ['tf-auth', 'shadow_root', '#register_label'], ('click',)) select(driver, ['tf-auth', 'shadow_root', '#register_label'], ('click',))
select(driver, ['tf-auth', 'shadow_root', '#name'], ('send_keys', 'adminuser')) select(driver, ['tf-auth', 'shadow_root', '#name'], ('send_keys', 'adminuser'))
@ -89,7 +89,7 @@ try:
select(driver, ['tf-navigation', 'shadow_root', '#identity'], ('click',)) select(driver, ['tf-navigation', 'shadow_root', '#identity'], ('click',))
select(driver, ['tf-navigation', 'shadow_root', '#logout'], ('click',)) select(driver, ['tf-navigation', 'shadow_root', '#logout'], ('click',))
driver.get('http://localhost:8888') driver.get('http://localhost:8888/~core/apps/')
select(driver, ['tf-navigation', 'shadow_root', '=login'], ('click',)) select(driver, ['tf-navigation', 'shadow_root', '=login'], ('click',))
select(driver, ['tf-auth', 'shadow_root', '#register_label'], ('click',)) select(driver, ['tf-auth', 'shadow_root', '#register_label'], ('click',))
select(driver, ['tf-auth', 'shadow_root', '#name'], ('send_keys', 'testuser')) select(driver, ['tf-auth', 'shadow_root', '#name'], ('send_keys', 'testuser'))
@ -140,7 +140,7 @@ try:
select(driver, ['tf-navigation', 'shadow_root', '#close_error'], ('click',)) select(driver, ['tf-navigation', 'shadow_root', '#close_error'], ('click',))
select(driver, ['tf-navigation', 'shadow_root', '=edit'], ('click',)) select(driver, ['tf-navigation', 'shadow_root', '=edit'], ('click',))
driver.get('http://localhost:8888') driver.get('http://localhost:8888/~core/apps/')
select(driver, ['#document', 'frame', '=identity']) select(driver, ['#document', 'frame', '=identity'])
@ -170,7 +170,7 @@ try:
id1 = select(driver, ['#document', 'frame', 'li']).text.split(' ')[-1] id1 = select(driver, ['#document', 'frame', 'li']).text.split(' ')[-1]
assert id0 == id1 assert id0 == id1
driver.get('http://localhost:8888') driver.get('http://localhost:8888/~core/apps/')
select(driver, ['#document', 'frame', '=ssb'], ('click',)) select(driver, ['#document', 'frame', '=ssb'], ('click',))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#edit'], ('send_keys', 'Hello, world!')) select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#edit'], ('send_keys', 'Hello, world!'))
select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',)) select(driver, ['#document', 'frame', 'tf-app', 'shadow_root', '#tf-tab-news', 'shadow_root', '#tf-compose', 'shadow_root', '#submit'], ('click',))