Commit graph

790 commits

Author SHA1 Message Date
MeiMei
c05723ca6a
Fix IP address rate limit (#8758)
* Fix IP address rate limit

* CHANGELOG

* Tune getIpHash
2022-05-31 17:44:22 +09:00
tamaina
857055a9dd chore: fix import tinycolor 2022-05-30 12:09:22 +00:00
tamaina
465531d56c Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop 2022-05-30 05:53:40 +00:00
tamaina
9759ca7d24 chore: remove packages/sw/webpack.config.js 2022-05-30 05:53:36 +00:00
3905185463
fix(client): import shared ESLint config in client package (#8761) 2022-05-30 11:37:34 +09:00
ebc2566130
fix: add missing import
fix #8756
2022-05-29 14:33:42 +02:00
futchitwo
d2784030ec
fix(client): fix popout url (#8494) 2022-05-29 12:21:36 +02:00
804fa33535
refactor: improve code quality (#8751)
* remove unnecessary if

`Array.prototype.some` already returns a boolean so an if to return
true or false is completely unnecessary in this case.

* perf: use count instead of find

When using `count` instead of `findOneBy`, the data is not
unnecessarily loaded.

* remove duplicate null check

The variable is checked for null in the lines above and the function
returns if so. Therefore, it can not be null at this point.

* simplify `getJsonSchema`

Because the assigned value is `null` and the used keys are only
shallow, use of `nestedProperty.set` seems inappropriate. Because the
value is not read, the initial for loop can be replaced by a `for..in`
loop.

Since all keys will be assigned `null`, the condition of the ternary
expression in the nested function will always be true. Therefore the
recursion case will never happen. With this the nested function can be
eliminated.

* remove duplicate condition

The code above already checks `dragging` and returns if it is truthy.
Checking it again later is therefore unnecessary.

To make this more obvious the `return` is removed in favour of using
an if...else construct.

* remove impossible "unknown" time

The `ago` variable will always be a number and all non-negative numbers
are already covered by other cases, the negative case is handled with
`future` so there is no case when `unkown` could be achieved.
2022-05-29 15:15:52 +09:00
tamaina
f1d2398eac
fix(client): Vite related boot mechanism revision (#8753)
* preload app css

* remove salt

* APP_FETCH_FAILED error

* set max-age to 15s
2022-05-29 10:58:54 +09:00
tamaina
4917961736
preload app css (#8752) 2022-05-29 10:57:06 +09:00
e54aa56ee1
chore: remove unused imports 2022-05-28 21:17:23 +02:00
21d54f2758
fix: validate text is not empty
fix #8747
2022-05-28 17:26:17 +02:00
tamaina
abc8998b48
refactor: use css module at components/global/loading.vue (#8750)
* refactor: use css module at components/global/loading.vue

* rename class name to "root"
2022-05-29 00:15:32 +09:00
tamaina
4a50c49211
Fix theme import (#8749) 2022-05-28 21:59:23 +09:00
708fba989a
feat(tests): add e2e tests for widgets (#8735)
* test(e2e): add baseline for widget tests

* chore(repo): enable test running in branch

* fix(e2e): set viewport for widget tests

* fix(client): add widget identifier classes to widgets

* test(e2e): add memo widget test

* fix(tests): force select value

* fix(tests): force button press for widget addition

* fix(tests): invoke select value differently

* fix(tests): adjust widget submit

* fix(tests): don't explicitly navigate for widget test

* fix(tests): click label to hide select popup

* fix(tests): just click modal background

* fix(tests): adjust modal background selector

* fix(tests): click all modal backgrounds

* feat(e2e): add test for adding timeline widget

* fix(client): add more widget identifier classes

* feat(tests): add method abstraction for test cases

* fix(tests): force-click overlays

* fix(tests): force widget button press

* fix(tests): remove timeout from final widget check

* feat(tests): add widget removal test case

* fix(client): use mk instead of msky as class prefix

* fix(tests): check widgets for existence rather than visibility

* chore(meta): don't run tests for specific feature branch
2022-05-28 14:28:12 +09:00
161659de5c
enhance: replace signin CAPTCHA with rate limit (#8740)
* enhance: rate limit works without signed in user

* fix: make limit key required for limiter

As before the fallback limiter key will be set from the endpoint name.

* enhance: use limiter for signin

* Revert "CAPTCHA求めるのは2fa認証が無効になっているときだけにした"

This reverts commit 02a43a310f.

* Revert "feat: make captcha required when signin to improve security"

This reverts commit b21b058005.

* fix undefined reference

* fix: better error message

* enhance: only handle prefix of IPv6
2022-05-28 12:06:47 +09:00
63a814c70e
fix(docs): correct information for drive upload (#8736) 2022-05-27 22:03:25 +09:00
3dae18b93c
fix lints (#8737)
* fix: emits use ev instead of e

* fix: errors use err instead of e

* fix: replace use of data where possible

* fix: events use evt instead of e

* fix: use strict equals

* fix: use emoji instead of e

* fix: vue lints
2022-05-26 22:53:09 +09:00
9c80403072
use http-signature module that supports hs2019 (#8635) 2022-05-26 09:12:17 +09:00
syuilo
b3ad04fcb0 update deps 2022-05-25 23:28:56 +09:00
syuilo
3c3140a100 refactor: use === 2022-05-25 23:19:39 +09:00
8d5c9e96e4
fix: assume remote users are following each other (#8734)
Misskey does not know if two remote users are following each other.
Because ActivityPub actions would otherwise fail on followers only
notes, we have to assume that two remote users are following each other
when an interaction about a remote note occurs.
2022-05-25 23:17:00 +09:00
429f1ad061
fix: activity widget used wrong variable name 2022-05-25 10:44:04 +02:00
a7be9be43d
fix: server metrics widget 2022-05-25 10:13:46 +02:00
e27c6abaea
refactor: temporary files (#8713)
* simplify temporary files for thumbnails

Because only a single file will be written to the directory, creating a
separate directory seems unnecessary. If only a temporary file is created,
the code from `createTemp` can be reused here as well.

* refactor: deduplicate code for temporary files/directories

To follow the DRY principle, the same code should not be duplicated
across different files. Instead an already existing function is used.

Because temporary directories are also create in multiple locations,
a function for this is also newly added to reduce duplication.

* fix: clean up identicon temp files

The temporary files for identicons are not reused and can be deleted
after they are fully read. This condition is met when the stream is closed
and so the file can be cleaned up using the events API of the stream.

* fix: ensure cleanup is called when download fails

* fix: ensure cleanup is called in error conditions

This covers import/export queue jobs and is mostly just wrapping all
code in a try...finally statement where the finally runs the cleanup.

* fix: use correct type instead of `any`
2022-05-25 16:50:22 +09:00
b049633db7
Refactor widgets and fix lint issues (#8719)
* fix(client): refactor widgets and fix lint issues

* Apply review suggestions from @Johann150

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
2022-05-25 16:43:12 +09:00
81fccb5656
refactor(client): refactor admin/other-settings to use Composition API (#8667) 2022-05-25 16:38:18 +09:00
67f3515dc1
Refactor admin/overview to use Composition API (#8674)
* refactor(client): refactor admin/overview to use Composition API

* fix(client): apply review suggestions
2022-05-25 16:37:35 +09:00
83b831d975
Refactor my-antennas/edit to use Composition API (#8680)
* refactor(client): refactor my-antennas/edit to use Composition API

* fix(client): apply review suggestions
2022-05-25 16:37:15 +09:00
MeiMei
6b44fe165b
Supports Unicode Emoji 14.0 (#8699)
* Unicode 14.0 Emoji

* mfm-js@0.22.0

* CHANGELOG

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-05-25 16:35:30 +09:00
6b109c7b0f
fix: wrong type for isVisibleForMe 2022-05-24 10:12:42 +02:00
f90c947036
fix(client): wrong scoping breaks 2FA 2022-05-23 22:43:13 +02:00
563cb36a8f
fix(client): fix undefined data value on 2FA settings (#8725) 2022-05-23 21:55:06 +02:00
syuilo
53fc1235d7 Update .mocharc.json 2022-05-21 22:24:57 +09:00
syuilo
b8544814ec lint 2022-05-21 22:21:41 +09:00
syuilo
05c4d6b11e refactor 2022-05-21 22:07:11 +09:00
syuilo
425084b596 Update utils.ts 2022-05-21 22:07:01 +09:00
syuilo
2205c61edf Update utils.ts 2022-05-21 17:40:43 +09:00
4bb04a2c24
chore(meta): add pixeldesu to patron list (#8714) 2022-05-21 09:48:40 +09:00
syuilo
b811de53b6 fix(client): make emoji stand out more on reaction button
Fix #8520
Close #8521

Co-Authored-By: Johann150 <20990607+Johann150@users.noreply.github.com>
2022-05-19 23:23:12 +09:00
68f9341e95
hotfix: uniform color migration fix 2022-05-19 15:42:55 +02:00
be1d02a7f8
enhance: page image component with alt text (#8634)
* refactor to composition API

* use existing image component

This improves user experience because alt text is displayed correctly.

* fix: correct image src

* fix: defineProps

* fix
2022-05-19 20:41:47 +09:00
edfded7fb7
fix(activitypub): add authorization checks (#8534)
* fix spelling

* fix(activitypub): add authorization checks
2022-05-19 20:40:16 +09:00
60fd793bc3
enhance(MFM): limit large MFM (#8540)
* add CSS classes for zoom MFM

* limit nesting of x2, x3, x4 MFM

* simplify CSS calculation

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>

Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
2022-05-19 20:38:14 +09:00
xianon
0f33864df1
fix: ノート詳細ページの新しいノートを表示する機能の動作が正しくなるように修正する (#8607)
* ノート詳細で新しいノートの表示が正しくないのを修正する

* ノート詳細から別のノート詳細を表示した時に前後の表示をリセットする
2022-05-19 20:32:55 +09:00
3abb0d589d
refactor(client): refactor admin/settings to use Composition API (#8678) 2022-05-19 20:30:23 +09:00
1d9a4f68f4
Refactor pleaseLogin to show a sign-in dialog (#8630)
* refactor(client): refactor pleaseLogin to show a sign-in dialog

* Apply review suggestions from @Johann150

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>

Co-authored-by: Johann150 <johann@qwertqwefsday.eu>
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2022-05-19 20:28:08 +09:00
a273940348
fix(client): fix lint issues in Deck UI components (#8681) 2022-05-19 17:35:43 +09:00
dependabot[bot]
3d46da64a8
chore(deps): bump async from 3.2.1 to 3.2.3 in /packages/client (#8707)
Bumps [async](https://github.com/caolan/async) from 3.2.1 to 3.2.3.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/master/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v3.2.1...v3.2.3)

---
updated-dependencies:
- dependency-name: async
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-19 17:35:11 +09:00
syuilo
4702f99c83 Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop 2022-05-19 17:21:11 +09:00