Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update from main #956

Merged
merged 26 commits into from
Dec 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
817795c
i18n updates (it-IT) (#950)
cheeaun Nov 22, 2024
d148449
Update README.md
github-actions[bot] Nov 24, 2024
ba4c41c
i18n updates (es-ES) (#951)
cheeaun Nov 24, 2024
1c87e64
i18n updates (fr-FR) (#952)
cheeaun Nov 24, 2024
b51a3b5
i18n updates (gl-ES) (#955)
cheeaun Nov 27, 2024
8416362
Fix disconnected lines
cheeaun Nov 27, 2024
b6d1522
Fix clicking outside button also trigger the menu
cheeaun Nov 27, 2024
28bdd9a
Adjustments to composer footer buttons
cheeaun Nov 27, 2024
bbf30c6
Locale changes
cheeaun Nov 27, 2024
8e12d89
Maybe need type="button" lol
cheeaun Nov 27, 2024
09080a3
i18n updates (ar-SA,ca-ES,cs-CZ,de-DE,eo-UY,es-ES,eu-ES,fa-IR,fi-FI,f…
cheeaun Nov 27, 2024
264ca66
Make sure the language text not truncated too much
cheeaun Nov 27, 2024
9b0378b
i18n updates (eo-UY,es-ES,fi-FI,gl-ES,lt-LT,pt-BR,pt-PT,ru-RU,zh-CN) …
cheeaun Nov 28, 2024
ab6a977
Update README.md
github-actions[bot] Dec 1, 2024
4270304
Super MVP-ish annual report page
cheeaun Dec 3, 2024
fcc0c71
i18n updates (ca-ES,es-ES,fa-IR,lt-LT,pt-BR,pt-PT,th-TH,uk-UA) (#961)
cheeaun Dec 3, 2024
4c0bfc3
i18n updates (eo-UY,es-ES,eu-ES,fi-FI,lt-LT,pt-BR,pt-PT) (#964)
cheeaun Dec 3, 2024
e652ce8
Include Prettier & format everything properly
cheeaun Dec 4, 2024
265df62
i18n updates (gl-ES,ru-RU) (#967)
cheeaun Dec 4, 2024
507999c
i18n updates (ca-ES,es-ES) (#968)
cheeaun Dec 5, 2024
4e1572f
Show annual report notification sticky to top
cheeaun Dec 6, 2024
2304b05
More formatting for annual report
cheeaun Dec 6, 2024
b0908fd
i18n updates (eo-UY) (#969)
cheeaun Dec 6, 2024
25219b6
Added phanpy.linuxusers.in to community deployments
dhrm1k Dec 6, 2024
a534005
i18n updates (es-ES) (#972)
cheeaun Dec 6, 2024
7f947a0
Merge pull request #970 from dhrm1k/main
cheeaun Dec 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ These are self-hosted by other wonderful folks.
- [phanpy.tilde.zone](https://phanpy.tilde.zone) by [@[email protected]](https://tilde.zone/@ben)
- [phanpy.vmst.io](https://phanpy.vmst.io/) by [@[email protected]](https://vmst.io/@vmstan)
- [social.qrk.one](https://social.qrk.one) by [@[email protected]](https://fosstodon.org/@kev)
- [phanpy.linuxusers.in](https://phanpy.linuxusers.in) by [@[email protected]](https://linuxusers.in/dharmik)

> Note: Add yours by creating a pull request.

Expand Down Expand Up @@ -324,12 +325,14 @@ Costs involved in running and developing this web app:
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/16529521/medium/ae6add93a901b0fefa2d9b1077920d73.png" alt="" width="16" height="16" /> llun (Thai)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/16291756/medium/c008af10bc117fa9c9dcb70f2b291ee6.jpg" alt="" width="16" height="16" /> lucasofchirst (Occitan, Portuguese, Portuguese, Brazilian)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/16640089/medium/4b7d8d275d7a7bff564adde51e09b473_default.png" alt="" width="16" height="16" /> LukeHong (Chinese Traditional)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/12822971/medium/4ecbe6d1248536084902925beb0b63e4.png" alt="" width="16" height="16" /> Mannivu (Italian)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/16537713/medium/825f0bf1a14fc545a76891a52839d86e_default.png" alt="" width="16" height="16" /> marcin.kozinski (Polish)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/13521465/medium/76cb9aa6b753ce900a70478bff7fcea0.png" alt="" width="16" height="16" /> mkljczkk (Polish)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/12882812/medium/77744d8db46e9a3e09030e1a02b7a572.jpeg" alt="" width="16" height="16" /> mojosoeun (Korean)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/13613969/medium/c7834ddc0ada84a79671697a944bb274.png" alt="" width="16" height="16" /> moreal (Korean)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/14158861/medium/ba1ff31dc5743b067ea6685f735229a5_default.png" alt="" width="16" height="16" /> MrWillCom (Chinese Simplified)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/15652333/medium/7f36f289f9e2fe41d89ad534a1047f0e.png" alt="" width="16" height="16" /> nclm (French)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/15000639/medium/ebbf0bb7d5027a1903d11b7f5f34f65b.jpeg" alt="" width="16" height="16" /> nycterent (Lithuanian)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/16539461/medium/2f41b9f0b802c1d200a6ab62167a7229_default.png" alt="" width="16" height="16" /> pazpi (Italian)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/13954917/medium/56a2cba267eb1b5d122bf62ddc0dd732_default.png" alt="" width="16" height="16" /> PPNplus (Thai)
- <img src="https://crowdin-static.downloads.crowdin.com/avatar/15106977/medium/54bf93b19af8bbfdee579ea51685bafa.jpeg" alt="" width="16" height="16" /> punkrockgirl (Basque)
Expand Down
13 changes: 6 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"postcss": "~8.4.49",
"postcss-dark-theme-class": "~1.3.0",
"postcss-preset-env": "~10.1.1",
"prettier": "3.4.1",
"sonda": "~0.6.1",
"twitter-text": "~3.1.0",
"vite": "~5.4.11",
Expand Down
67 changes: 36 additions & 31 deletions src/app.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import SearchCommand from './components/search-command';
import Shortcuts from './components/shortcuts';
import NotFound from './pages/404';
import AccountStatuses from './pages/account-statuses';
import AnnualReport from './pages/annual-report';
import Bookmarks from './pages/bookmarks';
import Catchup from './pages/catchup';
import Favourites from './pages/favourites';
Expand Down Expand Up @@ -98,39 +99,42 @@ window.__STATES_STATS__ = () => {
// Experimental "garbage collection" for states
// Every 15 minutes
// Only posts for now
setInterval(() => {
if (!window.__IDLE__) return;
const { statuses, unfurledLinks, notifications } = states;
let keysCount = 0;
const { instance } = api();
for (const key in statuses) {
if (!window.__IDLE__) break;
try {
const $post = document.querySelector(
`[data-state-post-id~="${key}"], [data-state-post-ids~="${key}"]`,
);
const postInNotifications = notifications.some(
(n) => key === statusKey(n.status?.id, instance),
);
if (!$post && !postInNotifications) {
delete states.statuses[key];
delete states.statusQuotes[key];
for (const link in unfurledLinks) {
const unfurled = unfurledLinks[link];
const sKey = statusKey(unfurled.id, unfurled.instance);
if (sKey === key) {
delete states.unfurledLinks[link];
break;
setInterval(
() => {
if (!window.__IDLE__) return;
const { statuses, unfurledLinks, notifications } = states;
let keysCount = 0;
const { instance } = api();
for (const key in statuses) {
if (!window.__IDLE__) break;
try {
const $post = document.querySelector(
`[data-state-post-id~="${key}"], [data-state-post-ids~="${key}"]`,
);
const postInNotifications = notifications.some(
(n) => key === statusKey(n.status?.id, instance),
);
if (!$post && !postInNotifications) {
delete states.statuses[key];
delete states.statusQuotes[key];
for (const link in unfurledLinks) {
const unfurled = unfurledLinks[link];
const sKey = statusKey(unfurled.id, unfurled.instance);
if (sKey === key) {
delete states.unfurledLinks[link];
break;
}
}
keysCount++;
}
keysCount++;
}
} catch (e) {}
}
if (keysCount) {
console.info(`GC: Removed ${keysCount} keys`);
}
}, 15 * 60 * 1000);
} catch (e) {}
}
if (keysCount) {
console.info(`GC: Removed ${keysCount} keys`);
}
},
15 * 60 * 1000,
);

// Preload icons
// There's probably a better way to do this
Expand Down Expand Up @@ -546,6 +550,7 @@ function SecondaryRoutes({ isLoggedIn }) {
<Route path="/fh" element={<FollowedHashtags />} />
<Route path="/ft" element={<Filters />} />
<Route path="/catchup" element={<Catchup />} />
<Route path="/annual_report/:year" element={<AnnualReport />} />
</>
)}
<Route path="/:instance?/t/:hashtag" element={<Hashtag />} />
Expand Down
1 change: 1 addition & 0 deletions src/components/ICONS.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,4 +174,5 @@ export const ICONS = {
'heart-break': () => import('@iconify-icons/mingcute/heart-crack-line'),
'user-x': () => import('@iconify-icons/mingcute/user-x-line'),
minimize: () => import('@iconify-icons/mingcute/arrows-down-line'),
celebrate: () => import('@iconify-icons/mingcute/celebrate-line'),
};
141 changes: 130 additions & 11 deletions src/components/compose.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@
justify-content: space-between;
gap: 8px;
align-items: center;
padding: 16px;
padding: 8px;
position: sticky;
top: 0;
z-index: 100;
white-space: nowrap;

@media (min-width: 480px) {
padding: 16px;
}
}
#compose-container .compose-top .account-block {
text-align: start;
Expand Down Expand Up @@ -110,17 +114,21 @@
}

#compose-container form {
--form-padding-inline: 8px;
--form-padding-block: 0;
--form-spacing-inline: 4px;
--form-spacing-block: 0;
/* border-radius: 16px; */
padding: var(--form-padding-block) var(--form-padding-inline);
padding: var(--form-spacing-block) var(--form-spacing-inline);
background-color: var(--bg-blur-color);
/* background-image: linear-gradient(var(--bg-color) 85%, transparent); */
position: relative;
z-index: 2;
--drop-shadow: 0 3px 6px -3px var(--drop-shadow-color);
box-shadow: var(--drop-shadow);

@media (min-width: 480px) {
--form-spacing-inline: 8px;
}

@media (min-width: 40em) {
border-radius: 16px;
}
Expand Down Expand Up @@ -153,8 +161,8 @@
display: flex;
justify-content: space-between;
align-items: center;
padding: 8px 0;
gap: 8px;
padding: var(--form-spacing-inline) 0;
gap: var(--form-spacing-inline);
}
#compose-container .toolbar.wrap {
flex-wrap: wrap;
Expand All @@ -181,6 +189,11 @@
white-space: nowrap;
border: 2px solid transparent;
vertical-align: middle;

&.active {
filter: brightness(0.8);
background-color: var(--bg-color);
}
}
#compose-container .toolbar-button > * {
vertical-align: middle;
Expand Down Expand Up @@ -246,6 +259,39 @@
text-overflow: ellipsis;
overflow: hidden;
max-width: 100%;
min-width: 4ch;
}

#compose-container .compose-footer {
.add-toolbar-button-group {
display: flex;
overflow: auto;
}
.add-sub-toolbar-button-group {
flex-grow: 1;
display: flex;
overflow: auto;
transition: 0.5s ease-in-out;
transition-property: opacity, width;
scrollbar-width: none;
padding-inline-end: 16px;
mask-image: linear-gradient(
var(--to-backward),
transparent 0,
black 16px,
black 100%
);

&::-webkit-scrollbar {
display: none;
}

&[hidden] {
opacity: 0;
pointer-events: none;
width: 0;
}
}
}

#compose-container text-expander {
Expand Down Expand Up @@ -516,6 +562,37 @@
color: var(--red-color);
}

.compose-menu-add-media {
position: relative;

.compose-menu-add-media-field {
position: absolute;
inset: 0;
opacity: 0;
cursor: inherit;
}
}

.icon-gif {
display: inline-block !important;
min-width: 16px;
height: 16px;
font-size: 10px !important;
letter-spacing: -0.5px;
font-size-adjust: none;
overflow: hidden;
white-space: nowrap;
text-align: center;
line-height: 16px;
font-weight: bold;
text-rendering: optimizeSpeed;

&:after {
display: block;
content: 'GIF';
}
}

@media (display-mode: standalone) {
/* No popping in standalone mode */
#compose-container .pop-button {
Expand All @@ -525,8 +602,10 @@

#compose-container button[type='submit'] {
border-radius: 8px;

@media (min-width: 480px) {
padding-inline: 24px;
font-size: 125%;
}
}

Expand Down Expand Up @@ -820,8 +899,8 @@
.compose-field-container {
display: grid !important;

@media (width < 30em) {
margin-inline: calc(-1 * var(--form-padding-inline));
@media (width < 480px) {
margin-inline: calc(-1 * var(--form-spacing-inline));
width: 100vw !important;
max-width: 100vw;

Expand Down Expand Up @@ -929,15 +1008,55 @@
}
}

@keyframes jump-scare {
from {
opacity: 0.5;
transform: scale(0.25) translateX(80px);
}
to {
opacity: 1;
transform: scale(1) translateX(0);
}
}
@keyframes jump-scare-rtl {
from {
opacity: 0.5;
transform: scale(0.25) translateX(-80px);
}
to {
opacity: 1;
transform: scale(1) translateX(0);
}
}

.add-button {
transform-origin: var(--forward) center;
background-color: var(--bg-blur-color) !important;
animation: jump-scare 0.2s ease-in-out both;
:dir(rtl) & {
animation-name: jump-scare-rtl;
}

.icon {
transition: transform 0.3s ease-in-out;
}
&.active {
.icon {
transform: rotate(135deg);
}
}
}

.gif-picker-button {
span {
/* span {
font-weight: bold;
font-size: 11.5px;
display: block;
}
line-height: 1;
} */

&:is(:hover, :focus) {
span {
.icon {
animation: gif-shake 0.3s 3;
}
}
Expand Down
Loading
Loading