diff --git a/src/app.jsx b/src/app.jsx
index dc46bb453..3e4a6879c 100644
--- a/src/app.jsx
+++ b/src/app.jsx
@@ -261,7 +261,11 @@ function App() {
if (code) {
console.log({ code });
// Clear the code from the URL
- window.history.replaceState({}, document.title, location.pathname || '/');
+ window.history.replaceState(
+ {},
+ document.title,
+ window.location.pathname || '/',
+ );
const clientID = store.session.get('clientID');
const clientSecret = store.session.get('clientSecret');
diff --git a/src/components/background-service.jsx b/src/components/background-service.jsx
index 6c4b63d17..15647fe1b 100644
--- a/src/components/background-service.jsx
+++ b/src/components/background-service.jsx
@@ -74,6 +74,7 @@ export default memo(function BackgroundService({ isLoggedIn }) {
}
states.notificationsShowNew = true;
}
+ console.log('💥 Streaming notification loop STOPPED');
} catch (e) {
hasStreaming = false;
console.error(e);
diff --git a/src/components/compose.jsx b/src/components/compose.jsx
index 93dd027f0..49537832c 100644
--- a/src/components/compose.jsx
+++ b/src/components/compose.jsx
@@ -108,7 +108,7 @@ function countableText(inputText) {
// https://github.com/mastodon/mastodon/blob/c03bd2a238741a012aa4b98dc4902d6cf948ab63/app/models/account.rb#L69
const USERNAME_RE = /[a-z0-9_]+([a-z0-9_.-]+[a-z0-9_]+)?/i;
const MENTION_RE = new RegExp(
- `(^|[^=\\/\\w])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,
+ `(^|[^=\\/\\w.])(@${USERNAME_RE.source}(?:@[\\p{L}\\w.-]+[\\w]+)?)`,
'uig',
);
diff --git a/src/components/media.jsx b/src/components/media.jsx
index 52509532e..debb628a2 100644
--- a/src/components/media.jsx
+++ b/src/components/media.jsx
@@ -274,7 +274,7 @@ function Media({
}}
onError={(e) => {
const { src } = e.target;
- if (src === mediaURL) {
+ if (src === mediaURL && mediaURL !== remoteMediaURL) {
e.target.src = remoteMediaURL;
}
}}
@@ -307,7 +307,7 @@ function Media({
}}
onError={(e) => {
const { src } = e.target;
- if (src === mediaURL) {
+ if (src === mediaURL && mediaURL !== remoteMediaURL) {
e.target.src = remoteMediaURL;
}
}}
diff --git a/src/components/status.css b/src/components/status.css
index 88d884b1a..70355af40 100644
--- a/src/components/status.css
+++ b/src/components/status.css
@@ -688,6 +688,13 @@
margin-inline: -16px;
max-width: calc(100% + 16px + 16px) !important;
+ figure:before {
+ content: '';
+ display: block;
+ /* padding (16px) - gap (4px) */
+ flex-basis: calc(16px - 4px);
+ }
+
figure figcaption {
padding-inline: 16px !important;
}
@@ -712,8 +719,19 @@
/* height: 200px; */
max-height: max(200px, 40vh);
}
-.status.medium .content ~ * .media-container:is(.media-eq2, .media-gt2),
-.status.medium .content ~ .media-container:is(.media-eq2, .media-gt2) {
+.status.medium
+ .content
+ ~ *
+ .media-container:not(.status-card .media-container):is(
+ .media-eq2,
+ .media-gt2
+ ),
+.status.medium
+ .content
+ ~ .media-container:not(.status-card .media-container):is(
+ .media-eq2,
+ .media-gt2
+ ) {
/* 50px = avatar size */
margin-left: calc(-1 * ((50px / 2)));
/*
diff --git a/src/index.css b/src/index.css
index b6cdb5cdf..8fcbe4973 100644
--- a/src/index.css
+++ b/src/index.css
@@ -242,6 +242,15 @@ button,
:is(button, .button).plain4:not(:disabled, .disabled):is(:hover, :focus) {
color: var(--text-color);
}
+:is(button, .button).plain5 {
+ background-color: transparent;
+ color: var(--link-color);
+ text-decoration: underline;
+ text-decoration-color: var(--link-faded-color);
+}
+:is(button, .button).plain5:not(:disabled, .disabled):is(:hover, :focus) {
+ text-decoration: underline;
+}
:is(button, .button).light {
background-color: var(--bg-faded-color);
color: var(--text-color);
diff --git a/src/pages/following.jsx b/src/pages/following.jsx
index c0505fec3..be4090777 100644
--- a/src/pages/following.jsx
+++ b/src/pages/following.jsx
@@ -95,6 +95,7 @@ function Following({ title, path, id, ...props }) {
if (s) s._deleted = true;
}
}
+ console.log('💥 Streaming user loop STOPPED');
}
})();
return () => {
diff --git a/src/pages/login.css b/src/pages/login.css
index 16873c3b7..d142f67a7 100644
--- a/src/pages/login.css
+++ b/src/pages/login.css
@@ -30,7 +30,7 @@
#instances-suggestions {
margin: 0.2em 0 0;
- padding: 0;
+ padding: 0 0 0 1.2em;
list-style: none;
width: 90vw;
max-width: 40em;
diff --git a/src/pages/login.jsx b/src/pages/login.jsx
index ce5ec8c07..307fb1129 100644
--- a/src/pages/login.jsx
+++ b/src/pages/login.jsx
@@ -3,6 +3,8 @@ import './login.css';
import { useEffect, useRef, useState } from 'preact/hooks';
import { useSearchParams } from 'react-router-dom';
+import logo from '../assets/logo.svg';
+
import Link from '../components/link';
import Loader from '../components/loader';
import instancesListURL from '../data/instances.json?url';
@@ -42,6 +44,7 @@ function Login() {
// }, []);
const submitInstance = (instanceURL) => {
+ if (!instanceURL) return;
store.local.set('instanceURL', instanceURL);
(async () => {
@@ -72,23 +75,18 @@ function Login() {
})();
};
- const onSubmit = (e) => {
- e.preventDefault();
- const { elements } = e.target;
- let instanceURL = elements.instanceURL.value.toLowerCase();
- // Remove protocol from instance URL
- instanceURL = instanceURL.replace(/^https?:\/\//, '').replace(/\/+$/, '');
- // Remove @acct@ or acct@ from instance URL
- instanceURL = instanceURL.replace(/^@?[^@]+@/, '');
- if (!/\./.test(instanceURL)) {
- instanceURL = instancesList.find((instance) =>
- instance.includes(instanceURL),
- );
- }
- submitInstance(instanceURL);
- };
+ const cleanInstanceText = instanceText
+ ? instanceText
+ .replace(/^https?:\/\//, '') // Remove protocol from instance URL
+ .replace(/\/+$/, '') // Remove trailing slash
+ .replace(/^@?[^@]+@/, '') // Remove @?acct@
+ .trim()
+ : null;
+ const instanceTextLooksLikeDomain =
+ /[^\s\r\n\t\/\\]+\.[^\s\r\n\t\/\\]+/.test(cleanInstanceText) &&
+ !/[\s\/\\@]/.test(cleanInstanceText);
- const instancesSuggestions = instanceText
+ const instancesSuggestions = cleanInstanceText
? instancesList
.filter((instance) => instance.includes(instanceText))
.sort((a, b) => {
@@ -106,10 +104,39 @@ function Login() {
.slice(0, 10)
: [];
+ const selectedInstanceText = instanceTextLooksLikeDomain
+ ? cleanInstanceText
+ : instancesSuggestions?.length
+ ? instancesSuggestions[0]
+ : instanceText
+ ? instancesList.find((instance) => instance.includes(instanceText))
+ : null;
+
+ const onSubmit = (e) => {
+ e.preventDefault();
+ // const { elements } = e.target;
+ // let instanceURL = elements.instanceURL.value.toLowerCase();
+ // // Remove protocol from instance URL
+ // instanceURL = instanceURL.replace(/^https?:\/\//, '').replace(/\/+$/, '');
+ // // Remove @acct@ or acct@ from instance URL
+ // instanceURL = instanceURL.replace(/^@?[^@]+@/, '');
+ // if (!/\./.test(instanceURL)) {
+ // instanceURL = instancesList.find((instance) =>
+ // instance.includes(instanceURL),
+ // );
+ // }
+ // submitInstance(instanceURL);
+ submitInstance(selectedInstanceText);
+ };
+
return (
A minimalistic opinionated Mastodon web client.
++ + Log in with Mastodon + +
+
+
+ Connect your existing Mastodon/Fediverse account.
+
+ Your credentials are not stored on this server.
+
+
- - - - Log in - - - + + Built + {' '} + by{' '} + { + e.preventDefault(); + states.showAccount = 'cheeaun@mastodon.social'; + }} + > + @cheeaun + + .{' '} + + Privacy Policy + + .
-A minimalistic opinionated Mastodon web client.