Merge pull request #34 from cheeaun/main

Update from main
This commit is contained in:
Chee Aun 2022-12-27 09:57:15 +08:00 committed by GitHub
commit b0e118fcab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 12 deletions

View file

@ -45,5 +45,9 @@
"postcss-dark-theme-class": {}, "postcss-dark-theme-class": {},
"autoprefixer": {} "autoprefixer": {}
} }
} },
"browserslist": [
"defaults",
"android >= 4"
]
} }

View file

@ -243,7 +243,7 @@ export function App() {
const mastoAccount = await masto.v1.accounts.verifyCredentials(); const mastoAccount = await masto.v1.accounts.verifyCredentials();
console.log({ tokenJSON, mastoAccount }); // console.log({ tokenJSON, mastoAccount });
let account = accounts.find((a) => a.info.id === mastoAccount.id); let account = accounts.find((a) => a.info.id === mastoAccount.id);
if (account) { if (account) {

View file

@ -67,8 +67,11 @@ function Compose({
console.log(config); console.log(config);
return config; return config;
} catch (e) { } catch (e) {
alert('Failed to load instance configuration. Please try again.');
console.error(e); console.error(e);
alert('Failed to load instance configuration. Please try again.');
// Temporary fix for corrupted data
store.local.del('instances');
location.reload();
return {}; return {};
} }
}, []); }, []);

View file

@ -3,18 +3,10 @@
width: 16px; width: 16px;
height: 16px; height: 16px;
pointer-events: none; pointer-events: none;
animation: slow-appear 0.3s ease-in-out 1s both; animation: appear 0.3s ease-in-out 1s both;
vertical-align: middle; vertical-align: middle;
margin: 8px; margin: 8px;
} }
@keyframes slow-appear {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
.loader-container.abrupt { .loader-container.abrupt {
animation: none; animation: none;
} }

View file

@ -10,6 +10,7 @@
align-items: center; align-items: center;
background-color: var(--backdrop-color); background-color: var(--backdrop-color);
backdrop-filter: blur(24px); backdrop-filter: blur(24px);
animation: appear 0.5s var(--timing-function) both;
} }
#modal-container > .light { #modal-container > .light {

View file

@ -267,6 +267,15 @@ code {
/* KEYFRAMES */ /* KEYFRAMES */
@keyframes appear {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes fade-in { @keyframes fade-in {
from { from {
opacity: 0; opacity: 0;

View file

@ -36,6 +36,7 @@ function StatusPage({ id }) {
useEffect(() => { useEffect(() => {
const onScroll = debounce(() => { const onScroll = debounce(() => {
// console.log('onScroll'); // console.log('onScroll');
if (!scrollableRef.current) return;
const { scrollTop } = scrollableRef.current; const { scrollTop } = scrollableRef.current;
states.scrollPositions.set(id, scrollTop); states.scrollPositions.set(id, scrollTop);
}, 100); }, 100);