Compare commits

..

77 Commits

Author SHA1 Message Date
2b3687b3cb 10.36.1 2018-11-01 09:35:24 +09:00
5d61c7c691 Refactor and use original image for banner 2018-11-01 09:30:51 +09:00
1bb266e7c7 Update package-lock.json 2018-11-01 09:19:31 +09:00
1fca8d322c Clean up 2018-11-01 09:19:22 +09:00
325cd03a59 Improve performance 2018-11-01 09:08:00 +09:00
2f7e6baa05 Clean up 2018-11-01 09:02:54 +09:00
d252e066fe Improve performance 2018-11-01 09:00:18 +09:00
fe7bd9ab3c Bump typescript-eslint-parser from 20.0.0 to 20.1.1 (#3057)
Bumps [typescript-eslint-parser](https://github.com/eslint/typescript-eslint-parser) from 20.0.0 to 20.1.1.
- [Release notes](https://github.com/eslint/typescript-eslint-parser/releases)
- [Changelog](https://github.com/eslint/typescript-eslint-parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/eslint/typescript-eslint-parser/compare/v20.0.0...v20.1.1)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-01 08:24:13 +09:00
84e3f41305 Bump ts-loader from 5.2.2 to 5.3.0 (#3055)
Bumps [ts-loader](https://github.com/TypeStrong/ts-loader) from 5.2.2 to 5.3.0.
- [Release notes](https://github.com/TypeStrong/ts-loader/releases)
- [Changelog](https://github.com/TypeStrong/ts-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/TypeStrong/ts-loader/compare/v5.2.2...v5.3.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-01 08:24:05 +09:00
3e8cccad0d Bump jsdom from 12.2.0 to 13.0.0 (#3058)
Bumps [jsdom](https://github.com/jsdom/jsdom) from 12.2.0 to 13.0.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/master/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/12.2.0...13.0.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-01 08:23:38 +09:00
a2b94d67f7 Update README.md [AUTOGEN] (#3060) 2018-11-01 08:23:11 +09:00
6ab61e73b0 Bump apexcharts from 2.1.6 to 2.1.9 (#3056)
Bumps [apexcharts](https://github.com/apexcharts/apexcharts.js) from 2.1.6 to 2.1.9.
- [Release notes](https://github.com/apexcharts/apexcharts.js/releases)
- [Changelog](https://github.com/apexcharts/apexcharts.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/apexcharts/apexcharts.js/compare/v2.1.6...v2.1.9)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-11-01 08:22:53 +09:00
051c6973af Update README.md [AUTOGEN] (#3059) 2018-11-01 08:20:56 +09:00
806a49ec3d 10.36.0 2018-11-01 00:12:13 +09:00
3829fe128a Update src/server/api/endpoints/users/relation.ts 2018-11-01 00:11:52 +09:00
649177985d [API] Implement users/relation 2018-11-01 00:11:21 +09:00
c15148b23c [API] Include detailed user information for block/mute response 2018-10-31 23:34:35 +09:00
261a3f5d91 Better rate limitting 2018-10-31 23:03:14 +09:00
256ba78ba5 Fix 2018-10-31 22:55:17 +09:00
04aff8866e [MFM] Better hashtag detection 2018-10-31 22:38:05 +09:00
1a51b98700 Refactor 2018-10-31 22:35:02 +09:00
f64100226d Revert "Clean up"
This reverts commit 8948a0d3a4.
2018-10-31 22:10:25 +09:00
b7805e48a6 Merge branch 'develop' of https://github.com/syuilo/misskey into develop 2018-10-31 22:08:27 +09:00
0d9556620d Update package-lock.json 2018-10-31 22:08:19 +09:00
a51828a7a2 Update test.yml (#3052) 2018-10-31 22:07:26 +09:00
7e2009f408 Update config.yml (#3051) 2018-10-31 22:00:21 +09:00
008d950a39 10.35.1 2018-10-31 18:07:59 +09:00
22d5862afb 🎨 2018-10-31 18:07:00 +09:00
de569147a5 Fix #3041 2018-10-31 17:56:21 +09:00
a82c3db750 Merge pull request #3038 from syuilo/l10n_develop
New Crowdin translations
2018-10-31 13:44:10 +09:00
80706d10af Bump @types/speakeasy from 2.0.2 to 2.0.3 (#3012)
Bumps [@types/speakeasy](https://github.com/DefinitelyTyped/DefinitelyTyped) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-31 13:43:45 +09:00
93f01ed4df Bump typescript from 3.1.3 to 3.1.4 (#3049)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.1.3 to 3.1.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.1.3...v3.1.4)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-31 13:42:47 +09:00
a3a28e5557 Bump file-type from 10.1.0 to 10.2.0 (#3039)
Bumps [file-type](https://github.com/sindresorhus/file-type) from 10.1.0 to 10.2.0.
- [Release notes](https://github.com/sindresorhus/file-type/releases)
- [Commits](https://github.com/sindresorhus/file-type/compare/v10.1.0...v10.2.0)

Signed-off-by: dependabot[bot] <support@dependabot.com>
2018-10-31 13:42:31 +09:00
8948a0d3a4 Clean up 2018-10-31 13:28:05 +09:00
d849ea9b41 Clean up 2018-10-31 13:23:12 +09:00
0144575f3f Improve performance 2018-10-31 13:20:24 +09:00
bdbe646ca7 Improve performance 2018-10-31 13:14:45 +09:00
1a1483a242 Update package-lock.json 2018-10-31 12:29:38 +09:00
962346785b New translations ja-JP.yml (English) 2018-10-31 11:31:00 +09:00
a73da3cd70 10.35.0 2018-10-31 11:30:49 +09:00
9c27d0ae3f Add CircleCI badge (#3050) 2018-10-31 11:29:25 +09:00
525d5218c1 🎨 2018-10-31 11:29:03 +09:00
e23b13ec7f [API] Include detailed user information of blocking API responses 2018-10-31 11:24:36 +09:00
29b000e03c Remove needless async/await 2018-10-31 11:22:49 +09:00
6a7b0df810 New translations ja-JP.yml (Norwegian) 2018-10-31 11:22:11 +09:00
4142de9195 New translations ja-JP.yml (Dutch) 2018-10-31 11:22:07 +09:00
9195e1be00 New translations ja-JP.yml (Japanese, Kansai) 2018-10-31 11:22:03 +09:00
75382d13fd New translations ja-JP.yml (Spanish) 2018-10-31 11:21:59 +09:00
d444280a28 New translations ja-JP.yml (Russian) 2018-10-31 11:21:52 +09:00
52fc0fe04a New translations ja-JP.yml (Portuguese) 2018-10-31 11:21:48 +09:00
216bebadf1 New translations ja-JP.yml (Polish) 2018-10-31 11:21:44 +09:00
a5592931cb New translations ja-JP.yml (Korean) 2018-10-31 11:21:39 +09:00
a2228417ff New translations ja-JP.yml (Italian) 2018-10-31 11:21:35 +09:00
3e1e292c3e New translations ja-JP.yml (German) 2018-10-31 11:21:31 +09:00
f2f039ae9e New translations ja-JP.yml (French) 2018-10-31 11:21:27 +09:00
29dde1eda0 New translations ja-JP.yml (English) 2018-10-31 11:21:21 +09:00
45d3792ce0 New translations ja-JP.yml (Chinese Simplified) 2018-10-31 11:21:17 +09:00
875d0aaebb New translations ja-JP.yml (Catalan) 2018-10-31 11:21:13 +09:00
26c9d8ff6f Clean up 2018-10-31 11:20:54 +09:00
5e3372e932 Merge pull request #3047 from mei23/mei-1031-blokings-list
blockings list
2018-10-31 11:17:24 +09:00
f7069dcd18 良い感じに 2018-10-31 11:16:13 +09:00
560bb65384 blockings list 2018-10-31 04:59:01 +09:00
50cd6a036e Implement /api/v1/instance (#3045)
* Update mastodon.ts

* Update types.ts

* Update mastodon.ts
2018-10-31 02:17:54 +09:00
441ab2b5f8 Fix: can't recognize rebirthed instance user (#3046)
* resync uri from WebFinger

* trigger resync on user page

* allways update on resync

* Revert "trigger resync on user page"

This reverts commit 8ff139fb49ee61ad55e4b42c562f8a2c3f8098ac.

* background resync
2018-10-31 02:16:13 +09:00
ba5ed188a1 Add Crowdin info to translate docs (#3044) 2018-10-30 22:56:13 +09:00
72e672f08d Merge branch 'develop' of https://github.com/syuilo/misskey into develop 2018-10-30 21:55:25 +09:00
120474ec6a Fix bug 2018-10-30 21:55:16 +09:00
eee57c47f5 Use cache when default.yml update (#3042)
* Use cache when default.yml update

* Install latest npm in base image
2018-10-30 21:18:03 +09:00
4c160869b8 Update test/api.ts 2018-10-30 21:17:26 +09:00
3720a7fbe0 Merge branch 'develop' of https://github.com/syuilo/misskey into develop 2018-10-30 14:34:39 +09:00
7afa541a53 Fix #3040 2018-10-30 14:34:32 +09:00
6f979c8275 Configure CI (#3037)
* Update config.yml

* Configure CI

* Use Vesion 2.1

* Fix error

* Ensure binary builds

* Ensure misskey builds

* Store artifacts

* Ensure node-gyp builds

* Fix typo

* Fix typo

* Ensure binary builds

* Update working directory

* Cache test npm packages

* Revert "Update working directory"

* Ensure misskey builds

* Ensure node-gyp builds

* Fix missing configurations

* Configure deploy filters

* Use latest npm in Docker
2018-10-30 12:36:14 +09:00
d399241e65 Refactor 2018-10-30 09:36:20 +09:00
e85dec030a [Client] Fix bug 2018-10-30 09:27:57 +09:00
d0220764cc New translations ja-JP.yml (French) 2018-10-30 05:31:25 +09:00
75c1df9531 New translations ja-JP.yml (French) 2018-10-30 05:11:49 +09:00
bca7156d6b New translations ja-JP.yml (French) 2018-10-30 05:02:28 +09:00
77 changed files with 1099 additions and 505 deletions

View File

@ -9,6 +9,7 @@ mongodb:
db: test-misskey
user: admin
pass: ''
# __REDIS__
redis:
host: localhost
port: 6379

View File

@ -1,60 +1,137 @@
version: 2
version: 2.1
general:
branches:
ignore:
- l10n_develop
- imgbot
executors:
default:
working_directory: /tmp/workspace
docker:
- image: misskey/ci:latest
- image: circleci/mongo:latest
- image: circleci/redis:latest
docker:
working_directory: /tmp/workspace
docker:
- image: docker:latest
jobs:
webpack-build:
working_directory: /misskey
docker:
- image: yukimochi/misskey-builder:latest
build:
executor: default
steps:
- checkout
- restore_cache:
name: Restore npm package caches
keys:
- npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-
- npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-
- npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-
- npm-v1-arch-{{ arch }}-
- npm-v1-
- run:
name: Setup Dependencies
name: Install Dependencies
command: |
yarn install
yarn global add web-push
npm install
- run:
name: Import default.yml
name: Configure
command: |
echo ${IMPORT_DEFAULT_YML} | base64 -d | gzip -d > .config/default.yml
cp .ci/default.yml .config
cp .ci/test.yml .config
- run:
name: Build Webpack
name: Build
command: |
yarn run build
npm run build || (echo -e '\033[0;34mRebuild modules\033[0;39m' && ls -1A node_modules | grep '^[^@]' | xargs npm rebuild && ls -1A node_modules | grep '^@' | xargs -I%1 sh -c 'ls -1A node_modules/'%1' | xargs -P0 -I%2 npm rebuild node_modules/'%1'/%2' && npm run build)
ls -1ARl node_modules > ls
- save_cache:
name: Cache npm packages
key: npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-ls-{{ checksum "ls" }}
paths:
- node_modules
- store_artifacts:
path: built
- persist_to_workspace:
root: .
paths:
- .
test:
parameters:
without_redis:
type: string
default: ""
executor: default
steps:
- attach_workspace:
at: /tmp/workspace
- when:
condition: <<parameters.without_redis>>
steps:
- run:
name: Configure
command: |
mv .config/test.yml .config/test_redis.yml
touch .config/test.yml
cat .config/test_redis.yml | while IFS= read line; do if [[ "$line" = '# __REDIS__' ]]; then break; else echo "$line" >> .config/test.yml; fi; done
- run:
name: Compress clients
name: Test
command: |
find ./built/client -name "*.js" -or -name "*.js.map" -or -name "*.css" -or -name "*.svg" -or -name "*.html" -or -name "*.json" | xargs -t gzip -k -9
find ./built/client -name "*.js" -or -name "*.js.map" -or -name "*.css" -or -name "*.svg" -or -name "*.html" -or -name "*.json" | xargs -t brotli -q 10
tar cfz ~/built-${CIRCLE_SHA1}.tar.gz built
- run:
name: Send built s3
command: |
mc config host add ykmc ${s3_endpoint} ${s3_accesskey} ${s3_secretkey}
mc cp ~/built-${CIRCLE_SHA1}.tar.gz ${backet}/${CIRCLE_BRANCH}/
docker-build:
docker:
- image: docker:17-git
npm run test || (npm rebuild && npm run test) || ((node-gyp configure && node-gyp build && npm run build || (echo -e '\033[0;34mRebuild modules\033[0;39m' && ls -1A node_modules | grep '^[^@]' | xargs npm rebuild && ls -1A node_modules | grep '^@' | xargs -I%1 sh -c 'ls -1A node_modules/'%1' | xargs -P0 -I%2 npm rebuild node_modules/'%1'/%2' && npm run build)) && npm run test)
ls -1ARl node_modules > ls
- save_cache:
name: Cache npm packages
key: npm-v1-arch-{{ arch }}-env-{{ .Environment.variableName }}-package-{{ checksum "package.json" }}-lock-{{ checksum "package-lock.json" }}-ls-{{ checksum "ls" }}
paths:
- node_modules
docker:
parameters:
with_deploy:
type: string
default: ""
executor: docker
steps:
- checkout
- setup_remote_docker
- run:
name: build docker image
name: Build
command: |
docker build -t misskey:latest .
- run:
name: upload image to docker hub.
command: |
docker login --username=${DOCKER_USER} --password=${DOCKER_PASS}
docker push ${DOCKER_USER}/misskey:latest
docker build . | tee docker.log
tail -n 1 docker.log | read __Successfully __built tag
- when:
condition: <<parameters.with_deploy>>
steps:
- run:
name: Deploy
command: |
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
then
docker tag $tag misskey/misskey
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
docker push misskey/misskey
else
echo -e '\033[0;33mAborted deploying to Docker Hub\033[0;39m'
fi
workflows:
version: 2
build:
build-and-test:
jobs:
- webpack-build
- docker-build
- build
- test:
requires:
- build
- test:
without_redis: "true"
requires:
- build
- docker:
filters:
branches:
ignore: master
- docker:
with_deploy: "true"
filters:
branches:
only: master

View File

@ -35,7 +35,7 @@ before_script:
- npm install
# 設定ファイルを配置
- cp ./.travis/default.yml ./.config
- cp ./.travis/test.yml ./.config
- cp ./.ci/default.yml ./.config
- cp ./.ci/test.yml ./.config
- travis_wait npm run build

View File

@ -3,8 +3,9 @@ FROM alpine:3.8 AS base
ENV NODE_ENV=production
RUN apk add --no-cache nodejs nodejs-npm zlib
RUN npm i -g npm@latest
WORKDIR /misskey
COPY . ./
FROM base AS builder
@ -21,18 +22,23 @@ RUN apk add --no-cache \
pkgconfig \
libtool \
zlib-dev
RUN npm install \
&& npm install -g node-gyp \
&& node-gyp configure \
&& node-gyp build \
&& npm run build
RUN npm i -g node-gyp
COPY ./package.json ./
RUN npm i
COPY . ./
RUN node-gyp configure \
&& node-gyp build \
&& npm run build
FROM base AS runner
COPY --from=builder /misskey/built ./built
COPY --from=builder /misskey/node_modules ./node_modules
RUN apk add --no-cache tini
ENTRYPOINT ["/sbin/tini", "--"]
COPY --from=builder /misskey/node_modules ./node_modules
COPY --from=builder /misskey/built ./built
COPY . ./
CMD ["npm", "start"]

View File

@ -3,6 +3,7 @@
[![Misskey](/assets/title.png)](https://misskey.xyz/)
================================================================
[![CircleCI](https://circleci.com/gh/syuilo/misskey.svg?style=svg)](https://circleci.com/gh/syuilo/misskey)
[![][travis-badge]][travis-link]
[![][dependencies-badge]][dependencies-link]
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
@ -87,7 +88,7 @@ Please see [Contribution guide](./CONTRIBUTING.md).
</tr></table>
<table><tr>
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/13039004/509d0c412eb14ae08d6a812a3054f7d6/1?token-time=2145916800&token-hash=zwSu01tOtn5xTUucDZHuPsCxF2HBEMVs9ROJKTlEV_o%3D" alt="nemu"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/5881381/6235ca5d3fb04c8e95ef5b4ff2abcc18/2?token-time=2145916800&token-hash=zElv7ZcPL3viGsXbNG_KWiKrbV0vvw1gk0panx8DJoo%3D" alt="Naoki Kosaka"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/5881381/6235ca5d3fb04c8e95ef5b4ff2abcc18/3?token-time=2145916800&token-hash=qsdn0-e6yLaLI6hUX9JAkyTR6a5UdnSp7T1foniBvGQ%3D" alt="YUKIMOCHI"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/8241184/39e18850e87a449e9c9a71acb3310ebd/2?token-time=2145916800&token-hash=iUXOQzRyJDv3PJxwS7Mjwg1459dzh2trOq6NFtXu_OM%3D" alt="Acid Chicken"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/13034746/c711c7f58e204ecfbc2fd646bc8a4eee/1?token-time=2145916800&token-hash=UERBN4OyP7Nh5XwwdDg0N0IE5cD6_qUQMO81Z5Wizso%3D" alt="Hiratake"></td>
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/10789744/97175095d8f04c0f86225ff47cb98d40/1?token-time=2145916800&token-hash=P4BIzCX2I1CkEP66ottfhsC8Wr6BUSamjA-vq3pLqFI%3D" alt="Naoki Hirayama"></td>
@ -97,7 +98,7 @@ Please see [Contribution guide](./CONTRIBUTING.md).
<td><img src="https://c10.patreonusercontent.com/3/eyJoIjoxMDAsInciOjEwMH0%3D/patreon-media/p/user/12531784/93a45137841849329ba692da92ac7c60/1?token-time=2145916800&token-hash=tMosUojzUYJCH_3t--tvYA-SMCyrS__hzSndyaRSnbo%3D" alt="Takashi Shibuya"></td>
</tr><tr>
<td><a href="https://www.patreon.com/user?u=13039004">nemu</a></td>
<td><a href="https://www.patreon.com/user?u=5881381">Naoki Kosaka</a></td>
<td><a href="https://www.patreon.com/yukimochi">YUKIMOCHI</a></td>
<td><a href="https://www.patreon.com/acid_chicken">Acid Chicken</a></td>
<td><a href="https://www.patreon.com/hiratake">Hiratake</a></td>
<td><a href="https://www.patreon.com/spinlock">Naoki Hirayama</a></td>
@ -110,7 +111,7 @@ Please see [Contribution guide](./CONTRIBUTING.md).
</tr><tr>
</tr></table>
**Last updated:** Sat, 27 Oct 2018 04:36:06 UTC
**Last updated:** Wed, 31 Oct 2018 23:21:06 UTC
<!-- PATREON_END -->
:four_leaf_clover: Copyright

View File

@ -18,6 +18,10 @@ If you find an untranslated part on Misskey:
4. Add the text property using the `foo` keyword below the path that you found or created in step 2. Make sure to type your text in quotation marks. Text should always be inside of quotes.
- For example, in this case we add timeline: `timeline: "タイムライン"` to `locales/ja-JP.yml`.
5. And done
5. When you add text to the ja-JP file (of syuilo/misskey), it will automatically be applied to all other local language files within 24-48 hours. Translations added in ja-JP file should contain the original Japanese strings (example see step 4).
6. The new strings will automatically appear in the localized language files in the original Japanese text. After that, please go to [CrowdIn](https://crowdin.com/project/misskey) to do the localized translations in your language.
7. And done
For more details, please refer to this [commit](https://github.com/syuilo/misskey/commit/10f6d5980fa7692ccb45fbc5f843458b69b7607c).

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "Profil"
notification: "Mitteilungen"
apps: "In App öffnen"
mute: "Stummschalten"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "Sicherheit"
signin: "サインイン履歴"
password: "Passwort"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "Passwort ändern"
enter-current-password: "Derzeitiges Passwort eingeben"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "Profile"
notification: "Notification"
apps: "Apps"
mute: "Mute"
mute-and-block: "Mute / Block"
blocking: "Blocking"
security: "Security"
signin: "Sign in history"
password: "Password"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "Max"
in-use: "In use"
stats: "Statistics"
desktop/views/components/settings.mute.vue:
no-users: "No muted users"
common/views/components/mute-and-block.vue:
mute-and-block: "Mute / Block"
mute: "Mute"
block: "Blocking"
no-muted-users: "No muted users"
no-blocked-users: "No blocked users"
desktop/views/components/settings.password.vue:
reset: "Change password"
enter-current-password: "Enter the current password"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "Perfil"
notification: "Notificación"
apps: "Aplicaciones"
mute: "Silenciar"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "Seguridad"
signin: "Historial de inicios de sesión"
password: "Contraseña"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "No hay usuarios silenciados"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "Cambiar contraseña"
enter-current-password: "Ingresar contraseña actual"

View File

@ -28,11 +28,11 @@ common:
BSoD:
fatal-error: ":( 致命的な問題が発生しました。"
update-browser-os: "お使いのブラウザ(またはOS)のバージョンを更新すると解決する可能性があります。"
error-code: "エラーコード"
browser-version: "ブラウザ バージョン"
client-version: "クライアント バージョン"
error-code: "Code derreur"
browser-version: "Version du navigateur"
client-version: "La version du client"
email-support: "問題が解決しない場合は、上記の情報をお書き添えの上 syuilotan@yahoo.co.jp までご連絡ください。"
thanks: "Thank you for using Misskey."
thanks: "Merci davoir choisi dutiliser Misskey."
got-it: "J'ai compris !"
customization-tips:
title: "Conseils de personnalisation"
@ -62,7 +62,7 @@ common:
years_ago: "Il y a {} an·s"
month-and-day: "{month} mois/{day} jour"
trash: "Corbeille"
drive: "ドライブ"
drive: "Drive"
weekday-short:
sunday: "D"
monday: "L"
@ -124,12 +124,12 @@ common:
reduce-motion: "Réduire les animations dans linterface utilisateur"
this-setting-is-this-device-only: "Uniquement sur cet appareil"
do-not-use-in-production: 'Il sagit dune version de développement. Ne pas utiliser dans un environnement de production.'
is-remote-user: "このユーザー情報はコピーです。"
is-remote-user: "Ces informations utilisateur ont été copiées."
is-remote-post: "この投稿情報はコピーです。"
view-on-remote: "正確な情報を見る"
view-on-remote: "Consulter le profil complet"
error:
title: '問題が発生しました'
retry: 'やり直す'
title: 'Une erreur est survenue'
retry: 'Réessayer'
reversi:
drawn: "Partie nulle"
my-turn: "Cest votre tour"
@ -185,7 +185,7 @@ common:
rename: "Renommer"
stack-left: "Vers la gauche"
pop-right: "Vers la droite"
dev: "アプリの作成に失敗しました。再度お試しください。"
dev: "Échec lors de la création de lapplication. Veuillez réessayer."
auth/views/form.vue:
share-access: "Désirez-vous <b>autoriser</b> <i>{{ app.name }}</i> à avoir accès à votre compte ?"
permission-ask: "Cette application nécessite les autorisations suivantes :"
@ -542,24 +542,24 @@ desktop/views/components/charts.vue:
title: "Graphiques"
per-day: "par jour"
per-hour: "par heure"
federation: "フェデレーション"
federation: "Fédération"
notes: "Publications"
users: "Utilisateurs"
drive: "Drive"
network: "Réseau"
charts:
federation-instances: "インスタンスの増減"
federation-instances-total: "インスタンスの積算"
federation-instances-total: "Nombre total dinstances"
notes: "投稿の増減 (統合)"
local-notes: "投稿の増減 (ローカル)"
remote-notes: "投稿の増減 (リモート)"
notes-total: "Total des notes"
users: "Nombre dutilisateurs·trices : augmentation/diminution"
users-total: "ユーザーの積算"
users-total: "Nombre total des utilisateurs·rices"
drive: "ドライブ使用量の増減"
drive-total: "ドライブ使用量の積算"
drive-total: "Utilisation totale du lecteur"
drive-files: "ドライブのファイル数の増減"
drive-files-total: "ドライブのファイル数の積算"
drive-files-total: "Nombre total de fichiers sur le lecteur"
network-requests: "Requêtes"
network-time: "Temps de réponse"
network-usage: "Traffic"
@ -679,10 +679,10 @@ desktop/views/components/note.vue:
reposted-by: "Partagé par {}"
reply: "Répondre"
renote: "Partager"
add-reaction: "リアクション"
detail: "詳細"
private: "この投稿は非公開です"
deleted: "この投稿は削除されました"
add-reaction: "Ajouter votre réaction"
detail: "Détails"
private: "Cette publication est privée"
deleted: "Cette publication a été supprimée"
desktop/views/components/notes.vue:
error: "Échec du chargement."
retry: "Réessayer"
@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "Profil"
notification: "Notification"
apps: "Applications"
mute: "Mettre en sourdine"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "Sécurité"
signin: "Historique de connexion"
password: "Mot de Passe"
@ -765,7 +766,7 @@ desktop/views/components/settings.vue:
deck-default: "デッキをデフォルトのUIにする"
display: "Affichage et design"
customize: "Personnaliser l'Accueil"
wallpaper: "壁紙"
wallpaper: "Arrière plan"
choose-wallpaper: "Sélectionner un fond d'écran"
delete-wallpaper: "Supprimer le fond d'écran"
dark-mode: "Mode nuit"
@ -777,14 +778,14 @@ desktop/views/components/settings.vue:
suggest-recent-hashtags: "Afficher les hashtags populaires dans le champs de saisie"
show-clock-on-header: "Afficher l'horloge à droite sur le coté supérieur"
show-reply-target: "Afficher les réponses"
timeline: "タイムライン"
timeline: "Chronologie"
show-my-renotes: "Afficher mes republications dans le fil"
show-renoted-my-notes: "Afficher mes republications dans les fils"
show-local-renotes: "ローカルの投稿のRenoteをタイムラインに表示する"
show-maps: "Afficher la carte"
deck-column-align: "デッキのカラムの位置"
deck-column-align-center: "中央"
deck-column-align-left: ""
deck-column-align-center: "Centrer"
deck-column-align-left: "À gauche"
sound: "Son"
enable-sounds: "Activer le son"
enable-sounds-desc: "Jouer un son lorsque vous recevez un message. Ce paramètre est sauvegardé dans le navigateur."
@ -825,7 +826,7 @@ desktop/views/components/settings.vue:
tools: "Outils"
task-manager: "Gestionnaire de tâches"
third-parties: "Services tiers"
navbar-position: "ナビゲーションバーの位置"
navbar-position: "Position de la barre de navigation"
navbar-position-top: "En haut"
navbar-position-left: "à gauche"
navbar-position-right: "à droite"
@ -850,25 +851,29 @@ desktop/views/components/settings.2fa.vue:
common/views/components/api-settings.vue:
intro: "APIを利用するには、上記のトークンを「i」というキーでパラメータに付加してリクエストします。"
caution: "アカウントを不正利用される可能性があるため、このトークンは第三者に教えないでください(アプリなどにも入力しないでください)。"
regeneration-of-token: "万が一このトークンが漏れたりその可能性がある場合はトークンを再生成できます。"
regenerate-token: "トークンを再生成"
token: "Token:"
enter-password: "パスワードを入力してください"
regeneration-of-token: "Si votre jeton est compromis, vous pouvez le régénérer."
regenerate-token: "Régénérer le jeton"
token: "Jeton :"
enter-password: "Entrez le mot de passe"
console:
title: 'APIコンソール'
endpoint: 'エンドポイント'
parameter: 'パラメータ'
send: '送信'
sending: '応答待ち'
response: '結果'
title: 'Console API'
endpoint: 'Point de terminaison'
parameter: 'Paramètres'
send: 'Envoyer'
sending: 'Envoi en cours'
response: 'Résultat'
desktop/views/components/settings.apps.vue:
no-apps: "Aucune application autorisée"
common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "Aucun utilisateurs mis en sourdine"
in-use: "utilisé"
stats: "Statistiques"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "Changer votre mot de passe"
enter-current-password: "Entrez votre mot de passe actuel"
@ -945,8 +950,8 @@ desktop/views/pages/admin/admin.vue:
dashboard: "Tableau de bord"
users: "Utilisateur·rice·s"
update: "Mises à jour"
announcements: "お知らせ"
hashtags: "ハッシュタグ"
announcements: "Annonces"
hashtags: "Hashtags"
desktop/views/pages/admin/admin.dashboard.vue:
dashboard: "Tableau de bord"
all-users: "Toutes les utilisateurrices"
@ -954,9 +959,9 @@ desktop/views/pages/admin/admin.dashboard.vue:
all-notes: "Toutes les publications"
original-notes: "Publications sur cette instance"
invite: "Invitation"
banner-url: "Banner URL"
disableRegistration: "Disable new user registration"
disableLocalTimeline: "Disable the local timeline"
banner-url: "URL de la bannière"
disableRegistration: "Désactiver lenregistrement de nouveaux utilisateurs·rices"
disableLocalTimeline: "Désactiver le fil local"
desktop/views/pages/admin/admin.suspend-user.vue:
suspend-user: "Suspendre un·e utilisateur·rice"
suspend: "Suspendre"
@ -974,22 +979,22 @@ desktop/views/pages/admin/admin.unverify-user.vue:
unverify: "Ôter la vérification du compte"
unverified: "Ce compte n'est pas vérifié"
desktop/views/pages/admin/admin.announcements.vue:
announcements: "お知らせ"
announcements: "Annonces"
desktop/views/pages/admin/admin.hashtags.vue:
hided-tags: "Hidden Tags"
hided-tags: "Tags cachés"
desktop/views/pages/deck/deck.tl-column.vue:
is-media-only: "Les publications médias uniquement"
is-media-view: "Vue média"
edit: "Options"
desktop/views/pages/deck/deck.user-column.vue:
posts: "投稿"
following: "フォロー"
followers: "フォロワー"
images: "画像"
activity: "アクティビティ"
timeline: "タイムライン"
pinned-notes: "ピン留めされた投稿"
push-to-a-list: "リストに追加"
posts: "Publications"
following: "Suit"
followers: "Abonné·e·s"
images: "Images"
activity: "Activité"
timeline: "Chronologie"
pinned-notes: "Publications épinglées"
push-to-a-list: "Ajouter à la liste"
desktop/views/pages/stats/stats.vue:
all-users: "Toutes les utilisateurrices"
original-users: "Utilisateur·rice·s sur cette instance"
@ -1042,7 +1047,7 @@ desktop/views/pages/user/user.friends.vue:
no-users: "Pas d'utilisateurs"
desktop/views/pages/user/user.vue:
is-suspended: "Ce compte a été suspendu."
last-used-at: "最終アクセス"
last-used-at: "Actif·ive pour la dernière fois"
desktop/views/pages/user/user.photos.vue:
title: "Photos"
loading: "Chargement en cours"
@ -1055,9 +1060,9 @@ desktop/views/pages/user/user.profile.vue:
mute: "Mettre en sourdine"
muted: "Muting"
unmute: "Enlever la sourdine"
block: "ブロックする"
unblock: "ブロック解除"
block-confirm: "このユーザーをブロックしますか?"
block: "Bloquer"
unblock: "Débloquer"
block-confirm: "Bloquer cet utilisateur ?"
push-to-a-list: "Ajouter à la liste"
list-pushed: "Vous avez ajouté {user} à la liste {list}."
desktop/views/pages/user/user.header.vue:
@ -1065,10 +1070,10 @@ desktop/views/pages/user/user.header.vue:
following: "Suit"
followers: "Abonné·e·s"
is-bot: "Ce compte est un Bot"
years-old: ""
year: ""
month: ""
day: ""
years-old: "ans dâge"
year: "Année"
month: "Mois"
day: "Jour"
desktop/views/pages/user/user.timeline.vue:
default: "Publications"
with-replies: "Publications et réponses"
@ -1127,8 +1132,8 @@ mobile/views/components/drive.file-detail.vue:
hash: "Hash (md5)"
exif: "EXIF"
nsfw: "CW"
mark-as-sensitive: "閲覧注意に設定"
unmark-as-sensitive: "閲覧注意を解除"
mark-as-sensitive: "Marquer comme sensible"
unmark-as-sensitive: "Ne pas marquer comme sensible"
mobile/views/components/media-image.vue:
sensitive: "Le contenu est NSFW"
click-to-show: "Cliquer pour afficher"
@ -1288,8 +1293,8 @@ mobile/views/pages/settings.vue:
timeline: "Fil d'actualité"
show-reply-target: "Afficher les réponses"
show-my-renotes: "Afficher mes republications"
show-renoted-my-notes: "自分の投稿のRenoteを表示する"
show-local-renotes: "ローカルの投稿のRenoteを表示する"
show-renoted-my-notes: "Afficher mes publications partagées"
show-local-renotes: "Afficher les publications partagées localement"
post-style: "Style de la publication"
post-style-standard: "Standard"
post-style-smart: "Intelligent"
@ -1322,7 +1327,7 @@ mobile/views/pages/settings.vue:
signout: "Déconnexion"
sound: "Sons"
enable-sounds: "Activer les sons"
mark-as-read-all-unread-notes: "すべての投稿を既読にする"
mark-as-read-all-unread-notes: "Marquer toutes les publications comme lues"
mobile/views/pages/user.vue:
follows-you: "Vous suit"
following: "Abonnements"
@ -1332,10 +1337,10 @@ mobile/views/pages/user.vue:
timeline: "Fil d'actualité"
media: "Media"
is-suspended: "This account has been suspended."
mute: "ミュート"
unmute: "ミュート解除"
block: "ブロック"
unblock: "ブロック解除"
mute: "Mettre en sourdine"
unmute: "Enlever la sourdine"
block: "Bloquer"
unblock: "Débloquer"
mobile/views/pages/user/home.vue:
recent-notes: "Notes récentes"
images: "Images"
@ -1382,28 +1387,28 @@ docs:
dev/views/index.vue:
manage-apps: "Gestion des applications"
dev/views/apps.vue:
manage-apps: "アプリを管理"
create-app: "アプリ作成"
app-missing: "アプリなし"
manage-apps: "Gestion des applications"
create-app: "Créer une app"
app-missing: "Aucune application"
dev/views/new-app.vue:
create-app: "アプリケーションの作成"
app-name: "アプリケーション名"
app-name-desc: "あなたのアプリの名称。"
app-name-ex: "ex) Misskey for iOS"
app-overview: "アプリの概要"
app-desc: "あなたのアプリの簡単な説明や紹介。"
app-desc-ex: "ex) Misskey iOSクライアント。"
create-app: "Création dune application"
app-name: "Nom de lapplication"
app-name-desc: "Le nom de votre application"
app-name-ex: "p. ex. Misskey pour iOS"
app-overview: "Description courte de lapplication"
app-desc: "Brève description introductive à votre application."
app-desc-ex: "p. ex) Misskey pour iOS"
callback-url: "コールバックURL (オプション)"
callback-url-desc: "ユーザーが認証フォームで認証した際にリダイレクトするURLを設定できます。"
authority: "権限"
authority: "Autorisations "
authority-desc: "ここで要求した機能だけがAPIからアクセスできます。"
authority-warning: "アプリ作成後も変更できますが、新たな権限を付与する場合、その時点で関連付けられているユーザーキーはすべて無効になります。"
account-read: "アカウントの情報を見る。"
account-write: "アカウントの情報を操作する。"
note-write: "投稿する。"
reaction-write: "リアクションしたりリアクションをキャンセルする。"
following-write: "フォローしたりフォロー解除する。"
drive-read: "ドライブを見る。"
drive-write: "ドライブを操作する。"
notification-read: "通知を見る。"
notification-write: "通知を操作する。"
account-read: "Afficher les informations du compte"
account-write: "Modifications des informations du compte"
note-write: "Publications."
reaction-write: "Ajout et suppression de réactions."
following-write: "Sabonner et se désabonner."
drive-read: "Lecture du Drive."
drive-write: "Téléversement/suppression des fichiers de votre Lecteur."
notification-read: "Lire vos notifications."
notification-write: "Gestion de vos notifications."

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

View File

@ -832,7 +832,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -973,8 +974,12 @@ common/views/components/drive-settings.vue:
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "守護神セキュリティ"
signin: "こんな感じでサインインしたらしいで"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使うとる"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはおらんで"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "今のパスワードを入れてや"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "Profiel"
notification: "Melding"
apps: "Apps"
mute: "Dempen"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "Beveiliging"
signin: "Inloggeschiedenis"
password: "Wachtwoord"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "Geen gedempte gebruikers"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "Wachtwoord wijzigen"
enter-current-password: "Voer je huidige wachtwoord in"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "Notifikasjon"
apps: "Apper"
mute: "Demp"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "Passord"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "Profil"
notification: "Powiadomienia"
apps: "Aplikacje"
mute: "Wyciszanie"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "Bezpieczeństwo"
signin: "Historia logowań"
password: "Hasło"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "Brak wyciszonych użytkowników"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "Zmień hasło"
enter-current-password: "Wprowadź obecne hasło"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

View File

@ -741,7 +741,8 @@ desktop/views/components/settings.vue:
profile: "プロフィール"
notification: "通知"
apps: "アプリ"
mute: "ミュート"
mute-and-block: "ミュート/ブロック"
blocking: "ブロック"
security: "セキュリティ"
signin: "サインイン履歴"
password: "パスワード"
@ -867,8 +868,12 @@ common/views/components/drive-settings.vue:
max: "容量"
in-use: "使用中"
stats: "統計"
desktop/views/components/settings.mute.vue:
no-users: "ミュートしているユーザーはいません"
common/views/components/mute-and-block.vue:
mute-and-block: "ミュートとブロック"
mute: "ミュート"
block: "ブロック"
no-muted-users: "ミュートしているユーザーはいません"
no-blocked-users: "ブロックしているユーザーはいません"
desktop/views/components/settings.password.vue:
reset: "パスワードを変更する"
enter-current-password: "現在のパスワードを入力してください"

69
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "misskey",
"version": "10.33.0",
"version": "10.36.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -691,9 +691,12 @@
"integrity": "sha512-XWwqRvaSsf4yq/4SYL5/7n5i2RWqf+jtIRlasj65cuZZDZ01wtkDfAIxrEpYcLvzT1HMqBmsnMEcZjK+OMeojQ=="
},
"@types/speakeasy": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@types/speakeasy/-/speakeasy-2.0.2.tgz",
"integrity": "sha512-h8KW3wSd3/l4oKRGYPxExCaos5VmjcnwDG3RK25tfcoWQR9iLmM9UbwvF1Pd+UT5aY1Z3LdQGt4xU0u9Zk/C2Q=="
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@types/speakeasy/-/speakeasy-2.0.3.tgz",
"integrity": "sha512-lDc49Aec4WnQPRhW3n90ct14CH0Zyrj48RGMK1SSQP6BOf8HamWg+PG9uj1DVnaa6t+lhQU1j1lhGA7d9baxWw==",
"requires": {
"@types/node": "*"
}
},
"@types/superagent": {
"version": "3.8.4",
@ -1259,9 +1262,9 @@
}
},
"apexcharts": {
"version": "2.1.6",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-2.1.6.tgz",
"integrity": "sha512-kIb4Q07bWwTGuTWhyzhDAOz6nrltDgyP8VUUwqetxr0o11mNH6PA6YVnR/e9nyd9HU6q3bFZN8eVuSatnqdxAQ==",
"version": "2.1.9",
"resolved": "https://registry.npmjs.org/apexcharts/-/apexcharts-2.1.9.tgz",
"integrity": "sha512-Qs/jLUa03wqPR53yMk8QAwq+qrX/Odc3IIXH2WVVjdWyFXS1lYzGSDbVcVDnOKkxoLdAlzPI3icb2bMjskwfXQ==",
"requires": {
"babel-polyfill": "^6.26.0",
"core-js": "^2.5.7",
@ -3332,12 +3335,12 @@
}
},
"data-urls": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.0.1.tgz",
"integrity": "sha512-0HdcMZzK6ubMUnsMmQmG0AcLQPvbvb47R0+7CCZQCYgcd8OUWG91CG7sM6GoXgjz+WLl4ArFzHtBMy/QqSF4eg==",
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz",
"integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==",
"requires": {
"abab": "^2.0.0",
"whatwg-mimetype": "^2.1.0",
"whatwg-mimetype": "^2.2.0",
"whatwg-url": "^7.0.0"
}
},
@ -5311,9 +5314,9 @@
}
},
"file-type": {
"version": "10.1.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-10.1.0.tgz",
"integrity": "sha512-fkjfXnqBRrdUFTS6opakWyMXb+uzDv8zOCqjSOWPbzMLnYnmnUEv/RNY9igkk4nc8TVL44Xd1OCC2fJXH3eb7Q=="
"version": "10.2.0",
"resolved": "https://registry.npmjs.org/file-type/-/file-type-10.2.0.tgz",
"integrity": "sha512-eqX81S1PWdLDPW39yyB214TVVOsUQjSmPcyUjeVH6ksH+94Y2YA/ItiIwa53rJiSofJZLK6lGsuCE3rwt0vp4w=="
},
"filename-regex": {
"version": "2.0.1",
@ -8351,9 +8354,9 @@
"integrity": "sha512-xYuhvQ7I9PDJIGBWev9xm0+SMSed3ZDBAmvVjbFR1ZRLAF+vlXcQu6cRI9uAlj81rzikElRVteehwV7DuX2ZmQ=="
},
"jsdom": {
"version": "12.2.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-12.2.0.tgz",
"integrity": "sha512-QPOggIJ8fquWPLaYYMoh+zqUmdphDtu1ju0QGTitZT1Yd8I5qenPpXM1etzUegu3MjVp8XPzgZxdn8Yj7e40ig==",
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/jsdom/-/jsdom-13.0.0.tgz",
"integrity": "sha512-Kmq4ASMNkgpY+YufE322EnIKoiz0UWY2DRkKlU7d5YrIW4xiVRhWFrZV1fr6w/ZNxQ50wGAH5gGRzydgnmkkvw==",
"requires": {
"abab": "^2.0.0",
"acorn": "^6.0.2",
@ -8374,6 +8377,7 @@
"symbol-tree": "^3.2.2",
"tough-cookie": "^2.4.3",
"w3c-hr-time": "^1.0.1",
"w3c-xmlserializer": "^1.0.0",
"webidl-conversions": "^4.0.2",
"whatwg-encoding": "^1.0.5",
"whatwg-mimetype": "^2.2.0",
@ -15569,9 +15573,9 @@
}
},
"ts-loader": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.2.2.tgz",
"integrity": "sha512-vM/TrEKXBqRYq5yLatsXyKFnYSpv53klmGtrILGlNqcMsxPVi8+e4yr1Agbu9oMZepx/4szDVn5QpFo83IQdQg==",
"version": "5.3.0",
"resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-5.3.0.tgz",
"integrity": "sha512-lGSNs7szRFj/rK9T1EQuayE3QNLg6izDUxt5jpmq0RG1rU2bapAt7E7uLckLCUPeO1jwxCiet2oRaWovc53UAg==",
"requires": {
"chalk": "^2.3.0",
"enhanced-resolve": "^4.0.0",
@ -15683,16 +15687,17 @@
}
},
"typescript": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.3.tgz",
"integrity": "sha512-+81MUSyX+BaSo+u2RbozuQk/UWx6hfG0a5gHu4ANEM4sU96XbuIyAB+rWBW1u70c6a5QuZfuYICn3s2UjuHUpA=="
"version": "3.1.4",
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.1.4.tgz",
"integrity": "sha512-JZHJtA6ZL15+Q3Dqkbh8iCUmvxD3iJ7ujXS+fVkKnwIVAdHc5BJTDNM0aTrnr2luKulFjU7W+SRhDZvi66Ru7Q=="
},
"typescript-eslint-parser": {
"version": "20.0.0",
"resolved": "https://registry.npmjs.org/typescript-eslint-parser/-/typescript-eslint-parser-20.0.0.tgz",
"integrity": "sha512-HZEoGA+LnS3etUlVAPX6I8sZ7872Yb0vPvQv6QDCIE44KD3bFmvPEQ4LbiD+qGkcxh6segjVK0v3rxpb2R6oSA==",
"version": "20.1.1",
"resolved": "https://registry.npmjs.org/typescript-eslint-parser/-/typescript-eslint-parser-20.1.1.tgz",
"integrity": "sha512-IJhpqHK60Pz2J5pe8rJUQ10DcMcGwhQnvRFcPV79coEV3bpNfSiHkgpS+sf6zx2ANDWgBhmtZbK9ICOy+v3FKA==",
"requires": {
"eslint": "4.19.1",
"eslint-visitor-keys": "^1.0.0",
"typescript-estree": "2.1.0"
},
"dependencies": {
@ -15825,7 +15830,7 @@
},
"fast-deep-equal": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"resolved": "http://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz",
"integrity": "sha1-wFNHeBfIa1HaqFPIHgWbcz0CNhQ="
},
"ignore": {
@ -16775,6 +16780,16 @@
"browser-process-hrtime": "^0.1.2"
}
},
"w3c-xmlserializer": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-1.0.0.tgz",
"integrity": "sha512-0et1+9uXYiIRAecx1D5Z1nk60+vimniGdIKl4XjeqkWi6acoHNlXMv1VR5jV+jF4ooeO08oWbYxeAJOcon1oMA==",
"requires": {
"domexception": "^1.0.1",
"webidl-conversions": "^4.0.2",
"xml-name-validator": "^3.0.0"
}
},
"ware": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/ware/-/ware-1.3.0.tgz",

View File

@ -1,8 +1,8 @@
{
"name": "misskey",
"author": "syuilo <i@syuilo.com>",
"version": "10.34.0",
"clientVersion": "1.0.11234",
"version": "10.36.1",
"clientVersion": "1.0.11311",
"codename": "nighthike",
"main": "./built/index.js",
"private": true,
@ -74,7 +74,7 @@
"@types/sharp": "0.21.0",
"@types/showdown": "1.7.5",
"@types/single-line-log": "1.1.0",
"@types/speakeasy": "2.0.2",
"@types/speakeasy": "2.0.3",
"@types/systeminformation": "3.23.0",
"@types/tinycolor2": "1.4.1",
"@types/tmp": "0.0.33",
@ -84,7 +84,7 @@
"@types/websocket": "0.0.40",
"@types/ws": "6.0.1",
"animejs": "2.2.0",
"apexcharts": "2.1.6",
"apexcharts": "2.1.9",
"autobind-decorator": "2.1.0",
"autosize": "4.0.2",
"autwh": "0.1.0",
@ -112,7 +112,7 @@
"eslint-plugin-vue": "4.7.1",
"eventemitter3": "3.1.0",
"file-loader": "2.0.0",
"file-type": "10.1.0",
"file-type": "10.2.0",
"fuckadblock": "3.2.1",
"gulp": "3.9.1",
"gulp-cssnano": "2.1.3",
@ -135,7 +135,7 @@
"is-root": "2.0.0",
"is-url": "1.2.4",
"js-yaml": "3.12.0",
"jsdom": "12.2.0",
"jsdom": "13.0.0",
"json5": "2.1.0",
"json5-loader": "1.0.1",
"koa": "2.6.1",
@ -201,11 +201,11 @@
"textarea-caret": "3.1.0",
"tinycolor2": "1.4.1",
"tmp": "0.0.33",
"ts-loader": "5.2.2",
"ts-loader": "5.3.0",
"ts-node": "7.0.1",
"tslint": "5.10.0",
"typescript": "3.1.3",
"typescript-eslint-parser": "20.0.0",
"typescript": "3.1.4",
"typescript-eslint-parser": "20.1.1",
"uglify-es": "3.3.9",
"url-loader": "1.1.2",
"uuid": "3.3.2",

View File

@ -0,0 +1,19 @@
<template>
<div class="wjqjnyhzogztorhrdgcpqlkxhkmuetgj">
<p>%fa:exclamation-triangle% %i18n:common.error.title%</p>
<ui-button @click="() => $emit('retry')">%i18n:common.error.retry%</ui-button>
</div>
</template>
<style lang="stylus" scoped>
.wjqjnyhzogztorhrdgcpqlkxhkmuetgj
max-width 350px
margin 0 auto
padding 32px
text-align center
color var(--text)
> p
margin 0 0 8px 0
</style>

View File

@ -1,5 +1,7 @@
import Vue from 'vue';
import muteAndBlock from './mute-and-block.vue';
import error from './error.vue';
import apiSettings from './api-settings.vue';
import driveSettings from './drive-settings.vue';
import profileEditor from './profile-editor.vue';
@ -49,6 +51,8 @@ import uiInfo from './ui/info.vue';
import formButton from './ui/form/button.vue';
import formRadio from './ui/form/radio.vue';
Vue.component('mk-mute-and-block', muteAndBlock);
Vue.component('mk-error', error);
Vue.component('mk-api-settings', apiSettings);
Vue.component('mk-drive-settings', driveSettings);
Vue.component('mk-profile-editor', profileEditor);

View File

@ -0,0 +1,52 @@
<template>
<ui-card>
<div slot="title">%fa:ban% %i18n:@mute-and-block%</div>
<section>
<header>%i18n:@mute%</header>
<ui-info v-if="!muteFetching && mute.length == 0">%i18n:@no-muted-users%</ui-info>
<div class="users" v-if="mute.length != 0">
<div v-for="user in mute" :key="user.id">
<p><b>{{ user | userName }}</b> @{{ user | acct }}</p>
</div>
</div>
</section>
<section>
<header>%i18n:@block%</header>
<ui-info v-if="!blockFetching && block.length == 0">%i18n:@no-blocked-users%</ui-info>
<div class="users" v-if="block.length != 0">
<div v-for="user in block" :key="user.id">
<p><b>{{ user | userName }}</b> @{{ user | acct }}</p>
</div>
</div>
</section>
</ui-card>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
data() {
return {
muteFetching: true,
blockFetching: true,
mute: [],
block: []
};
},
mounted() {
(this as any).api('mute/list').then(mute => {
this.mute = mute.map(x => x.mutee);
this.muteFetching = false;
});
(this as any).api('blocking/list').then(blocking => {
this.block = blocking.map(x => x.blockee);
this.blockFetching = false;
});
}
});
</script>

View File

@ -2,11 +2,11 @@
<header class="bvonvjxbwzaiskogyhbwgyxvcgserpmu">
<mk-avatar class="avatar" :user="note.user" v-if="$store.state.device.postStyle == 'smart'"/>
<router-link class="name" :to="note.user | userPage" v-user-preview="note.user.id">{{ note.user | userName }}</router-link>
<span class="is-verified" v-if="note.user.isVerified" title="%i18n:common.verified-user%">%fa:star%</span>
<span class="is-admin" v-if="note.user.isAdmin">admin</span>
<span class="is-bot" v-if="note.user.isBot">bot</span>
<span class="is-cat" v-if="note.user.isCat">cat</span>
<span class="username"><mk-acct :user="note.user"/></span>
<span class="is-verified" v-if="note.user.isVerified" title="%i18n:common.verified-user%">%fa:star%</span>
<div class="info">
<span class="app" v-if="note.app && !mini">via <b>{{ note.app.name }}</b></span>
<span class="mobile" v-if="note.viaMobile">%fa:mobile-alt%</span>
@ -68,10 +68,6 @@ export default Vue.extend({
&:hover
text-decoration underline
> .is-verified
margin-right 8px
color #4dabf7
> .is-admin
> .is-bot
> .is-cat
@ -95,6 +91,10 @@ export default Vue.extend({
color var(--noteHeaderAcct)
flex-shrink 2147483647
> .is-verified
margin 0 .5em 0 0
color #4dabf7
> .info
margin-left auto
font-size 0.9em

View File

@ -1,6 +1,7 @@
<template>
<div class="ymxyweixqwsxauxldgpvecjepnwxbylu" :class="{ warn }">
<i v-if="warn">%fa:exclamation-triangle%</i>
<i v-else>%fa:info-circle%</i>
<slot></slot>
</div>
</template>
@ -23,11 +24,20 @@ export default Vue.extend({
margin 16px 0
padding 16px
font-size 90%
> i
margin-right 4px
background var(--infoBg)
color var(--infoFg)
&.warn
background var(--infoWarnBg)
color var(--infoWarnFg)
&:first-child
margin-top 0
&:last-child
margin-bottom 0
> i
margin-right 4px
</style>

View File

@ -40,8 +40,8 @@ export default Vue.extend({
mounted() {
this.connection = (this as any).os.stream.useSharedConnection('main');
this.connection.on('follow', this.onFollow);
this.connection.on('unfollow', this.onUnfollow);
this.connection.on('follow', this.onFollowChange);
this.connection.on('unfollow', this.onFollowChange);
},
beforeDestroy() {
@ -49,17 +49,11 @@ export default Vue.extend({
},
methods: {
onFollow(user) {
if (user.id == this.u.id) {
this.u.isFollowing = user.isFollowing;
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
}
},
onUnfollow(user) {
onFollowChange(user) {
if (user.id == this.u.id) {
this.u.isFollowing = user.isFollowing;
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
this.$forceUpdate();
}
},

View File

@ -4,10 +4,7 @@
<slot name="empty" v-if="notes.length == 0 && !fetching && requestInitPromise == null"></slot>
<div v-if="!fetching && requestInitPromise != null" class="error">
<p>%fa:exclamation-triangle% %i18n:common.error.title%</p>
<ui-button @click="resolveInitPromise">%i18n:common.error.retry%</ui-button>
</div>
<mk-error v-if="!fetching && requestInitPromise != null" @retry="resolveInitPromise"/>
<div class="placeholder" v-if="fetching">
<template v-for="i in 10">
@ -215,16 +212,6 @@ export default Vue.extend({
> *
transition transform .3s ease, opacity .3s ease
> .error
max-width 300px
margin 0 auto
padding 32px
text-align center
color var(--text)
> p
margin 0 0 8px 0
> .placeholder
padding 32px
opacity 0.3

View File

@ -1,8 +1,6 @@
<template>
<div class="root">
<div class="none ui info" v-if="!fetching && apps.length == 0">
<p>%fa:info-circle%%i18n:@no-apps%</p>
</div>
<ui-info v-if="!fetching && apps.length == 0">%i18n:@no-apps%</ui-info>
<div class="apps" v-if="apps.length != 0">
<div v-for="app in apps">
<p><b>{{ app.name }}</b></p>

View File

@ -1,31 +0,0 @@
<template>
<div>
<div class="none ui info" v-if="!fetching && users.length == 0">
<p>%fa:info-circle%%i18n:@no-users%</p>
</div>
<div class="users" v-if="users.length != 0">
<div v-for="user in users" :key="user.id">
<p><b>{{ user | userName }}</b> @{{ user | acct }}</p>
</div>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
data() {
return {
fetching: true,
users: []
};
},
mounted() {
(this as any).api('mute/list').then(x => {
this.users = x.users;
this.fetching = false;
});
}
});
</script>

View File

@ -7,7 +7,7 @@
<p :class="{ active: page == 'notification' }" @mousedown="page = 'notification'">%fa:R bell .fw%%i18n:@notification%</p>
<p :class="{ active: page == 'drive' }" @mousedown="page = 'drive'">%fa:cloud .fw%%i18n:common.drive%</p>
<p :class="{ active: page == 'hashtags' }" @mousedown="page = 'hashtags'">%fa:hashtag .fw%%i18n:@tags%</p>
<p :class="{ active: page == 'mute' }" @mousedown="page = 'mute'">%fa:ban .fw%%i18n:@mute%</p>
<p :class="{ active: page == 'muteAndBlock' }" @mousedown="page = 'muteAndBlock'">%fa:ban .fw%%i18n:@mute-and-block%</p>
<p :class="{ active: page == 'apps' }" @mousedown="page = 'apps'">%fa:puzzle-piece .fw%%i18n:@apps%</p>
<p :class="{ active: page == 'security' }" @mousedown="page = 'security'">%fa:unlock-alt .fw%%i18n:@security%</p>
<p :class="{ active: page == 'api' }" @mousedown="page = 'api'">%fa:key .fw%API</p>
@ -200,12 +200,9 @@
</section>
</ui-card>
<ui-card class="mute" v-show="page == 'mute'">
<div slot="title">%fa:ban% %i18n:@mute%</div>
<section>
<x-mute/>
</section>
</ui-card>
<div class="muteAndBlock" v-show="page == 'muteAndBlock'">
<mk-mute-and-block/>
</div>
<ui-card class="apps" v-show="page == 'apps'">
<div slot="title">%fa:puzzle-piece% %i18n:@apps%</div>
@ -289,7 +286,6 @@
<script lang="ts">
import Vue from 'vue';
import XMute from './settings.mute.vue';
import XPassword from './settings.password.vue';
import X2fa from './settings.2fa.vue';
import XApps from './settings.apps.vue';
@ -300,7 +296,6 @@ import checkForUpdate from '../../../common/scripts/check-for-update';
export default Vue.extend({
components: {
XMute,
XPassword,
X2fa,
XApps,

View File

@ -1,6 +1,6 @@
<template>
<div class="dnpfarvgbnfmyzbdquhhzyxcmstpdqzs" :class="{ naked, narrow, active, isStacked, draghover, dragging, dropready }"
@dragover.prevent.stop="onDragover"
@dragenter.prevent.stop="onDragenter"
@dragleave="onDragleave"
@drop.prevent.stop="onDrop"
v-hotkey="keymap">
@ -269,7 +269,7 @@ export default Vue.extend({
this.dragging = false;
},
onDragover(e) {
onDragenter(e) {
// テンポラリカラムにはドロップさせない
if (this.isTemporaryColumn) {
e.dataTransfer.dropEffect = 'none';
@ -287,7 +287,7 @@ export default Vue.extend({
e.dataTransfer.dropEffect = isDeckColumn ? 'move' : 'none';
if (!this.dragging) this.draghover = true;
if (!this.dragging && isDeckColumn) this.draghover = true;
},
onDragleave() {

View File

@ -8,10 +8,7 @@
</template>
</div>
<div v-if="!fetching && requestInitPromise != null" class="error">
<p>%fa:exclamation-triangle% %i18n:common.error.title%</p>
<ui-button @click="resolveInitPromise">%i18n:common.error.retry%</ui-button>
</div>
<mk-error v-if="!fetching && requestInitPromise != null" @retry="resolveInitPromise"/>
<!-- トランジションを有効にするとなぜかメモリリークする -->
<!--<transition-group name="mk-notes" class="transition" ref="notes">-->
@ -221,13 +218,6 @@ export default Vue.extend({
> *
transition transform .3s ease, opacity .3s ease
> .error
max-width 300px
margin 0 auto
padding 16px
text-align center
color var(--text)
> .placeholder
padding 16px
opacity 0.3

View File

@ -17,6 +17,7 @@
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
props: {
user: {
@ -24,6 +25,7 @@ export default Vue.extend({
required: true
}
},
data() {
return {
u: this.user,
@ -31,28 +33,24 @@ export default Vue.extend({
connection: null
};
},
mounted() {
this.connection = (this as any).os.stream.useSharedConnection('main');
this.connection.on('follow', this.onFollow);
this.connection.on('unfollow', this.onUnfollow);
this.connection.on('follow', this.onFollowChange);
this.connection.on('unfollow', this.onFollowChange);
},
beforeDestroy() {
this.connection.dispose();
},
methods: {
onFollow(user) {
if (user.id == this.u.id) {
this.u.isFollowing = user.isFollowing;
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
}
},
onUnfollow(user) {
onFollowChange(user) {
if (user.id == this.u.id) {
this.u.isFollowing = user.isFollowing;
this.u.hasPendingFollowRequestFromYou = user.hasPendingFollowRequestFromYou;
this.$forceUpdate();
}
},
@ -90,8 +88,6 @@ export default Vue.extend({
</script>
<style lang="stylus" scoped>
.mk-follow-button
display block
user-select none

View File

@ -85,6 +85,8 @@
<mk-drive-settings/>
<mk-mute-and-block/>
<ui-card>
<div slot="title">%fa:volume-up% %i18n:@sound%</div>

View File

@ -131,6 +131,8 @@
remoteInfoBg: '#42321c',
remoteInfoFg: '#ffbd3e',
infoBg: '#253142',
infoFg: '#fff',
infoWarnBg: '#42321c',
infoWarnFg: '#ffbd3e',

View File

@ -131,6 +131,8 @@
remoteInfoBg: '#fff0db',
remoteInfoFg: '#573c08',
infoBg: '#e5f5ff',
infoFg: '#72818a',
infoWarnBg: '#fff0db',
infoWarnFg: '#573c08',

View File

@ -14,11 +14,13 @@ export type Source = {
* メンテナの連絡先(URLかmailto形式のURL)
*/
url: string;
email?: string;
repository_url?: string;
feedback_url?: string;
};
name?: string;
description?: string;
languages?: string[];
welcome_bg_url?: string;
url: string;
port: number;

View File

@ -9,9 +9,9 @@ export type TextElementHashtag = {
};
export default function(text: string, i: number) {
if (!(/^\s#[^\s\.,!\?]+/.test(text) || (i == 0 && /^#[^\s\.,!\?]+/.test(text)))) return null;
if (!(/^\s#[^\s\.,!\?#]+/.test(text) || (i == 0 && /^#[^\s\.,!\?#]+/.test(text)))) return null;
const isHead = text.startsWith('#');
const hashtag = text.match(/^\s?#[^\s\.,!\?]+/)[0];
const hashtag = text.match(/^\s?#[^\s\.,!\?#]+/)[0];
const res: any[] = !isHead ? [{
type: 'text',
content: text[0]

View File

@ -0,0 +1,20 @@
import { IDriveFile } from '../models/drive-file';
import config from '../config';
export default function(file: IDriveFile, thumbnail = false): string {
if (file == null) return null;
if (file.metadata.withoutChunks) {
if (thumbnail) {
return file.metadata.thumbnailUrl || file.metadata.url;
} else {
return file.metadata.url;
}
} else {
if (thumbnail) {
return `${config.drive_url}/${file._id}?thumbnail`;
} else {
return `${config.drive_url}/${file._id}`;
}
}
}

View File

@ -22,27 +22,28 @@ export type IApp = {
/**
* Pack an app for API response
*
* @param {any} app
* @param {any} me?
* @param {any} options?
* @return {Promise<any>}
*/
export const pack = (
app: any,
me?: any,
options?: {
detail?: boolean,
includeSecret?: boolean,
includeProfileImageIds?: boolean
}
) => new Promise<any>(async (resolve, reject) => {
const opts = options || {
const opts = Object.assign({
detail: false,
includeSecret: false,
includeProfileImageIds: false
};
}, options);
let _app: any;
const fields = opts.detail ? {} : {
name: true
};
// Populate the app if 'app' is ID
if (isObjectId(app)) {
_app = await App.findOne({
@ -51,7 +52,7 @@ export const pack = (
} else if (typeof app === 'string') {
_app = await App.findOne({
_id: new mongo.ObjectID(app)
});
}, { fields });
} else {
_app = deepcopy(app);
}

View File

@ -1,7 +1,12 @@
import * as mongo from 'mongodb';
import db from '../db/mongodb';
import isObjectId from '../misc/is-objectid';
const deepcopy = require('deepcopy');
import { pack as packUser, IUser } from './user';
const Blocking = db.get<IBlocking>('blocking');
Blocking.createIndex('blockerId');
Blocking.createIndex('blockeeId');
Blocking.createIndex(['blockerId', 'blockeeId'], { unique: true });
export default Blocking;
@ -11,3 +16,41 @@ export type IBlocking = {
blockeeId: mongo.ObjectID;
blockerId: mongo.ObjectID;
};
export const packMany = (
blockings: (string | mongo.ObjectID | IBlocking)[],
me?: string | mongo.ObjectID | IUser
) => {
return Promise.all(blockings.map(x => pack(x, me)));
};
export const pack = (
blocking: any,
me?: any
) => new Promise<any>(async (resolve, reject) => {
let _blocking: any;
// Populate the blocking if 'blocking' is ID
if (isObjectId(blocking)) {
_blocking = await Blocking.findOne({
_id: blocking
});
} else if (typeof blocking === 'string') {
_blocking = await Blocking.findOne({
_id: new mongo.ObjectID(blocking)
});
} else {
_blocking = deepcopy(blocking);
}
// Rename _id to id
_blocking.id = _blocking._id;
delete _blocking._id;
// Populate blockee
_blocking.blockee = await packUser(_blocking.blockeeId, me, {
detail: true
});
resolve(_blocking);
});

View File

@ -1,9 +1,9 @@
import * as mongo from 'mongodb';
const deepcopy = require('deepcopy');
import { pack as packFolder } from './drive-folder';
import config from '../config';
import monkDb, { nativeDbConn } from '../db/mongodb';
import isObjectId from '../misc/is-objectid';
import getDriveFileUrl from '../misc/get-drive-file-url';
const DriveFile = monkDb.get<IDriveFile>('driveFiles.files');
DriveFile.createIndex('md5');
@ -33,7 +33,14 @@ export type IMetadata = {
thumbnailUrl?: string;
src?: string;
deletedAt?: Date;
/**
* このファイルの中身データがMongoDB内に保存されているのか否か
* オブジェクトストレージを利用している or リモートサーバーへの直リンクである
* な場合は false になります
*/
withoutChunks?: boolean;
storage?: string;
storageProps?: any;
isSensitive?: boolean;
@ -73,13 +80,13 @@ export function validateFileName(name: string): boolean {
);
}
export const packMany = async (
export const packMany = (
files: any[],
options?: {
detail: boolean
}
) => {
return (await Promise.all(files.map(f => pack(f, options)))).filter(x => x != null);
return Promise.all(files.map(f => pack(f, options)));
};
/**
@ -128,8 +135,8 @@ export const pack = (
_target = Object.assign(_target, _file.metadata);
_target.url = _file.metadata.url ? _file.metadata.url : `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}`;
_target.thumbnailUrl = _file.metadata.thumbnailUrl ? _file.metadata.thumbnailUrl : _file.metadata.url ? _file.metadata.url : `${config.drive_url}/${_target.id}/${encodeURIComponent(_target.name)}?thumbnail`;
_target.url = getDriveFileUrl(_file);
_target.thumbnailUrl = getDriveFileUrl(_file, true);
_target.isRemote = _file.metadata.isRemote;
if (_target.properties == null) _target.properties = {};
@ -156,6 +163,7 @@ export const pack = (
delete _target.storage;
delete _target.storageProps;
delete _target.isRemote;
delete _target._user;
resolve(_target);
});

View File

@ -16,11 +16,11 @@ export type IFavorite = {
noteId: mongo.ObjectID;
};
export const packMany = async (
export const packMany = (
favorites: any[],
me: any
) => {
return (await Promise.all(favorites.map(f => pack(f, me)))).filter(x => x != null);
return Promise.all(favorites.map(f => pack(f, me)));
};
/**

View File

@ -1,7 +1,12 @@
import * as mongo from 'mongodb';
import db from '../db/mongodb';
import isObjectId from '../misc/is-objectid';
const deepcopy = require('deepcopy');
import { pack as packUser, IUser } from './user';
const Mute = db.get<IMute>('mute');
Mute.createIndex('muterId');
Mute.createIndex('muteeId');
Mute.createIndex(['muterId', 'muteeId'], { unique: true });
export default Mute;
@ -11,3 +16,41 @@ export interface IMute {
muterId: mongo.ObjectID;
muteeId: mongo.ObjectID;
}
export const packMany = (
mutes: (string | mongo.ObjectID | IMute)[],
me?: string | mongo.ObjectID | IUser
) => {
return Promise.all(mutes.map(x => pack(x, me)));
};
export const pack = (
mute: any,
me?: any
) => new Promise<any>(async (resolve, reject) => {
let _mute: any;
// Populate the mute if 'mute' is ID
if (isObjectId(mute)) {
_mute = await Mute.findOne({
_id: mute
});
} else if (typeof mute === 'string') {
_mute = await Mute.findOne({
_id: new mongo.ObjectID(mute)
});
} else {
_mute = deepcopy(mute);
}
// Rename _id to id
_mute.id = _mute._id;
delete _mute._id;
// Populate mutee
_mute.mutee = await packUser(_mute.muteeId, me, {
detail: true
});
resolve(_mute);
});

View File

@ -164,7 +164,7 @@ export const hideNote = async (packedNote: any, meId: mongo.ObjectID) => {
}
};
export const packMany = async (
export const packMany = (
notes: (string | mongo.ObjectID | INote)[],
me?: string | mongo.ObjectID | IUser,
options?: {
@ -172,7 +172,7 @@ export const packMany = async (
skipHide?: boolean;
}
) => {
return (await Promise.all(notes.map(n => pack(n, me, options)))).filter(x => x != null);
return Promise.all(notes.map(n => pack(n, me, options)));
};
/**
@ -259,11 +259,6 @@ export const pack = async (
// When requested a detailed note data
if (opts.detail) {
//#region 重いので廃止
_note.prev = null;
_note.next = null;
//#endregion
if (_note.replyId) {
// Populate reply to note
_note.reply = pack(_note.replyId, meId, {

View File

@ -51,10 +51,10 @@ export interface INotification {
isRead: Boolean;
}
export const packMany = async (
export const packMany = (
notifications: any[]
) => {
return (await Promise.all(notifications.map(n => pack(n)))).filter(x => x != null);
return Promise.all(notifications.map(n => pack(n)));
};
/**

View File

@ -155,6 +155,50 @@ export function isValidBirthday(birthday: string): boolean {
}
//#endregion
export async function getRelation(me: mongo.ObjectId, target: mongo.ObjectId) {
const [following1, following2, followReq1, followReq2, toBlocking, fromBlocked, mute] = await Promise.all([
Following.findOne({
followerId: me,
followeeId: target
}),
Following.findOne({
followerId: target,
followeeId: me
}),
FollowRequest.findOne({
followerId: me,
followeeId: target
}),
FollowRequest.findOne({
followerId: target,
followeeId: me
}),
Blocking.findOne({
blockerId: me,
blockeeId: target
}),
Blocking.findOne({
blockerId: target,
blockeeId: me
}),
Mute.findOne({
muterId: me,
muteeId: target
})
]);
return {
isFollowing: following1 !== null,
isStalking: following1 && following1.stalk,
hasPendingFollowRequestFromYou: followReq1 !== null,
hasPendingFollowRequestToYou: followReq2 !== null,
isFollowed: following2 !== null,
isBlocking: toBlocking !== null,
isBlocked: fromBlocked !== null,
isMuted: mute !== null
};
}
/**
* Pack a user for API response
*
@ -179,13 +223,16 @@ export const pack = (
let _user: any;
const fields = opts.detail ? {
} : {
settings: false,
clientSettings: false,
profile: false,
keywords: false,
domains: false
const fields = opts.detail ? {} : {
name: true,
username: true,
host: true,
avatarColor: true,
avatarUrl: true,
isCat: true,
isBot: true,
isAdmin: true,
isVerified: true
};
// Populate the user if 'user' is ID
@ -220,6 +267,8 @@ export const pack = (
_user.id = _user._id;
delete _user._id;
delete _user.usernameLower;
if (_user.host == null) {
// Remove private properties
delete _user.keypair;
@ -227,7 +276,6 @@ export const pack = (
delete _user.token;
delete _user.twoFactorTempSecret;
delete _user.twoFactorSecret;
delete _user.usernameLower;
if (_user.twitter) {
delete _user.twitter.accessToken;
delete _user.twitter.accessTokenSecret;
@ -250,16 +298,6 @@ export const pack = (
if (_user.avatarUrl == null) {
_user.avatarUrl = `${config.drive_url}/default-avatar.jpg`;
// 互換性のため
if (_user.avatarId) {
_user.avatarUrl = `${config.drive_url}/${_user.avatarId}`;
}
}
// 互換性のため
if (_user.bannerId && _user.bannerUrl == null) {
_user.bannerUrl = `${config.drive_url}/${_user.bannerId}`;
}
if (!meId || !meId.equals(_user.id) || !opts.detail) {
@ -270,55 +308,16 @@ export const pack = (
}
if (meId && !meId.equals(_user.id) && opts.detail) {
const [following1, following2, followReq1, followReq2, toBlocking, fromBlocked, mute] = await Promise.all([
Following.findOne({
followerId: meId,
followeeId: _user.id
}),
Following.findOne({
followerId: _user.id,
followeeId: meId
}),
FollowRequest.findOne({
followerId: meId,
followeeId: _user.id
}),
FollowRequest.findOne({
followerId: _user.id,
followeeId: meId
}),
Blocking.findOne({
blockerId: meId,
blockeeId: _user.id
}),
Blocking.findOne({
blockerId: _user.id,
blockeeId: meId
}),
Mute.findOne({
muterId: meId,
muteeId: _user.id
})
]);
const relation = await getRelation(meId, _user.id);
// Whether the user is following
_user.isFollowing = following1 !== null;
_user.isStalking = following1 && following1.stalk;
_user.hasPendingFollowRequestFromYou = followReq1 !== null;
_user.hasPendingFollowRequestToYou = followReq2 !== null;
// Whether the user is followed
_user.isFollowed = following2 !== null;
// Whether the user is blocking
_user.isBlocking = toBlocking !== null;
// Whether the user is blocked
_user.isBlocked = fromBlocked !== null;
// Whether the user is muted
_user.isMuted = mute !== null;
_user.isFollowing = relation.isFollowing;
_user.isFollowed = relation.isFollowed;
_user.isStalking = relation.isStalking;
_user.hasPendingFollowRequestFromYou = relation.hasPendingFollowRequestFromYou;
_user.hasPendingFollowRequestToYou = relation.hasPendingFollowRequestToYou;
_user.isBlocking = relation.isBlocking;
_user.isBlocked = relation.isBlocked;
_user.isMuted = relation.isMuted;
}
if (opts.detail) {

View File

@ -15,6 +15,7 @@ import { URL } from 'url';
import { resolveNote } from './note';
import registerInstance from '../../../services/register-instance';
import Instance from '../../../models/instance';
import getDriveFileUrl from '../../../misc/get-drive-file-url';
const log = debug('misskey:activitypub');
@ -209,8 +210,8 @@ export async function createPerson(uri: string, resolver?: Resolver): Promise<IU
const avatarId = avatar ? avatar._id : null;
const bannerId = banner ? banner._id : null;
const avatarUrl = (avatar && avatar.metadata.thumbnailUrl) ? avatar.metadata.thumbnailUrl : (avatar && avatar.metadata.url) ? avatar.metadata.url : null;
const bannerUrl = (banner && banner.metadata.url) ? banner.metadata.url : null;
const avatarUrl = getDriveFileUrl(avatar, true);
const bannerUrl = getDriveFileUrl(banner, false);
await User.update({ _id: user._id }, {
$set: {
@ -303,8 +304,8 @@ export async function updatePerson(uri: string, resolver?: Resolver, hint?: obje
featured: person.featured,
avatarId: avatar ? avatar._id : null,
bannerId: banner ? banner._id : null,
avatarUrl: (avatar && avatar.metadata.thumbnailUrl) ? avatar.metadata.thumbnailUrl : (avatar && avatar.metadata.url) ? avatar.metadata.url : null,
bannerUrl: banner && banner.metadata.url ? banner.metadata.url : null,
avatarUrl: getDriveFileUrl(avatar, true),
bannerUrl: getDriveFileUrl(banner, false),
description: htmlToMFM(person.summary),
followersCount,
followingCount,

View File

@ -1,8 +1,8 @@
import config from '../../../config';
import { IDriveFile } from '../../../models/drive-file';
import getDriveFileUrl from '../../../misc/get-drive-file-url';
export default (file: IDriveFile) => ({
type: 'Document',
mediaType: file.contentType,
url: file.metadata.url || `${config.drive_url}/${file._id}`
url: getDriveFileUrl(file)
});

View File

@ -1,8 +1,8 @@
import config from '../../../config';
import { IDriveFile } from '../../../models/drive-file';
import getDriveFileUrl from '../../../misc/get-drive-file-url';
export default (file: IDriveFile) => ({
type: 'Image',
url: file.metadata.url || `${config.drive_url}/${file._id}`,
url: getDriveFileUrl(file),
sensitive: file.metadata.isSensitive
});

View File

@ -1,13 +1,18 @@
import { toUnicode, toASCII } from 'punycode';
import User, { IUser } from '../models/user';
import User, { IUser, IRemoteUser } from '../models/user';
import webFinger from './webfinger';
import config from '../config';
import { createPerson } from './activitypub/models/person';
import { createPerson, updatePerson } from './activitypub/models/person';
import { URL } from 'url';
import * as debug from 'debug';
export default async (username: string, _host: string, option?: any): Promise<IUser> => {
const log = debug('misskey:remote:resolve-user');
export default async (username: string, _host: string, option?: any, resync?: boolean): Promise<IUser> => {
const usernameLower = username.toLowerCase();
if (_host == null) {
log(`return local user: ${usernameLower}`);
return await User.findOne({ usernameLower, host: null });
}
@ -15,22 +20,64 @@ export default async (username: string, _host: string, option?: any): Promise<IU
const host = toUnicode(hostAscii);
if (config.host == host) {
log(`return local user: ${usernameLower}`);
return await User.findOne({ usernameLower, host: null });
}
let user = await User.findOne({ usernameLower, host }, option);
const user = await User.findOne({ usernameLower, host }, option);
const acctLower = `${usernameLower}@${hostAscii}`;
if (user === null) {
const acctLower = `${usernameLower}@${hostAscii}`;
const self = await resolveSelf(acctLower);
const finger = await webFinger(acctLower);
const self = finger.links.find(link => link.rel && link.rel.toLowerCase() === 'self');
if (!self) {
throw new Error('self link not found');
}
user = await createPerson(self.href);
log(`return new remote user: ${acctLower}`);
return await createPerson(self.href);
}
if (resync) {
log(`try resync: ${acctLower}`);
const self = await resolveSelf(acctLower);
if ((user as IRemoteUser).uri !== self.href) {
// if uri mismatch, Fix (user@host <=> AP's Person id(IRemoteUser.uri)) mapping.
log(`uri missmatch: ${acctLower}`);
console.log(`recovery missmatch uri for (username=${username}, host=${host}) from ${(user as IRemoteUser).uri} to ${self.href}`);
// validate uri
const uri = new URL(self.href);
if (uri.hostname !== hostAscii) {
throw new Error(`Invalied uri`);
}
await User.update({
usernameLower,
host: host
}, {
$set: {
uri: self.href
}
});
} else {
log(`uri is fine: ${acctLower}`);
}
await updatePerson(self.href);
log(`return resynced remote user: ${acctLower}`);
return await User.findOne({ uri: self.href });
}
log(`return existing remote user: ${acctLower}`);
return user;
};
async function resolveSelf(acctLower: string) {
log(`WebFinger for ${acctLower}`);
const finger = await webFinger(acctLower);
const self = finger.links.find(link => link.rel && link.rel.toLowerCase() === 'self');
if (!self) {
throw new Error('self link not found');
}
return self;
}

View File

@ -44,6 +44,7 @@ export default async (params: any, user: ILocalUser) => new Promise(async (res,
// Response
res(await pack(app, null, {
detail: true,
includeSecret: true
}));
});

View File

@ -21,6 +21,7 @@ export default (params: any, user: ILocalUser, app: IApp) => new Promise(async (
// Send response
res(await pack(ap, user, {
detail: true,
includeSecret: isSecure && ap.userId.equals(user._id)
}));
});

View File

@ -71,5 +71,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
await create(blocker, blockee);
// Send response
res(await pack(blockee._id, user));
res(await pack(blockee._id, user, {
detail: true
}));
});

View File

@ -71,5 +71,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
await deleteBlocking(blocker, blockee);
// Send response
res(await pack(blockee._id, user));
res(await pack(blockee._id, user, {
detail: true
}));
});

View File

@ -0,0 +1,64 @@
import $ from 'cafy'; import ID from '../../../../misc/cafy-id';
import Blocking, { packMany } from '../../../../models/blocking';
import { ILocalUser } from '../../../../models/user';
import getParams from '../../get-params';
export const meta = {
desc: {
'ja-JP': 'ブロックしているユーザー一覧を取得します。',
'en-US': 'Get blocking users.'
},
requireCredential: true,
kind: 'following-read',
params: {
limit: $.num.optional.range(1, 100).note({
default: 30
}),
sinceId: $.type(ID).optional.note({
}),
untilId: $.type(ID).optional.note({
}),
}
};
export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) return rej(psErr);
// Check if both of sinceId and untilId is specified
if (ps.sinceId && ps.untilId) {
return rej('cannot set sinceId and untilId');
}
const query = {
blockerId: me._id
} as any;
const sort = {
_id: -1
};
if (ps.sinceId) {
sort._id = 1;
query._id = {
$gt: ps.sinceId
};
} else if (ps.untilId) {
query._id = {
$lt: ps.untilId
};
}
const blockings = await Blocking
.find(query, {
limit: ps.limit,
sort: sort
});
res(await packMany(blockings, me));
});

View File

@ -16,7 +16,7 @@ export const meta = {
limit: {
duration: ms('1hour'),
max: 100
max: 120
},
requireFile: true,

View File

@ -34,6 +34,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
});
// Serialize
res(await Promise.all(tokens.map(async token =>
await pack(token.appId))));
res(await Promise.all(tokens.map(token => pack(token.appId, user, {
detail: true
}))));
});

View File

@ -4,9 +4,9 @@ import { publishMainStream } from '../../../../stream';
import DriveFile from '../../../../models/drive-file';
import acceptAllFollowRequests from '../../../../services/following/requests/accept-all';
import { IApp } from '../../../../models/app';
import config from '../../../../config';
import { publishToFollowers } from '../../../../services/i/update';
import getParams from '../../get-params';
import getDriveFileUrl from '../../../../misc/get-drive-file-url';
export const meta = {
desc: {
@ -129,7 +129,7 @@ export default async (params: any, user: ILocalUser, app: IApp) => new Promise(a
if (avatar == null) return rej('avatar not found');
if (!avatar.contentType.startsWith('image/')) return rej('avatar not an image');
updates.avatarUrl = avatar.metadata.thumbnailUrl || avatar.metadata.url || `${config.drive_url}/${avatar._id}`;
updates.avatarUrl = getDriveFileUrl(avatar, true);
if (avatar.metadata.properties.avgColor) {
updates.avatarColor = avatar.metadata.properties.avgColor;
@ -144,7 +144,7 @@ export default async (params: any, user: ILocalUser, app: IApp) => new Promise(a
if (banner == null) return rej('banner not found');
if (!banner.contentType.startsWith('image/')) return rej('banner not an image');
updates.bannerUrl = banner.metadata.url || `${config.drive_url}/${banner._id}`;
updates.bannerUrl = getDriveFileUrl(banner, false);
if (banner.metadata.properties.avgColor) {
updates.bannerColor = banner.metadata.properties.avgColor;
@ -162,7 +162,7 @@ export default async (params: any, user: ILocalUser, app: IApp) => new Promise(a
if (wallpaper == null) return rej('wallpaper not found');
updates.wallpaperUrl = wallpaper.metadata.url || `${config.drive_url}/${wallpaper._id}`;
updates.wallpaperUrl = getDriveFileUrl(wallpaper);
if (wallpaper.metadata.properties.avgColor) {
updates.wallpaperColor = wallpaper.metadata.properties.avgColor;

View File

@ -1,7 +1,7 @@
import $ from 'cafy'; import ID from '../../../../misc/cafy-id';
import Mute from '../../../../models/mute';
import { pack, ILocalUser } from '../../../../models/user';
import { getFriendIds } from '../../common/get-friends';
import Mute, { packMany } from '../../../../models/mute';
import { ILocalUser } from '../../../../models/user';
import getParams from '../../get-params';
export const meta = {
desc: {
@ -11,64 +11,54 @@ export const meta = {
requireCredential: true,
kind: 'account/read'
kind: 'account/read',
params: {
limit: $.num.optional.range(1, 100).note({
default: 30
}),
sinceId: $.type(ID).optional.note({
}),
untilId: $.type(ID).optional.note({
}),
}
};
export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => {
// Get 'iknow' parameter
const [iknow = false, iknowErr] = $.bool.optional.get(params.iknow);
if (iknowErr) return rej('invalid iknow param');
const [ps, psErr] = getParams(meta, params);
if (psErr) return rej(psErr);
// Get 'limit' parameter
const [limit = 30, limitErr] = $.num.optional.range(1, 100).get(params.limit);
if (limitErr) return rej('invalid limit param');
// Check if both of sinceId and untilId is specified
if (ps.sinceId && ps.untilId) {
return rej('cannot set sinceId and untilId');
}
// Get 'cursor' parameter
const [cursor = null, cursorErr] = $.type(ID).optional.get(params.cursor);
if (cursorErr) return rej('invalid cursor param');
// Construct query
const query = {
muterId: me._id,
deletedAt: { $exists: false }
muterId: me._id
} as any;
if (iknow) {
// Get my friends
const myFriends = await getFriendIds(me._id);
const sort = {
_id: -1
};
query.muteeId = {
$in: myFriends
};
}
// カーソルが指定されている場合
if (cursor) {
if (ps.sinceId) {
sort._id = 1;
query._id = {
$lt: cursor
$gt: ps.sinceId
};
} else if (ps.untilId) {
query._id = {
$lt: ps.untilId
};
}
// Get mutes
const mutes = await Mute
.find(query, {
limit: limit + 1,
sort: { _id: -1 }
limit: ps.limit,
sort: sort
});
// 「次のページ」があるかどうか
const inStock = mutes.length === limit + 1;
if (inStock) {
mutes.pop();
}
// Serialize
const users = await Promise.all(mutes.map(async m =>
await pack(m.muteeId, me, { detail: true })));
// Response
res({
users: users,
next: inStock ? mutes[mutes.length - 1]._id : null,
});
res(await packMany(mutes, me));
});

View File

@ -35,6 +35,7 @@ export default (params: any, user: ILocalUser) => new Promise(async (res, rej) =
});
// Reply
res(await Promise.all(apps.map(async app =>
await pack(app))));
res(await Promise.all(apps.map(app => pack(app, user, {
detail: true
}))));
});

View File

@ -143,8 +143,7 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
const query = {
deletedAt: null,
userId: user._id,
visibility: { $in: ['public', 'home'] }
userId: user._id
} as any;
if (ps.sinceId) {

View File

@ -0,0 +1,30 @@
import $ from 'cafy'; import ID from '../../../../misc/cafy-id';
import { ILocalUser, getRelation } from '../../../../models/user';
import getParams from '../../get-params';
export const meta = {
desc: {
'ja-JP': 'ユーザー間のリレーションを取得します。'
},
requireCredential: true,
params: {
userId: $.or($.type(ID), $.arr($.type(ID)).unique()).note({
desc: {
'ja-JP': 'ユーザーID (配列でも可)'
}
})
}
};
export default (params: any, me: ILocalUser) => new Promise(async (res, rej) => {
const [ps, psErr] = getParams(meta, params);
if (psErr) return rej(psErr);
const ids = Array.isArray(ps.userId) ? ps.userId : [ps.userId];
const relations = await Promise.all(ids.map(id => getRelation(me._id, id)));
res(Array.isArray(ps.userId) ? relations : relations[0]);
});

View File

@ -1,5 +1,5 @@
import $ from 'cafy'; import ID from '../../../../misc/cafy-id';
import User, { pack, ILocalUser } from '../../../../models/user';
import User, { pack, ILocalUser, isRemoteUser } from '../../../../models/user';
import resolveRemoteUser from '../../../../remote/resolve-user';
const cursorOption = { fields: { data: false } };
@ -61,5 +61,11 @@ export default (params: any, me: ILocalUser) => new Promise(async (res, rej) =>
res(await pack(user, me, {
detail: true
}));
if (isRemoteUser(user)) {
if (user.updatedAt == null || Date.now() - user.updatedAt.getTime() > 1000 * 60 * 60 * 24) {
resolveRemoteUser(username, host, { }, true);
}
}
}
});

View File

@ -1,10 +1,85 @@
import * as Router from 'koa-router';
import User from '../../models/user';
import { toASCII } from 'punycode';
import config from '../../config';
import Meta from '../../models/meta';
import { ObjectID } from 'bson';
const pkg = require('../../../package.json');
// Init router
const router = new Router();
router.get('/v1/custom_emojis', async ctx => ctx.body = {});
router.get('/v1/instance', async ctx => { // TODO: This is a temporary implementation. Consider creating helper methods!
const meta = await Meta.findOne() || {};
const { originalNotesCount, originalUsersCount } = meta.stats || {
originalNotesCount: 0,
originalUsersCount: 0
};
const domains = await User.distinct('host', { host: { $ne: null } }) as any as [] || [];
const maintainer = await User.findOne({ isAdmin: true }) || {
_id: ObjectID.createFromTime(0),
username: '', // TODO: Consider making this better!
host: config.host,
name: '',
isLocked: false,
isBot: false,
createdAt: new Date(0),
description: '',
avatarUrl: '',
bannerUrl: '',
followersCount: 0,
followingCount: 0,
notesCount: 0
};
const acct = maintainer.host ? `${maintainer.username}@${maintainer.host}` : maintainer.username;
ctx.body = {
uri: config.hostname,
title: config.name || 'Misskey',
description: config.description || '',
email: config.maintainer.email || config.maintainer.url.startsWith('mailto:') ? config.maintainer.url.slice(7) : '',
version: `0.0.0:compatible:misskey:${pkg.version}`, // TODO: How to tell about that this is an api for compatibility?
thumbnail: meta.bannerUrl,
/*
urls: {
streaming_api: config.ws_url + '/mastodon' // TODO: Implement compatible streaming API
}, */
stats: {
user_count: originalUsersCount,
status_count: originalNotesCount,
domain_count: domains.length
},
languages: config.languages || [ 'ja' ],
contact_account: {
id: maintainer._id,
username: maintainer.username,
acct: acct,
display_name: maintainer.name || '',
locked: maintainer.isLocked,
bot: maintainer.isBot,
created_at: maintainer.createdAt,
note: maintainer.description,
url: `${config.url}/@${acct}`,
avatar: maintainer.avatarUrl || '',
/*
avatar_static: maintainer.avatarUrl || '', // TODO: Implement static avatar url (ensure non-animated GIF)
*/
header: maintainer.bannerUrl || '',
/*
header_static: maintainer.bannerUrl || '', // TODO: Implement static header url (ensure non-animated GIF)
*/
followers_count: maintainer.followersCount,
following_count: maintainer.followingCount,
statuses_count: maintainer.notesCount,
emojis: [],
moved: null,
fields: null
}
};
});
router.get('/v1/instance/peers', async ctx => {
const peers = await User.distinct('host', { host: { $ne: null } }) as any as string[];
const punyCodes = peers.map(peer => toASCII(peer));

View File

@ -60,7 +60,9 @@ async function cancelRequest(follower: IUser, followee: IUser) {
}
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
// リモートにフォローリクエストをしていたらUndoFollow送信
@ -110,7 +112,9 @@ async function unFollow(follower: IUser, followee: IUser) {
// Publish unfollow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
// リモートにフォローをしていたらUndoFollow送信

View File

@ -87,7 +87,9 @@ export default async function(follower: IUser, followee: IUser, requestId?: stri
// Publish follow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'follow', packed));
}
// Publish followed event

View File

@ -42,7 +42,9 @@ export default async function(follower: IUser, followee: IUser) {
// Publish unfollow event
if (isLocalUser(follower)) {
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}
if (isLocalUser(follower) && isRemoteUser(followee)) {

View File

@ -70,5 +70,7 @@ export default async function(followee: IUser, follower: IUser) {
detail: true
}).then(packed => publishMainStream(followee._id, 'meUpdated', packed));
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'follow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'follow', packed));
}

View File

@ -28,5 +28,7 @@ export default async function(followee: IUser, follower: IUser) {
}
});
packUser(followee, follower).then(packed => publishMainStream(follower._id, 'unfollow', packed));
packUser(followee, follower, {
detail: true
}).then(packed => publishMainStream(follower._id, 'unfollow', packed));
}

View File

@ -611,19 +611,21 @@ function incNotesCount(user: IUser) {
async function extractMentionedUsers(tokens: ReturnType<typeof parse>): Promise<IUser[]> {
if (tokens == null) return [];
const mentionTokens = unique(
tokens
.filter(t => t.type == 'mention') as TextElementMention[]
);
const mentionTokens = tokens
.filter(t => t.type == 'mention') as TextElementMention[];
const mentionedUsers = unique(
let mentionedUsers =
erase(null, await Promise.all(mentionTokens.map(async m => {
try {
return await resolveUser(m.username, m.host);
} catch (e) {
return null;
}
})))
})));
// Drop duplicate users
mentionedUsers = mentionedUsers.filter((u, i, self) =>
i === self.findIndex(u2 => u._id.equals(u2._id))
);
return mentionedUsers;

View File

@ -0,0 +1,32 @@
import parseAcct from "../misc/acct/parse";
import resolveUser from '../remote/resolve-user';
import * as debug from 'debug';
debug.enable('*');
async function main(acct: string): Promise<any> {
const { username, host } = parseAcct(acct);
await resolveUser(username, host, {}, true);
}
// get args
const args = process.argv.slice(2);
let acct = args[0];
// normalize args
acct = acct.replace(/^@/, '');
// check args
if (!acct.match(/^\w+@\w/)) {
throw `Invalied acct format. Valied format are user@host`;
}
console.log(`resync ${acct}`);
main(acct).then(() => {
console.log('success');
process.exit(0);
}).catch(e => {
console.warn(e);
process.exit(1);
});

View File

@ -94,7 +94,7 @@ describe('API', () => {
setTimeout(async () => {
await Promise.all([
db.get('users').drop(),
db.get('posts').drop(),
db.get('notes').drop(),
db.get('driveFiles.files').drop(),
db.get('driveFiles.chunks').drop(),
db.get('driveFolders').drop(),
@ -508,6 +508,24 @@ describe('API', () => {
}, me);
expect(res).have.status(400);
}));
it('同じユーザーに複数メンションしても内部的にまとめられる', async(async () => {
const alice = await signup({ username: 'alice' });
const bob = await signup({ username: 'bob' });
const post = {
text: '@bob @bob @bob yo'
};
const res = await request('/notes/create', post, alice);
expect(res).have.status(200);
expect(res.body).be.a('object');
expect(res.body).have.property('createdNote');
expect(res.body.createdNote).have.property('text').eql(post.text);
const noteDoc = await db.get('notes').findOne({ _id: res.body.createdNote.id });
expect(noteDoc.mentions.map((id: any) => id.toString())).eql([bob.id.toString()]);
}));
});
describe('notes/show', () => {