pull/248/head
Lim Chee Aun 2023-10-03 15:07:47 +08:00
rodzic c335655896
commit 4436c337dd
13 zmienionych plików z 25 dodań i 32 usunięć

Wyświetl plik

@ -8,6 +8,7 @@
"index.css$", "index.css$",
".css$", ".css$",
"<THIRD_PARTY_MODULES>", "<THIRD_PARTY_MODULES>",
"/assets/",
"^../", "^../",
"^[./]" "^[./]"
], ],

Wyświetl plik

@ -3,7 +3,6 @@ import './account-block.css';
// import { useNavigate } from 'react-router-dom'; // import { useNavigate } from 'react-router-dom';
import enhanceContent from '../utils/enhance-content'; import enhanceContent from '../utils/enhance-content';
import niceDateTime from '../utils/nice-date-time'; import niceDateTime from '../utils/nice-date-time';
import shortenNumber from '../utils/shorten-number';
import states from '../utils/states'; import states from '../utils/states';
import Avatar from './avatar'; import Avatar from './avatar';

Wyświetl plik

@ -1,11 +1,6 @@
import './nav-menu.css'; import './nav-menu.css';
import { import { ControlledMenu, MenuDivider, MenuItem } from '@szhsin/react-menu';
ControlledMenu,
Menu,
MenuDivider,
MenuItem,
} from '@szhsin/react-menu';
import { useEffect, useRef, useState } from 'preact/hooks'; import { useEffect, useRef, useState } from 'preact/hooks';
import { useLongPress } from 'use-long-press'; import { useLongPress } from 'use-long-press';
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';

Wyświetl plik

@ -11,6 +11,7 @@ import { useSnapshot } from 'valtio';
import floatingButtonUrl from '../assets/floating-button.svg'; import floatingButtonUrl from '../assets/floating-button.svg';
import multiColumnUrl from '../assets/multi-column.svg'; import multiColumnUrl from '../assets/multi-column.svg';
import tabMenuBarUrl from '../assets/tab-menu-bar.svg'; import tabMenuBarUrl from '../assets/tab-menu-bar.svg';
import { api } from '../utils/api'; import { api } from '../utils/api';
import showToast from '../utils/show-toast'; import showToast from '../utils/show-toast';
import states from '../utils/states'; import states from '../utils/states';

Wyświetl plik

@ -14,7 +14,6 @@ import useScroll from '../utils/useScroll';
import Icon from './icon'; import Icon from './icon';
import Link from './link'; import Link from './link';
import Loader from './loader';
import NavMenu from './nav-menu'; import NavMenu from './nav-menu';
import Status from './status'; import Status from './status';

Wyświetl plik

@ -1,4 +1,4 @@
import { Menu, MenuItem } from '@szhsin/react-menu'; import { MenuItem } from '@szhsin/react-menu';
import { useEffect, useMemo, useRef, useState } from 'preact/hooks'; import { useEffect, useMemo, useRef, useState } from 'preact/hooks';
import { useParams, useSearchParams } from 'react-router-dom'; import { useParams, useSearchParams } from 'react-router-dom';
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';

Wyświetl plik

@ -1,6 +1,5 @@
import { import {
FocusableItem, FocusableItem,
Menu,
MenuDivider, MenuDivider,
MenuGroup, MenuGroup,
MenuItem, MenuItem,

Wyświetl plik

@ -13,7 +13,6 @@ import Notification from '../components/notification';
import { api } from '../utils/api'; import { api } from '../utils/api';
import db from '../utils/db'; import db from '../utils/db';
import groupNotifications from '../utils/group-notifications'; import groupNotifications from '../utils/group-notifications';
import openCompose from '../utils/open-compose';
import states, { saveStatus } from '../utils/states'; import states, { saveStatus } from '../utils/states';
import { getCurrentAccountNS } from '../utils/store-utils'; import { getCurrentAccountNS } from '../utils/store-utils';
@ -49,24 +48,6 @@ function Home() {
headerEnd={<NotificationsLink />} headerEnd={<NotificationsLink />}
/> />
)} )}
{/* <button
// hidden={scrollDirection === 'end' && !nearReachStart}
type="button"
id="compose-button"
onClick={(e) => {
if (e.shiftKey) {
const newWin = openCompose();
if (!newWin) {
alert('Looks like your browser is blocking popups.');
states.showCompose = true;
}
} else {
states.showCompose = true;
}
}}
>
<Icon icon="quill" size="xl" alt="Compose" />
</button> */}
</> </>
); );
} }

Wyświetl plik

@ -4,6 +4,7 @@ import { useEffect, useRef, useState } from 'preact/hooks';
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
import Icon from '../components/icon'; import Icon from '../components/icon';
import Link from '../components/link'; import Link from '../components/link';
import RelativeTime from '../components/relative-time'; import RelativeTime from '../components/relative-time';
@ -481,6 +482,22 @@ function Settings({ onClose }) {
</div> </div>
</div> </div>
<p> <p>
<a
href="https://github.com/sponsors/cheeaun"
target="_blank"
rel="noopener noreferrer"
>
Sponsor
</a>{' '}
&middot;{' '}
<a
href="https://www.buymeacoffee.com/cheeaun"
target="_blank"
rel="noopener noreferrer"
>
Donate
</a>{' '}
&middot;{' '}
<a <a
href="https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD" href="https://github.com/cheeaun/phanpy/blob/main/PRIVACY.MD"
target="_blank" target="_blank"

Wyświetl plik

@ -14,7 +14,7 @@ import {
} from 'preact/hooks'; } from 'preact/hooks';
import { useHotkeys } from 'react-hotkeys-hook'; import { useHotkeys } from 'react-hotkeys-hook';
import { InView } from 'react-intersection-observer'; import { InView } from 'react-intersection-observer';
import { matchPath, useParams, useSearchParams } from 'react-router-dom'; import { matchPath, useSearchParams } from 'react-router-dom';
import { useDebouncedCallback } from 'use-debounce'; import { useDebouncedCallback } from 'use-debounce';
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';

Wyświetl plik

@ -1,4 +1,4 @@
import { Menu, MenuItem } from '@szhsin/react-menu'; import { MenuItem } from '@szhsin/react-menu';
import { useMemo, useRef, useState } from 'preact/hooks'; import { useMemo, useRef, useState } from 'preact/hooks';
import { useNavigate, useParams } from 'react-router-dom'; import { useNavigate, useParams } from 'react-router-dom';
import { useSnapshot } from 'valtio'; import { useSnapshot } from 'valtio';

Wyświetl plik

@ -7,6 +7,7 @@ import multiHashtagTimelineUrl from '../assets/features/multi-hashtag-timeline.j
import nestedCommentsThreadUrl from '../assets/features/nested-comments-thread.jpg'; import nestedCommentsThreadUrl from '../assets/features/nested-comments-thread.jpg';
import logoText from '../assets/logo-text.svg'; import logoText from '../assets/logo-text.svg';
import logo from '../assets/logo.svg'; import logo from '../assets/logo.svg';
import Link from '../components/link'; import Link from '../components/link';
import states from '../utils/states'; import states from '../utils/states';
import useTitle from '../utils/useTitle'; import useTitle from '../utils/useTitle';

Wyświetl plik

@ -166,7 +166,7 @@ export function api({ instance, accessToken, accountID, account } = {}) {
instance, instance,
}; };
} else { } else {
throw new Error(`Access token ${accessToken} not found`); throw new Error(`Access token not found`);
} }
} }
} }