Commit Graph

54 Commits

Author SHA1 Message Date
Nolan Lawson 648d9a3cf6
fix: tweak underlining of links (#920) 2019-01-26 13:50:45 -08:00
Nolan Lawson 109022fab9
feat: add option to underline links in toot text (#919)
* feat: add option to underline links in toot text

* change text
2019-01-26 12:58:11 -08:00
Nolan Lawson 0b1efab0c1
fix: fix "copy link" on iOS (#918)
* fix: fix "copy link" on iOS

fixes #912

* fix lint
2019-01-26 12:05:14 -08:00
Stephane Zermatten 2656e11bb0 fix: Follow-up for pull request #870 (#910)
* Cache main-nav in scrollIntoView.js.

This change avoids continuously calling document.getElementById for the
same element.

* Fix firstVisibleElementIndex to always return a dictionary.

Before this change, firstVisibleElementIndex would return -1 if it
doesn't find anything. This made no sense since this function returns a
dictionary on success.

With this change, the function always returns a dictionary with the
expected keys.

* lint fix
2019-01-26 10:14:27 -08:00
Nolan Lawson d976b621b8
chore: move inline-script to src (#917) 2019-01-26 10:14:15 -08:00
Nolan Lawson eb5437e32a
fix: increase custom scrollbar width (#914) 2019-01-26 09:34:16 -08:00
Nolan Lawson 74ab056f18
fix: fix notification m/p keyboard shortcuts (#907)
fixes #905
2019-01-19 23:52:39 -08:00
Nolan Lawson 45d70e8e6b
feat: add more keyboard shortcuts (#904)
* feat: add more keyboard shortcuts

largely fixes #895

* oops wrong test name
2019-01-19 16:40:31 -08:00
Nolan Lawson b014778761
fix: fix keyboard shortcuts in notifications (#903)
fixes #894
2019-01-19 16:04:06 -08:00
Nolan Lawson 031caec406
fix: fix Alt key in keyboard shortcuts (#902)
fixes #896
2019-01-19 15:50:39 -08:00
Nolan Lawson 4a8f65b7fc
chore: refactor src files to src/ directory (#900) 2019-01-19 13:32:36 -08:00
Nolan Lawson cb58a49c04
fix: use more consistent method for checking external links (#893) 2019-01-13 17:11:27 -08:00
Will Pearson cb35a088f4 Make external links open in new tab (#892) 2019-01-13 16:05:41 -08:00
Nolan Lawson ef44c19e8a
feat: date title shows absolute date (#890)
fixes #759
2019-01-13 15:56:39 -08:00
Nolan Lawson 8f84ae5a51
feat: add setting to disable hotkeys (#889) 2019-01-13 14:02:15 -08:00
Nolan Lawson 4a6f7b74a4
feat: 1-6 hotkeys switch columns (#888) 2019-01-13 14:02:08 -08:00
Nolan Lawson 6d1bb64bbb
fix: fix question mark hotkey (#887)
* fix: fix question mark hotkey

* fix tests
2019-01-13 14:02:01 -08:00
Nolan Lawson 29a2892dd0
feat: add hotkey help to settings (#886) 2019-01-13 11:35:04 -08:00
Will Pearson aa69e651ac feat: wrap long posts with spoilers (#873)
* Wrap LONG posts with spoilers

Some ActivityPub software facilitates long form blog posts being pushed
out onto timelines.
Some ActivityPub software have toot lengths which are much larger than
Mastodon's default of 500.

This wraps spoiler tags around those statuses.

* fix lint, extract consts

* extract consts to separate file

* fix test hopefully

* Revert "fix test hopefully"

This reverts commit 7d8e2671ad158b317f6f75a7dd5dacac9e12cf80.

* Fix failing test

* Revert "Fix failing test"

This reverts commit 15b06e11589b49979ca5eb85b7fe5c7510a62ba7.

* Revert "Revert "fix test hopefully""

This reverts commit d3776bc9d64dcfd209a307a0639d33cbe6ca3884.

* measure text after shortening URLs
2019-01-13 10:47:07 -08:00
Stephane Zermatten c2bd2f306a feat: Add support for keyboard shortcuts (#870)
* Add support for keyboard shortcuts.

This change introduces a Shortcut component for defining global
keyboard shortcuts from whichever component makes more sense.

This change also adds an initial set of navigation shortcuts:
- Backspace to leave a modal dialog or to go back
- g t to go to the federated timeline
- g f to go to the favorite page
- g h to go to the home page
- g n to go to the notification page
- g c to go to the community page
- s to go to the search page

These shortcuts are loaded asynchronously from _layout.html

In modal dialogs, shortcuts are also modal, to avoid strange or
overly complex behavior. This is implemented by grouping
shortcuts into scopes, and activating a separate 'modal' scope
when entering a modal dialog, so a separate set of shortcuts can
be enabled in modal dialog. Modal dialogs can be exited by
pressing 'Backspace'.

* Navigate up/down lists using keyboard shortcuts.

This change introduces keyboard shortcuts for navigating in lists and
virtual lists. j or arrow up selects the next element, k or arrow down,
the previous element. Selecting an element scrolls the list up and down,
as necessary.

This change also allows directing keyboard shortcuts to the active
element and defines the following shortcuts, for the active status:
- f to favorite or unfavorite it
- b to boost or unboost it
- r to reply to it
- o to open its thread
- x to toggle the display of a CW
- y to toggle the display of sensitive medias

This works by defining a keyboard shortcut scope for each list element.
A new component, ScrollListShortcuts, keeps track of the active element,
based on list or virtual list elements and redirects shortcuts to the
active element's scope. ScrollListShortcuts keeps the active element in
the current realm of the store, so the active element is restored when
going back to the list.

* Typing h or ? displays the list of available keyboard shortcuts.

This change introduces a new modal dialog that documents the list of
available shortcuts.
2019-01-13 10:03:29 -08:00
Nathan Minchow d7aaec16d3 feat: Add labels to theme groups (#867) 2019-01-12 09:50:17 -08:00
Nolan Lawson e5ef4b9bb1
fix: add better browser notification badges (#857)
* fix: add better browser notification badges

* fix test

* fix tests for real

* actually fix tests
2018-12-30 14:51:03 -08:00
Nolan Lawson e666eb5955
perf: use lodash-lite for some functions (#853) 2018-12-23 10:10:16 -08:00
Nolan Lawson cf94e7d61e
fix: fix unnecessary request for theme-undefined.css (#852) 2018-12-22 15:37:56 -08:00
Nolan Lawson 4ab9687200
perf: load Toast asynchronously (#851) 2018-12-22 15:37:51 -08:00
Nolan Lawson 27da387a01
fix: preserve newlines correctly in delete-and-redraft (#845)
fixes #830
2018-12-19 00:57:56 -08:00
Nolan Lawson d047a265a3
fix(picker): only focus picker search on desktop (#843)
* fix(picker): only focus picker search on desktop

* detect using touch detection instead
2018-12-18 20:01:53 -08:00
Nolan Lawson 7596d905ab
fix(emoji): make emoji picker more like Mastodon's (#842) 2018-12-18 18:24:05 -08:00
Nolan Lawson cd44e33a7e
perf: reduce size of emoji-mart dep using fork (#841) 2018-12-18 14:40:14 -08:00
Nolan Lawson e6ca246527
fix: use emoji-mart all.json, split out json (#839) 2018-12-18 12:45:49 -08:00
Nolan Lawson 2d32a91145
fix: fix appearance of native emoji on linux (#838) 2018-12-18 12:45:41 -08:00
Nolan Lawson 098a20db49
feat: add full emoji picker using emoji-mart (#836)
* feat: add full emoji picker using emoji-mart

Fixes #4

* use a sailboat as the default emoji in the emoji picker

* fix tests

* fix lint
2018-12-18 00:43:51 -08:00
Nolan Lawson bb7fe6e30a
chore: make build process faster/simpler (#833)
This gets rid of the awkward checking-in of `template.html` to git (when
it's a built file) and also makes the rebuilds faster and more
consistent by running everything through the same pipeline. So inline
CSS, SVG, and JS are all partially built on-the-fly.

I've basically reinvented gulp, but it's pretty lightweight and
zero-dep, so I'm happy with it.
2018-12-17 17:21:29 -08:00
Carlos Fernández 669be2e32b Fix Pleroma compability issue (#829)
* Now image and video modals width and height will fallback to "auto" instead of 300x200. Allows proper image visualization in modals when there's no attachment metadata.

* Move background-image in gifv modal to the computed property videoStyle

fixes #750
2018-12-17 13:13:27 -08:00
Nolan Lawson 4ca5b4611f
fix: use correct this.store format in all components (#827) 2018-12-17 11:28:31 -08:00
Nolan Lawson bf9ba22c35
fix: fix logging in and out with a refresh (#824)
* fix: fix logging in and out with a refresh

fixes #805

* simplify code

* make test less flaky

* fix dumb mistake
2018-12-16 12:39:16 -08:00
Nolan Lawson 14a618f374
perf: lazy-load logged-in observers, fix circular dependencies (#823)
* perf: lazy-load logged-in observers, fix circular dependencies

* I guess async deps don't count as circular deps
2018-12-16 10:22:34 -08:00
Nolan Lawson beb4d6e119
perf: avoid caching robots.txt in service worker (#820) 2018-12-16 09:35:02 -08:00
Nolan Lawson 3ae532aee5
fix: fix NODE_ENV and webpack config (#818) 2018-12-15 19:21:20 -08:00
Nolan Lawson f2f5508144
perf: only run getSelection() check if we have to (#817) 2018-12-15 19:21:14 -08:00
Nolan Lawson 260f6acf0e
perf: download and cache polyfills on-the-fly (#814)
* perf: download and cache polyfills on-the-fly

* fixup the localhost switch for service worker, does nothing
2018-12-15 17:13:46 -08:00
Nolan Lawson dbd6c35a88
perf: move indexeddb operations to async module (#813) 2018-12-15 17:13:40 -08:00
Nolan Lawson 89566cacaa
perf: do prefetch to other instance to load it faster (#811) 2018-12-15 17:13:34 -08:00
Nolan Lawson 7ddfe3830a
feat: add drag and drop for media uploads (#809)
* feat: add drag and drop for media uploads

fixes #65

* tweak colors
2018-12-15 02:06:12 -08:00
Nolan Lawson c90ad17686
fix: logging out results in visible homescreen (#807)
* fix: logging out results in visible homescreen

fixes #805

* fixup
2018-12-14 00:25:12 -08:00
Nolan Lawson d5c0268ef2
fix: move page-lifecycle and idb-getall-shim to dynamic modules (#804)
This would help with Rollup compat if we ever decided to switch to
Rollup
2018-12-13 22:55:04 -08:00
Nolan Lawson 5e089ba27d
fix: fix sensitive content warning on mobile (#794) 2018-12-13 00:39:38 -08:00
Nolan Lawson 1940260631
fix: fix delete and redraft on replies (#789)
fixes #786
2018-12-12 23:45:52 -08:00
sgenoud 30705da19d fix: Change the size of sensitive media box (#784)
It is now slightly bigger than what images in a box would look
like.

fixes #771
2018-12-12 23:44:29 -08:00
Nolan Lawson 76a8072e04
fix: show warning when local storage is unavailable (#782)
fixes #780
2018-12-11 22:07:01 -08:00