update deps (#11764)
* update deps
* node16
* wip
* wip
* wip
* Update test-utils.ts
* wip
* Update tsconfig.json
* wip
* Update package.json
* wip
* Update following.vue
* Update followers.vue
* Update index.vue
* Update share.vue
* Update MkUserPopup.vue
* Update MkPostForm.vue
* wip
* Update MkTokenGenerateWindow.vue
* Update MkPagination.vue
* refactor
* update deps
* update deps
* Update sw.ts
* wip
* wip
* wip
* Update FetchInstanceMetadataService.ts
* Update FetchInstanceMetadataService.ts
* update node
* update deps
* 🎨
This commit is contained in:
parent
2db63d1a55
commit
1f7a81aae7
|
@ -6,7 +6,7 @@
|
||||||
"features": {
|
"features": {
|
||||||
"ghcr.io/devcontainers-contrib/features/pnpm:2": {},
|
"ghcr.io/devcontainers-contrib/features/pnpm:2": {},
|
||||||
"ghcr.io/devcontainers/features/node:1": {
|
"ghcr.io/devcontainers/features/node:1": {
|
||||||
"version": "20.5.0"
|
"version": "20.5.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"forwardPorts": [3000],
|
"forwardPorts": [3000],
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
name: "Reviewer lottery"
|
|
||||||
on:
|
|
||||||
pull_request_target:
|
|
||||||
types: [opened, ready_for_review, reopened]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.6.0
|
|
||||||
- uses: uesteibar/reviewer-lottery@v3
|
|
||||||
with:
|
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
@ -1,112 +0,0 @@
|
||||||
name: Storybook
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
- develop
|
|
||||||
pull_request_target:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
env:
|
|
||||||
NODE_OPTIONS: "--max_old_space_size=7168"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3.6.0
|
|
||||||
if: github.event_name != 'pull_request_target'
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
- uses: actions/checkout@v3.6.0
|
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
submodules: true
|
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
- name: Checkout actual HEAD
|
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
id: rev
|
|
||||||
run: |
|
|
||||||
echo "base=$(git rev-list --parents -n1 HEAD | cut -d" " -f2)" >> $GITHUB_OUTPUT
|
|
||||||
git checkout $(git rev-list --parents -n1 HEAD | cut -d" " -f3)
|
|
||||||
- name: Install pnpm
|
|
||||||
uses: pnpm/action-setup@v2
|
|
||||||
with:
|
|
||||||
version: 8
|
|
||||||
run_install: false
|
|
||||||
- name: Use Node.js 20.x
|
|
||||||
uses: actions/setup-node@v3.8.1
|
|
||||||
with:
|
|
||||||
node-version-file: '.node-version'
|
|
||||||
cache: 'pnpm'
|
|
||||||
- run: corepack enable
|
|
||||||
- run: pnpm i --frozen-lockfile
|
|
||||||
- name: Check pnpm-lock.yaml
|
|
||||||
run: git diff --exit-code pnpm-lock.yaml
|
|
||||||
- name: Build misskey-js
|
|
||||||
run: pnpm --filter misskey-js build
|
|
||||||
- name: Build storybook
|
|
||||||
run: pnpm --filter frontend build-storybook
|
|
||||||
- name: Publish to Chromatic
|
|
||||||
if: github.event_name != 'pull_request_target' && github.ref == 'refs/heads/master'
|
|
||||||
run: pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static
|
|
||||||
env:
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
- name: Publish to Chromatic
|
|
||||||
if: github.event_name != 'pull_request_target' && github.ref != 'refs/heads/master'
|
|
||||||
id: chromatic_push
|
|
||||||
run: |
|
|
||||||
DIFF="${{ github.event.before }} HEAD"
|
|
||||||
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
|
|
||||||
DIFF="HEAD"
|
|
||||||
fi
|
|
||||||
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
|
|
||||||
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
|
|
||||||
echo "skip=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
if pnpm --filter frontend chromatic -d storybook-static $(echo "$CHROMATIC_PARAMETER"); then
|
|
||||||
echo "success=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "success=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
env:
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
- name: Publish to Chromatic
|
|
||||||
if: github.event_name == 'pull_request_target'
|
|
||||||
id: chromatic_pull_request
|
|
||||||
run: |
|
|
||||||
DIFF="${{ steps.rev.outputs.base }} HEAD"
|
|
||||||
if [ "$DIFF" = "0000000000000000000000000000000000000000 HEAD" ]; then
|
|
||||||
DIFF="HEAD"
|
|
||||||
fi
|
|
||||||
CHROMATIC_PARAMETER="$(node packages/frontend/.storybook/changes.js $(git diff-tree --no-commit-id --name-only -r $(echo "$DIFF") | xargs))"
|
|
||||||
if [ "$CHROMATIC_PARAMETER" = " --skip" ]; then
|
|
||||||
echo "skip=true" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
BRANCH="${{ github.event.pull_request.head.user.login }}:${{ github.event.pull_request.head.ref }}"
|
|
||||||
if [ "$BRANCH" = "misskey-dev:${{ github.event.pull_request.head.ref }}" ]; then
|
|
||||||
BRANCH="${{ github.event.pull_request.head.ref }}"
|
|
||||||
fi
|
|
||||||
pnpm --filter frontend chromatic --exit-once-uploaded -d storybook-static --branch-name $BRANCH $(echo "$CHROMATIC_PARAMETER")
|
|
||||||
env:
|
|
||||||
CHROMATIC_PROJECT_TOKEN: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
|
|
||||||
- name: Notify that Chromatic detects changes
|
|
||||||
uses: actions/github-script@v6.4.0
|
|
||||||
if: github.event_name != 'pull_request_target' && steps.chromatic_push.outputs.success == 'false'
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
github.rest.repos.createCommitComment({
|
|
||||||
owner: context.repo.owner,
|
|
||||||
repo: context.repo.repo,
|
|
||||||
commit_sha: context.sha,
|
|
||||||
body: 'Chromatic detects changes. Please [review the changes on Chromatic](https://www.chromatic.com/builds?appId=6428f7d7b962f0b79f97d6e4).'
|
|
||||||
})
|
|
||||||
- name: Upload Artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: storybook
|
|
||||||
path: packages/frontend/storybook-static
|
|
|
@ -1 +1 @@
|
||||||
20.5.0
|
20.5.1
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# syntax = docker/dockerfile:1.4
|
# syntax = docker/dockerfile:1.4
|
||||||
|
|
||||||
ARG NODE_VERSION=20.5.0-bullseye
|
ARG NODE_VERSION=20.5.1-bullseye
|
||||||
|
|
||||||
# build assets & compile TypeScript
|
# build assets & compile TypeScript
|
||||||
|
|
||||||
|
|
14
package.json
14
package.json
|
@ -6,7 +6,7 @@
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/misskey-dev/misskey.git"
|
"url": "https://github.com/misskey-dev/misskey.git"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@8.6.10",
|
"packageManager": "pnpm@8.7.1",
|
||||||
"workspaces": [
|
"workspaces": [
|
||||||
"packages/frontend",
|
"packages/frontend",
|
||||||
"packages/backend",
|
"packages/backend",
|
||||||
|
@ -44,23 +44,23 @@
|
||||||
"lodash": "4.17.21"
|
"lodash": "4.17.21"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"execa": "7.2.0",
|
"execa": "8.0.1",
|
||||||
"gulp": "4.0.2",
|
"gulp": "4.0.2",
|
||||||
"gulp-cssnano": "2.1.3",
|
"gulp-cssnano": "2.1.3",
|
||||||
"gulp-rename": "2.0.0",
|
"gulp-rename": "2.0.0",
|
||||||
"gulp-replace": "1.1.4",
|
"gulp-replace": "1.1.4",
|
||||||
"gulp-terser": "2.1.0",
|
"gulp-terser": "2.1.0",
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"typescript": "5.1.6"
|
"typescript": "5.2.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/gulp": "4.0.13",
|
"@types/gulp": "4.0.13",
|
||||||
"@types/gulp-rename": "2.0.2",
|
"@types/gulp-rename": "2.0.2",
|
||||||
"@typescript-eslint/eslint-plugin": "6.2.0",
|
"@typescript-eslint/eslint-plugin": "6.5.0",
|
||||||
"@typescript-eslint/parser": "6.2.0",
|
"@typescript-eslint/parser": "6.5.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "12.17.2",
|
"cypress": "13.1.0",
|
||||||
"eslint": "8.46.0",
|
"eslint": "8.48.0",
|
||||||
"start-server-and-test": "2.0.0"
|
"start-server-and-test": "2.0.0"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
|
|
|
@ -56,36 +56,36 @@
|
||||||
"utf-8-validate": "^6.0.3"
|
"utf-8-validate": "^6.0.3"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@aws-sdk/client-s3": "3.367.0",
|
"@aws-sdk/client-s3": "3.400.0",
|
||||||
"@aws-sdk/lib-storage": "3.367.0",
|
"@aws-sdk/lib-storage": "3.400.0",
|
||||||
"@aws-sdk/node-http-handler": "3.360.0",
|
"@aws-sdk/node-http-handler": "3.374.0",
|
||||||
"@bull-board/api": "5.7.1",
|
"@bull-board/api": "5.8.0",
|
||||||
"@bull-board/fastify": "5.7.1",
|
"@bull-board/fastify": "5.8.0",
|
||||||
"@bull-board/ui": "5.7.1",
|
"@bull-board/ui": "5.8.0",
|
||||||
"@discordapp/twemoji": "14.1.2",
|
"@discordapp/twemoji": "14.1.2",
|
||||||
"@fastify/accepts": "4.2.0",
|
"@fastify/accepts": "4.2.0",
|
||||||
"@fastify/cookie": "8.3.0",
|
"@fastify/cookie": "9.0.4",
|
||||||
"@fastify/cors": "8.3.0",
|
"@fastify/cors": "8.3.0",
|
||||||
"@fastify/express": "2.3.0",
|
"@fastify/express": "2.3.0",
|
||||||
"@fastify/http-proxy": "9.2.1",
|
"@fastify/http-proxy": "9.2.1",
|
||||||
"@fastify/multipart": "7.7.3",
|
"@fastify/multipart": "7.7.3",
|
||||||
"@fastify/static": "6.10.2",
|
"@fastify/static": "6.11.0",
|
||||||
"@fastify/view": "8.0.0",
|
"@fastify/view": "8.0.0",
|
||||||
"@nestjs/common": "10.1.2",
|
"@nestjs/common": "10.2.4",
|
||||||
"@nestjs/core": "10.1.2",
|
"@nestjs/core": "10.2.4",
|
||||||
"@nestjs/testing": "10.1.2",
|
"@nestjs/testing": "10.2.4",
|
||||||
"@peertube/http-signature": "1.7.0",
|
"@peertube/http-signature": "1.7.0",
|
||||||
"@sinonjs/fake-timers": "10.3.0",
|
"@sinonjs/fake-timers": "11.1.0",
|
||||||
"@swc/cli": "0.1.62",
|
"@swc/cli": "0.1.62",
|
||||||
"@swc/core": "1.3.72",
|
"@swc/core": "1.3.82",
|
||||||
"accepts": "1.3.8",
|
"accepts": "1.3.8",
|
||||||
"ajv": "8.12.0",
|
"ajv": "8.12.0",
|
||||||
"archiver": "5.3.1",
|
"archiver": "6.0.0",
|
||||||
"async-mutex": "^0.4.0",
|
"async-mutex": "0.4.0",
|
||||||
"bcryptjs": "2.4.3",
|
"bcryptjs": "2.4.3",
|
||||||
"blurhash": "2.0.5",
|
"blurhash": "2.0.5",
|
||||||
"body-parser": "1.20.2",
|
"body-parser": "1.20.2",
|
||||||
"bullmq": "4.6.3",
|
"bullmq": "4.8.0",
|
||||||
"cacheable-lookup": "7.0.0",
|
"cacheable-lookup": "7.0.0",
|
||||||
"cbor": "9.0.1",
|
"cbor": "9.0.1",
|
||||||
"chalk": "5.3.0",
|
"chalk": "5.3.0",
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
"content-disposition": "0.5.4",
|
"content-disposition": "0.5.4",
|
||||||
"date-fns": "2.30.0",
|
"date-fns": "2.30.0",
|
||||||
"deep-email-validator": "0.1.21",
|
"deep-email-validator": "0.1.21",
|
||||||
"fastify": "4.21.0",
|
"fastify": "4.22.2",
|
||||||
"feed": "4.2.2",
|
"feed": "4.2.2",
|
||||||
"file-type": "18.5.0",
|
"file-type": "18.5.0",
|
||||||
"fluent-ffmpeg": "2.1.2",
|
"fluent-ffmpeg": "2.1.2",
|
||||||
|
@ -112,9 +112,9 @@
|
||||||
"js-yaml": "4.1.0",
|
"js-yaml": "4.1.0",
|
||||||
"jsdom": "22.1.0",
|
"jsdom": "22.1.0",
|
||||||
"json5": "2.2.3",
|
"json5": "2.2.3",
|
||||||
"jsonld": "8.2.0",
|
"jsonld": "8.2.1",
|
||||||
"jsrsasign": "10.8.6",
|
"jsrsasign": "10.8.6",
|
||||||
"meilisearch": "0.33.0",
|
"meilisearch": "0.34.1",
|
||||||
"mfm-js": "0.23.3",
|
"mfm-js": "0.23.3",
|
||||||
"microformats-parser": "1.4.1",
|
"microformats-parser": "1.4.1",
|
||||||
"mime-types": "2.1.35",
|
"mime-types": "2.1.35",
|
||||||
|
@ -130,7 +130,7 @@
|
||||||
"os-utils": "0.0.14",
|
"os-utils": "0.0.14",
|
||||||
"otpauth": "9.1.4",
|
"otpauth": "9.1.4",
|
||||||
"parse5": "7.1.2",
|
"parse5": "7.1.2",
|
||||||
"pg": "8.11.1",
|
"pg": "8.11.3",
|
||||||
"pkce-challenge": "4.0.1",
|
"pkce-challenge": "4.0.1",
|
||||||
"probe-image-size": "7.2.3",
|
"probe-image-size": "7.2.3",
|
||||||
"promise-limit": "2.7.0",
|
"promise-limit": "2.7.0",
|
||||||
|
@ -140,84 +140,84 @@
|
||||||
"qrcode": "1.5.3",
|
"qrcode": "1.5.3",
|
||||||
"random-seed": "0.3.0",
|
"random-seed": "0.3.0",
|
||||||
"ratelimiter": "3.4.1",
|
"ratelimiter": "3.4.1",
|
||||||
"re2": "1.20.1",
|
"re2": "1.20.3",
|
||||||
"redis-lock": "0.1.4",
|
"redis-lock": "0.1.4",
|
||||||
"reflect-metadata": "0.1.13",
|
"reflect-metadata": "0.1.13",
|
||||||
"rename": "1.0.4",
|
"rename": "1.0.4",
|
||||||
"rss-parser": "3.13.0",
|
"rss-parser": "3.13.0",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
"sanitize-html": "2.11.0",
|
"sanitize-html": "2.11.0",
|
||||||
"sharp": "0.32.4",
|
"sharp": "0.32.5",
|
||||||
"sharp-read-bmp": "github:misskey-dev/sharp-read-bmp",
|
"sharp-read-bmp": "github:misskey-dev/sharp-read-bmp",
|
||||||
"slacc": "0.0.10",
|
"slacc": "0.0.10",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"stringz": "2.1.0",
|
"stringz": "2.1.0",
|
||||||
"summaly": "github:misskey-dev/summaly",
|
"summaly": "github:misskey-dev/summaly",
|
||||||
"systeminformation": "5.18.9",
|
"systeminformation": "5.21.4",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tmp": "0.2.1",
|
"tmp": "0.2.1",
|
||||||
"tsc-alias": "1.8.7",
|
"tsc-alias": "1.8.7",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"twemoji-parser": "14.0.0",
|
"twemoji-parser": "14.0.0",
|
||||||
"typeorm": "0.3.17",
|
"typeorm": "0.3.17",
|
||||||
"typescript": "5.1.6",
|
"typescript": "5.2.2",
|
||||||
"ulid": "2.3.0",
|
"ulid": "2.3.0",
|
||||||
"vary": "1.1.2",
|
"vary": "1.1.2",
|
||||||
"web-push": "3.6.4",
|
"web-push": "3.6.5",
|
||||||
"ws": "8.13.0",
|
"ws": "8.13.0",
|
||||||
"xev": "3.0.2"
|
"xev": "3.0.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@jest/globals": "29.6.2",
|
"@jest/globals": "29.6.4",
|
||||||
"@swc/jest": "0.2.27",
|
"@swc/jest": "0.2.29",
|
||||||
"@types/accepts": "1.3.5",
|
"@types/accepts": "1.3.5",
|
||||||
"@types/archiver": "5.3.2",
|
"@types/archiver": "5.3.2",
|
||||||
"@types/bcryptjs": "2.4.2",
|
"@types/bcryptjs": "2.4.3",
|
||||||
"@types/body-parser": "1.19.2",
|
"@types/body-parser": "1.19.2",
|
||||||
"@types/cbor": "6.0.0",
|
"@types/cbor": "6.0.0",
|
||||||
"@types/color-convert": "2.0.0",
|
"@types/color-convert": "2.0.0",
|
||||||
"@types/content-disposition": "0.5.5",
|
"@types/content-disposition": "0.5.5",
|
||||||
"@types/fluent-ffmpeg": "2.1.21",
|
"@types/fluent-ffmpeg": "2.1.21",
|
||||||
"@types/http-link-header": "1.0.3",
|
"@types/http-link-header": "1.0.3",
|
||||||
"@types/jest": "29.5.3",
|
"@types/jest": "29.5.4",
|
||||||
"@types/js-yaml": "4.0.5",
|
"@types/js-yaml": "4.0.5",
|
||||||
"@types/jsdom": "21.1.1",
|
"@types/jsdom": "21.1.2",
|
||||||
"@types/jsonld": "1.5.9",
|
"@types/jsonld": "1.5.9",
|
||||||
"@types/jsrsasign": "10.5.8",
|
"@types/jsrsasign": "10.5.8",
|
||||||
"@types/mime-types": "2.1.1",
|
"@types/mime-types": "2.1.1",
|
||||||
"@types/ms": "0.7.31",
|
"@types/ms": "0.7.31",
|
||||||
"@types/node": "20.4.5",
|
"@types/node": "20.5.9",
|
||||||
"@types/node-fetch": "3.0.3",
|
"@types/node-fetch": "3.0.3",
|
||||||
"@types/nodemailer": "6.4.9",
|
"@types/nodemailer": "6.4.9",
|
||||||
"@types/oauth": "0.9.1",
|
"@types/oauth": "0.9.2",
|
||||||
"@types/oauth2orize": "1.11.0",
|
"@types/oauth2orize": "1.11.1",
|
||||||
"@types/oauth2orize-pkce": "0.1.0",
|
"@types/oauth2orize-pkce": "0.1.0",
|
||||||
"@types/pg": "8.10.2",
|
"@types/pg": "8.10.2",
|
||||||
"@types/pug": "2.0.6",
|
"@types/pug": "2.0.6",
|
||||||
"@types/punycode": "2.1.0",
|
"@types/punycode": "2.1.0",
|
||||||
"@types/qrcode": "1.5.1",
|
"@types/qrcode": "1.5.2",
|
||||||
"@types/random-seed": "0.3.3",
|
"@types/random-seed": "0.3.3",
|
||||||
"@types/ratelimiter": "3.4.4",
|
"@types/ratelimiter": "3.4.4",
|
||||||
"@types/rename": "1.0.4",
|
"@types/rename": "1.0.4",
|
||||||
"@types/sanitize-html": "2.9.0",
|
"@types/sanitize-html": "2.9.0",
|
||||||
"@types/semver": "7.5.0",
|
"@types/semver": "7.5.1",
|
||||||
"@types/sharp": "0.32.0",
|
"@types/sharp": "0.32.0",
|
||||||
"@types/simple-oauth2": "5.0.4",
|
"@types/simple-oauth2": "5.0.4",
|
||||||
"@types/sinonjs__fake-timers": "8.1.2",
|
"@types/sinonjs__fake-timers": "8.1.2",
|
||||||
"@types/tinycolor2": "1.4.3",
|
"@types/tinycolor2": "1.4.3",
|
||||||
"@types/tmp": "0.2.3",
|
"@types/tmp": "0.2.3",
|
||||||
"@types/vary": "1.1.0",
|
"@types/vary": "1.1.0",
|
||||||
"@types/web-push": "3.3.2",
|
"@types/web-push": "3.6.0",
|
||||||
"@types/ws": "8.5.5",
|
"@types/ws": "8.5.5",
|
||||||
"@typescript-eslint/eslint-plugin": "6.2.0",
|
"@typescript-eslint/eslint-plugin": "6.5.0",
|
||||||
"@typescript-eslint/parser": "6.2.0",
|
"@typescript-eslint/parser": "6.5.0",
|
||||||
"aws-sdk-client-mock": "3.0.0",
|
"aws-sdk-client-mock": "3.0.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"eslint": "8.46.0",
|
"eslint": "8.48.0",
|
||||||
"eslint-plugin-import": "2.28.0",
|
"eslint-plugin-import": "2.28.1",
|
||||||
"execa": "7.2.0",
|
"execa": "8.0.1",
|
||||||
"jest": "29.6.2",
|
"jest": "29.6.4",
|
||||||
"jest-mock": "29.6.2",
|
"jest-mock": "29.6.3",
|
||||||
"simple-oauth2": "5.0.0"
|
"simple-oauth2": "5.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ import type { OnApplicationShutdown } from '@nestjs/common';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class MetaService implements OnApplicationShutdown {
|
export class MetaService implements OnApplicationShutdown {
|
||||||
private cache: MiMeta | undefined;
|
private cache: MiMeta | undefined;
|
||||||
private intervalId: NodeJS.Timer;
|
private intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.redisForSub)
|
@Inject(DI.redisForSub)
|
||||||
|
|
|
@ -23,7 +23,7 @@ import type { OnApplicationShutdown } from '@nestjs/common';
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ChartManagementService implements OnApplicationShutdown {
|
export class ChartManagementService implements OnApplicationShutdown {
|
||||||
private charts;
|
private charts;
|
||||||
private saveIntervalId: NodeJS.Timer;
|
private saveIntervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private federationChart: FederationChart,
|
private federationChart: FederationChart,
|
||||||
|
|
|
@ -14,7 +14,7 @@ const interval = 30 * 60 * 1000;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class JanitorService implements OnApplicationShutdown {
|
export class JanitorService implements OnApplicationShutdown {
|
||||||
private intervalId: NodeJS.Timer;
|
private intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.attestationChallengesRepository)
|
@Inject(DI.attestationChallengesRepository)
|
||||||
|
|
|
@ -19,7 +19,7 @@ const interval = 10000;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class QueueStatsService implements OnApplicationShutdown {
|
export class QueueStatsService implements OnApplicationShutdown {
|
||||||
private intervalId: NodeJS.Timer;
|
private intervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.config)
|
@Inject(DI.config)
|
||||||
|
|
|
@ -20,7 +20,7 @@ const round = (num: number) => Math.round(num * 10) / 10;
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ServerStatsService implements OnApplicationShutdown {
|
export class ServerStatsService implements OnApplicationShutdown {
|
||||||
private intervalId: NodeJS.Timer | null = null;
|
private intervalId: NodeJS.Timeout | null = null;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private metaService: MetaService,
|
private metaService: MetaService,
|
||||||
|
|
|
@ -193,7 +193,7 @@ function nothingToDo<T, V = T>(value: T): V {
|
||||||
export class MemoryKVCache<T, V = T> {
|
export class MemoryKVCache<T, V = T> {
|
||||||
public cache: Map<string, { date: number; value: V; }>;
|
public cache: Map<string, { date: number; value: V; }>;
|
||||||
private lifetime: number;
|
private lifetime: number;
|
||||||
private gcIntervalHandle: NodeJS.Timer;
|
private gcIntervalHandle: NodeJS.Timeout;
|
||||||
private toMapConverter: (value: T) => V;
|
private toMapConverter: (value: T) => V;
|
||||||
private fromMapConverter: (cached: V) => T | undefined;
|
private fromMapConverter: (cached: V) => T | undefined;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ const accessDenied = {
|
||||||
export class ApiCallService implements OnApplicationShutdown {
|
export class ApiCallService implements OnApplicationShutdown {
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
private userIpHistories: Map<MiUser['id'], Set<string>>;
|
private userIpHistories: Map<MiUser['id'], Set<string>>;
|
||||||
private userIpHistoriesClearIntervalId: NodeJS.Timer;
|
private userIpHistoriesClearIntervalId: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
@Inject(DI.userIpsRepository)
|
@Inject(DI.userIpsRepository)
|
||||||
|
|
|
@ -19,7 +19,7 @@ class UserListChannel extends Channel {
|
||||||
public static requireCredential = false;
|
public static requireCredential = false;
|
||||||
private listId: string;
|
private listId: string;
|
||||||
public listUsers: MiUser['id'][] = [];
|
public listUsers: MiUser['id'][] = [];
|
||||||
private listUsersClock: NodeJS.Timer;
|
private listUsersClock: NodeJS.Timeout;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private userListsRepository: UserListsRepository,
|
private userListsRepository: UserListsRepository,
|
||||||
|
|
|
@ -35,7 +35,7 @@ export default class Connection {
|
||||||
public userIdsWhoMeMuting: Set<string> = new Set();
|
public userIdsWhoMeMuting: Set<string> = new Set();
|
||||||
public userIdsWhoBlockingMe: Set<string> = new Set();
|
public userIdsWhoBlockingMe: Set<string> = new Set();
|
||||||
public userIdsWhoMeMutingRenotes: Set<string> = new Set();
|
public userIdsWhoMeMutingRenotes: Set<string> = new Set();
|
||||||
private fetchIntervalId: NodeJS.Timer | null = null;
|
private fetchIntervalId: NodeJS.Timeout | null = null;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private channelsService: ChannelsService,
|
private channelsService: ChannelsService,
|
||||||
|
|
|
@ -37,7 +37,6 @@ import { deepClone } from '@/misc/clone.js';
|
||||||
import { bindThis } from '@/decorators.js';
|
import { bindThis } from '@/decorators.js';
|
||||||
import { FlashEntityService } from '@/core/entities/FlashEntityService.js';
|
import { FlashEntityService } from '@/core/entities/FlashEntityService.js';
|
||||||
import { RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
import manifest from './manifest.json' assert { type: 'json' };
|
|
||||||
import { FeedService } from './FeedService.js';
|
import { FeedService } from './FeedService.js';
|
||||||
import { UrlPreviewService } from './UrlPreviewService.js';
|
import { UrlPreviewService } from './UrlPreviewService.js';
|
||||||
import { ClientLoggerService } from './ClientLoggerService.js';
|
import { ClientLoggerService } from './ClientLoggerService.js';
|
||||||
|
@ -52,6 +51,45 @@ const assets = `${_dirname}/../../../../../built/_frontend_dist_/`;
|
||||||
const swAssets = `${_dirname}/../../../../../built/_sw_dist_/`;
|
const swAssets = `${_dirname}/../../../../../built/_sw_dist_/`;
|
||||||
const viteOut = `${_dirname}/../../../../../built/_vite_/`;
|
const viteOut = `${_dirname}/../../../../../built/_vite_/`;
|
||||||
|
|
||||||
|
const manifest = {
|
||||||
|
'short_name': 'Misskey',
|
||||||
|
'name': 'Misskey',
|
||||||
|
'start_url': '/',
|
||||||
|
'display': 'standalone',
|
||||||
|
'background_color': '#313a42',
|
||||||
|
'theme_color': '#86b300',
|
||||||
|
'icons': [
|
||||||
|
{
|
||||||
|
'src': '/static-assets/icons/192.png',
|
||||||
|
'sizes': '192x192',
|
||||||
|
'type': 'image/png',
|
||||||
|
'purpose': 'maskable',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'src': '/static-assets/icons/512.png',
|
||||||
|
'sizes': '512x512',
|
||||||
|
'type': 'image/png',
|
||||||
|
'purpose': 'maskable',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'src': '/static-assets/splash.png',
|
||||||
|
'sizes': '300x300',
|
||||||
|
'type': 'image/png',
|
||||||
|
'purpose': 'any',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
'share_target': {
|
||||||
|
'action': '/share/',
|
||||||
|
'method': 'GET',
|
||||||
|
'enctype': 'application/x-www-form-urlencoded',
|
||||||
|
'params': {
|
||||||
|
'title': 'title',
|
||||||
|
'text': 'text',
|
||||||
|
'url': 'url',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class ClientServerService {
|
export class ClientServerService {
|
||||||
private logger: Logger;
|
private logger: Logger;
|
||||||
|
|
|
@ -7,15 +7,15 @@ doctype html
|
||||||
|
|
||||||
//
|
//
|
||||||
-
|
-
|
||||||
_____ _ _
|
_____ _ _
|
||||||
| |_|___ ___| |_ ___ _ _
|
| |_|___ ___| |_ ___ _ _
|
||||||
| | | | |_ -|_ -| '_| -_| | |
|
| | | | |_ -|_ -| '_| -_| | |
|
||||||
|_|_|_|_|___|___|_,_|___|_ |
|
|_|_|_|_|___|___|_,_|___|_ |
|
||||||
|___|
|
|___|
|
||||||
Thank you for using Misskey!
|
Thank you for using Misskey!
|
||||||
If you are reading this message... how about joining the development?
|
If you are reading this message... how about joining the development?
|
||||||
https://github.com/misskey-dev/misskey
|
https://github.com/misskey-dev/misskey
|
||||||
|
|
||||||
|
|
||||||
html
|
html
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ html
|
||||||
link(rel='prefetch' href=infoImageUrl)
|
link(rel='prefetch' href=infoImageUrl)
|
||||||
link(rel='prefetch' href=notFoundImageUrl)
|
link(rel='prefetch' href=notFoundImageUrl)
|
||||||
//- https://github.com/misskey-dev/misskey/issues/9842
|
//- https://github.com/misskey-dev/misskey/issues/9842
|
||||||
link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.25.0')
|
link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.32.0')
|
||||||
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
|
link(rel='modulepreload' href=`/vite/${clientEntry.file}`)
|
||||||
|
|
||||||
if !config.clientManifestExists
|
if !config.clientManifestExists
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "es2020",
|
"module": "nodenext",
|
||||||
"moduleResolution": "node16",
|
"moduleResolution": "nodenext",
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
|
|
@ -10,7 +10,7 @@ import { ModuleMocker } from 'jest-mock';
|
||||||
import { Test } from '@nestjs/testing';
|
import { Test } from '@nestjs/testing';
|
||||||
import { GlobalModule } from '@/GlobalModule.js';
|
import { GlobalModule } from '@/GlobalModule.js';
|
||||||
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
import { AnnouncementService } from '@/core/AnnouncementService.js';
|
||||||
import type { Announcement, AnnouncementsRepository, AnnouncementReadsRepository, UsersRepository, User } from '@/models/index.js';
|
import type { MiAnnouncement, AnnouncementsRepository, AnnouncementReadsRepository, UsersRepository, MiUser } from '@/models/index.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { genAid } from '@/misc/id/aid.js';
|
import { genAid } from '@/misc/id/aid.js';
|
||||||
import { CacheService } from '@/core/CacheService.js';
|
import { CacheService } from '@/core/CacheService.js';
|
||||||
|
@ -30,7 +30,7 @@ describe('AnnouncementService', () => {
|
||||||
let announcementReadsRepository: AnnouncementReadsRepository;
|
let announcementReadsRepository: AnnouncementReadsRepository;
|
||||||
let globalEventService: jest.Mocked<GlobalEventService>;
|
let globalEventService: jest.Mocked<GlobalEventService>;
|
||||||
|
|
||||||
function createUser(data: Partial<User> = {}) {
|
function createUser(data: Partial<MiUser> = {}) {
|
||||||
const un = secureRndstr(16);
|
const un = secureRndstr(16);
|
||||||
return usersRepository.insert({
|
return usersRepository.insert({
|
||||||
id: genAid(new Date()),
|
id: genAid(new Date()),
|
||||||
|
@ -42,7 +42,7 @@ describe('AnnouncementService', () => {
|
||||||
.then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
.then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
function createAnnouncement(data: Partial<Announcement> = {}) {
|
function createAnnouncement(data: Partial<MiAnnouncement> = {}) {
|
||||||
return announcementsRepository.insert({
|
return announcementsRepository.insert({
|
||||||
id: genAid(new Date()),
|
id: genAid(new Date()),
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
process.env.NODE_ENV = 'test';
|
process.env.NODE_ENV = 'test';
|
||||||
|
|
||||||
import { jest } from '@jest/globals';
|
import { jest } from '@jest/globals';
|
||||||
import { ModuleMocker } from 'jest-mock';
|
|
||||||
import { Test } from '@nestjs/testing';
|
import { Test } from '@nestjs/testing';
|
||||||
import { Redis } from 'ioredis';
|
import { Redis } from 'ioredis';
|
||||||
import { GlobalModule } from '@/GlobalModule.js';
|
import { GlobalModule } from '@/GlobalModule.js';
|
||||||
|
@ -18,7 +17,6 @@ import { UtilityService } from '@/core/UtilityService.js';
|
||||||
import { IdService } from '@/core/IdService.js';
|
import { IdService } from '@/core/IdService.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import type { TestingModule } from '@nestjs/testing';
|
import type { TestingModule } from '@nestjs/testing';
|
||||||
import type { MockFunctionMetadata } from 'jest-mock';
|
|
||||||
|
|
||||||
function mockRedis() {
|
function mockRedis() {
|
||||||
const hash = {};
|
const hash = {};
|
||||||
|
@ -35,9 +33,9 @@ describe('FetchInstanceMetadataService', () => {
|
||||||
let fetchInstanceMetadataService: jest.Mocked<FetchInstanceMetadataService>;
|
let fetchInstanceMetadataService: jest.Mocked<FetchInstanceMetadataService>;
|
||||||
let federatedInstanceService: jest.Mocked<FederatedInstanceService>;
|
let federatedInstanceService: jest.Mocked<FederatedInstanceService>;
|
||||||
let httpRequestService: jest.Mocked<HttpRequestService>;
|
let httpRequestService: jest.Mocked<HttpRequestService>;
|
||||||
let redisClient: jest.Mocked<Redis.Redis>;
|
let redisClient: jest.Mocked<Redis>;
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeEach(async () => {
|
||||||
app = await Test
|
app = await Test
|
||||||
.createTestingModule({
|
.createTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@ -64,11 +62,11 @@ describe('FetchInstanceMetadataService', () => {
|
||||||
|
|
||||||
fetchInstanceMetadataService = app.get<FetchInstanceMetadataService>(FetchInstanceMetadataService);
|
fetchInstanceMetadataService = app.get<FetchInstanceMetadataService>(FetchInstanceMetadataService);
|
||||||
federatedInstanceService = app.get<FederatedInstanceService>(FederatedInstanceService) as jest.Mocked<FederatedInstanceService>;
|
federatedInstanceService = app.get<FederatedInstanceService>(FederatedInstanceService) as jest.Mocked<FederatedInstanceService>;
|
||||||
redisClient = app.get<Redis.Redis>(DI.redis) as jest.Mocked<Redis.Redis>;
|
redisClient = app.get<Redis>(DI.redis) as jest.Mocked<Redis>;
|
||||||
httpRequestService = app.get<HttpRequestService>(HttpRequestService) as jest.Mocked<HttpRequestService>;
|
httpRequestService = app.get<HttpRequestService>(HttpRequestService) as jest.Mocked<HttpRequestService>;
|
||||||
});
|
});
|
||||||
|
|
||||||
afterAll(async () => {
|
afterEach(async () => {
|
||||||
await app.close();
|
await app.close();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -85,6 +83,7 @@ describe('FetchInstanceMetadataService', () => {
|
||||||
expect(federatedInstanceService.fetch).toHaveBeenCalledTimes(1);
|
expect(federatedInstanceService.fetch).toHaveBeenCalledTimes(1);
|
||||||
expect(httpRequestService.getJson).toHaveBeenCalled();
|
expect(httpRequestService.getJson).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Lock and don\'t update', async () => {
|
test('Lock and don\'t update', async () => {
|
||||||
redisClient.set = mockRedis();
|
redisClient.set = mockRedis();
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
|
@ -98,6 +97,7 @@ describe('FetchInstanceMetadataService', () => {
|
||||||
expect(federatedInstanceService.fetch).toHaveBeenCalledTimes(1);
|
expect(federatedInstanceService.fetch).toHaveBeenCalledTimes(1);
|
||||||
expect(httpRequestService.getJson).toHaveBeenCalledTimes(0);
|
expect(httpRequestService.getJson).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('Do nothing when lock not acquired', async () => {
|
test('Do nothing when lock not acquired', async () => {
|
||||||
redisClient.set = mockRedis();
|
redisClient.set = mockRedis();
|
||||||
federatedInstanceService.fetch.mockReturnValue({ infoUpdatedAt: { getTime: () => now - 10 * 1000 * 60 * 60 * 24 } });
|
federatedInstanceService.fetch.mockReturnValue({ infoUpdatedAt: { getTime: () => now - 10 * 1000 * 60 * 60 * 24 } });
|
||||||
|
|
|
@ -11,7 +11,7 @@ import { Test } from '@nestjs/testing';
|
||||||
import * as lolex from '@sinonjs/fake-timers';
|
import * as lolex from '@sinonjs/fake-timers';
|
||||||
import { GlobalModule } from '@/GlobalModule.js';
|
import { GlobalModule } from '@/GlobalModule.js';
|
||||||
import { RoleService } from '@/core/RoleService.js';
|
import { RoleService } from '@/core/RoleService.js';
|
||||||
import type { Role, RolesRepository, RoleAssignmentsRepository, UsersRepository, User } from '@/models/index.js';
|
import type { MiRole, RolesRepository, RoleAssignmentsRepository, UsersRepository, MiUser } from '@/models/index.js';
|
||||||
import { DI } from '@/di-symbols.js';
|
import { DI } from '@/di-symbols.js';
|
||||||
import { MetaService } from '@/core/MetaService.js';
|
import { MetaService } from '@/core/MetaService.js';
|
||||||
import { genAid } from '@/misc/id/aid.js';
|
import { genAid } from '@/misc/id/aid.js';
|
||||||
|
@ -34,7 +34,7 @@ describe('RoleService', () => {
|
||||||
let metaService: jest.Mocked<MetaService>;
|
let metaService: jest.Mocked<MetaService>;
|
||||||
let clock: lolex.InstalledClock;
|
let clock: lolex.InstalledClock;
|
||||||
|
|
||||||
function createUser(data: Partial<User> = {}) {
|
function createUser(data: Partial<MiUser> = {}) {
|
||||||
const un = secureRndstr(16);
|
const un = secureRndstr(16);
|
||||||
return usersRepository.insert({
|
return usersRepository.insert({
|
||||||
id: genAid(new Date()),
|
id: genAid(new Date()),
|
||||||
|
@ -46,7 +46,7 @@ describe('RoleService', () => {
|
||||||
.then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
.then(x => usersRepository.findOneByOrFail(x.identifiers[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
function createRole(data: Partial<Role> = {}) {
|
function createRole(data: Partial<MiRole> = {}) {
|
||||||
return rolesRepository.insert({
|
return rolesRepository.insert({
|
||||||
id: genAid(new Date()),
|
id: genAid(new Date()),
|
||||||
createdAt: new Date(),
|
createdAt: new Date(),
|
||||||
|
@ -204,7 +204,7 @@ describe('RoleService', () => {
|
||||||
createdAt: new Date(Date.now() - (1000 * 60 * 60 * 24 * 365)),
|
createdAt: new Date(Date.now() - (1000 * 60 * 60 * 24 * 365)),
|
||||||
followersCount: 10,
|
followersCount: 10,
|
||||||
});
|
});
|
||||||
const role = await createRole({
|
await createRole({
|
||||||
name: 'a',
|
name: 'a',
|
||||||
policies: {
|
policies: {
|
||||||
canManageCustomEmojis: {
|
canManageCustomEmojis: {
|
||||||
|
|
|
@ -10,8 +10,8 @@
|
||||||
"declaration": false,
|
"declaration": false,
|
||||||
"sourceMap": false,
|
"sourceMap": false,
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "ESNext",
|
"module": "nodenext",
|
||||||
"moduleResolution": "node16",
|
"moduleResolution": "nodenext",
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
"removeComments": false,
|
"removeComments": false,
|
||||||
"noLib": false,
|
"noLib": false,
|
||||||
|
@ -33,8 +33,9 @@
|
||||||
"node"
|
"node"
|
||||||
],
|
],
|
||||||
"typeRoots": [
|
"typeRoots": [
|
||||||
|
"./src/@types",
|
||||||
"./node_modules/@types",
|
"./node_modules/@types",
|
||||||
"./src/@types"
|
"./node_modules"
|
||||||
],
|
],
|
||||||
"lib": [
|
"lib": [
|
||||||
"esnext"
|
"esnext"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true" as="image" type="image/png" crossorigin="anonymous">
|
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/about-icon.png?raw=true" as="image" type="image/png" crossorigin="anonymous">
|
||||||
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true" as="image" type="image/jpeg" crossorigin="anonymous">
|
<link rel="preload" href="https://github.com/misskey-dev/misskey/blob/master/packages/frontend/assets/fedi.jpg?raw=true" as="image" type="image/jpeg" crossorigin="anonymous">
|
||||||
<link rel="stylesheet" href="https://unpkg.com/@tabler/icons-webfont@2.21.0/tabler-icons.min.css">
|
<link rel="stylesheet" href="https://unpkg.com/@tabler/icons-webfont@2.32.0/tabler-icons.min.css">
|
||||||
<link rel="stylesheet" href="https://unpkg.com/@fontsource/m-plus-rounded-1c/index.css">
|
<link rel="stylesheet" href="https://unpkg.com/@fontsource/m-plus-rounded-1c/index.css">
|
||||||
<style>
|
<style>
|
||||||
html {
|
html {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
"allowUnusedLabels": false,
|
"allowUnusedLabels": false,
|
||||||
"allowUnreachableCode": false,
|
"allowUnreachableCode": false,
|
||||||
"exactOptionalPropertyTypes": true,
|
"exactOptionalPropertyTypes": true,
|
||||||
|
"noEmitOnError": false,
|
||||||
"noFallthroughCasesInSwitch": true,
|
"noFallthroughCasesInSwitch": true,
|
||||||
"noImplicitOverride": true,
|
"noImplicitOverride": true,
|
||||||
"noImplicitReturns": true,
|
"noImplicitReturns": true,
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"watch": "vite",
|
"watch": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"",
|
"storybook-dev": "nodemon --verbose --watch src --ext \"mdx,ts,vue\" --ignore \"*.stories.ts\" --exec \"pnpm build-storybook-pre && pnpm exec storybook dev -p 6006 --ci\"",
|
||||||
"build-storybook-pre": "tsc -p .storybook && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
|
"build-storybook-pre": "(tsc -p .storybook || echo done.) && node .storybook/generate.js && node .storybook/preload-locale.js && node .storybook/preload-theme.js",
|
||||||
"build-storybook": "pnpm build-storybook-pre && storybook build",
|
"build-storybook": "pnpm build-storybook-pre && storybook build",
|
||||||
"chromatic": "chromatic",
|
"chromatic": "chromatic",
|
||||||
"test": "vitest --run",
|
"test": "vitest --run",
|
||||||
|
@ -19,26 +19,26 @@
|
||||||
"@rollup/plugin-alias": "5.0.0",
|
"@rollup/plugin-alias": "5.0.0",
|
||||||
"@rollup/plugin-json": "6.0.0",
|
"@rollup/plugin-json": "6.0.0",
|
||||||
"@rollup/plugin-replace": "5.0.2",
|
"@rollup/plugin-replace": "5.0.2",
|
||||||
"@rollup/pluginutils": "5.0.2",
|
"@rollup/pluginutils": "5.0.4",
|
||||||
"@syuilo/aiscript": "0.15.0",
|
"@syuilo/aiscript": "0.15.0",
|
||||||
"@tabler/icons-webfont": "2.30.0",
|
"@tabler/icons-webfont": "2.32.0",
|
||||||
"@vitejs/plugin-vue": "4.2.3",
|
"@vitejs/plugin-vue": "4.3.4",
|
||||||
"@vue-macros/reactivity-transform": "0.3.16",
|
"@vue-macros/reactivity-transform": "0.3.22",
|
||||||
"@vue/compiler-sfc": "3.3.4",
|
"@vue/compiler-sfc": "3.3.4",
|
||||||
"astring": "1.8.6",
|
"astring": "1.8.6",
|
||||||
"autosize": "6.0.1",
|
"autosize": "6.0.1",
|
||||||
"broadcast-channel": "5.1.0",
|
"broadcast-channel": "5.3.0",
|
||||||
"browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
|
"browser-image-resizer": "github:misskey-dev/browser-image-resizer#v2.2.1-misskey.3",
|
||||||
"buraha": "0.0.1",
|
"buraha": "0.0.1",
|
||||||
"canvas-confetti": "1.6.0",
|
"canvas-confetti": "1.6.0",
|
||||||
"chart.js": "4.3.2",
|
"chart.js": "4.4.0",
|
||||||
"chartjs-adapter-date-fns": "3.0.0",
|
"chartjs-adapter-date-fns": "3.0.0",
|
||||||
"chartjs-chart-matrix": "2.0.1",
|
"chartjs-chart-matrix": "2.0.1",
|
||||||
"chartjs-plugin-gradient": "0.6.1",
|
"chartjs-plugin-gradient": "0.6.1",
|
||||||
"chartjs-plugin-zoom": "2.0.1",
|
"chartjs-plugin-zoom": "2.0.1",
|
||||||
"chromatic": "6.19.9",
|
"chromatic": "6.24.1",
|
||||||
"compare-versions": "6.0.0",
|
"compare-versions": "6.1.0",
|
||||||
"cropperjs": "2.0.0-beta.3",
|
"cropperjs": "2.0.0-beta.4",
|
||||||
"date-fns": "2.30.0",
|
"date-fns": "2.30.0",
|
||||||
"escape-regexp": "0.0.1",
|
"escape-regexp": "0.0.1",
|
||||||
"estree-walker": "^3.0.3",
|
"estree-walker": "^3.0.3",
|
||||||
|
@ -51,92 +51,90 @@
|
||||||
"matter-js": "0.19.0",
|
"matter-js": "0.19.0",
|
||||||
"mfm-js": "0.23.3",
|
"mfm-js": "0.23.3",
|
||||||
"misskey-js": "workspace:*",
|
"misskey-js": "workspace:*",
|
||||||
"photoswipe": "5.3.8",
|
"photoswipe": "5.3.9",
|
||||||
"prismjs": "1.29.0",
|
"prismjs": "1.29.0",
|
||||||
"punycode": "2.3.0",
|
"punycode": "2.3.0",
|
||||||
"querystring": "0.2.1",
|
"querystring": "0.2.1",
|
||||||
"rollup": "3.27.0",
|
"rollup": "3.28.1",
|
||||||
"s-age": "1.1.2",
|
"s-age": "1.1.2",
|
||||||
"sanitize-html": "2.11.0",
|
"sanitize-html": "2.11.0",
|
||||||
"sass": "1.64.1",
|
"sass": "1.66.1",
|
||||||
"strict-event-emitter-types": "2.0.0",
|
"strict-event-emitter-types": "2.0.0",
|
||||||
"syuilo-password-strength": "0.0.1",
|
"syuilo-password-strength": "0.0.1",
|
||||||
"textarea-caret": "3.1.0",
|
"textarea-caret": "3.1.0",
|
||||||
"three": "0.155.0",
|
"three": "0.156.0",
|
||||||
"throttle-debounce": "5.0.0",
|
"throttle-debounce": "5.0.0",
|
||||||
"tinycolor2": "1.6.0",
|
"tinycolor2": "1.6.0",
|
||||||
"tsc-alias": "1.8.7",
|
"tsc-alias": "1.8.7",
|
||||||
"tsconfig-paths": "4.2.0",
|
"tsconfig-paths": "4.2.0",
|
||||||
"twemoji-parser": "14.0.0",
|
"twemoji-parser": "14.0.0",
|
||||||
"typescript": "5.1.6",
|
"typescript": "5.2.2",
|
||||||
"uuid": "9.0.0",
|
"uuid": "9.0.0",
|
||||||
"vanilla-tilt": "1.8.0",
|
"vanilla-tilt": "1.8.1",
|
||||||
"vite": "4.4.7",
|
"vite": "4.4.9",
|
||||||
"vue": "3.3.4",
|
"vue": "3.3.4",
|
||||||
"vue-prism-editor": "2.0.0-alpha.2",
|
"vue-prism-editor": "2.0.0-alpha.2",
|
||||||
"vuedraggable": "next"
|
"vuedraggable": "next"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@storybook/addon-actions": "7.0.27",
|
"@storybook/addon-actions": "7.4.0",
|
||||||
"@storybook/addon-essentials": "7.0.27",
|
"@storybook/addon-essentials": "7.4.0",
|
||||||
"@storybook/addon-interactions": "7.0.27",
|
"@storybook/addon-interactions": "7.4.0",
|
||||||
"@storybook/addon-links": "7.0.27",
|
"@storybook/addon-links": "7.4.0",
|
||||||
"@storybook/addon-storysource": "7.0.27",
|
"@storybook/addon-storysource": "7.4.0",
|
||||||
"@storybook/addons": "7.0.27",
|
"@storybook/addons": "7.4.0",
|
||||||
"@storybook/blocks": "7.0.27",
|
"@storybook/blocks": "7.4.0",
|
||||||
"@storybook/core-events": "7.0.27",
|
"@storybook/core-events": "7.4.0",
|
||||||
"@storybook/jest": "0.1.0",
|
"@storybook/jest": "0.2.2",
|
||||||
"@storybook/manager-api": "7.0.27",
|
"@storybook/manager-api": "7.4.0",
|
||||||
"@storybook/preview-api": "7.0.27",
|
"@storybook/preview-api": "7.4.0",
|
||||||
"@storybook/react": "7.0.27",
|
"@storybook/react": "7.4.0",
|
||||||
"@storybook/react-vite": "7.0.27",
|
"@storybook/react-vite": "7.4.0",
|
||||||
"@storybook/testing-library": "0.2.0",
|
"@storybook/testing-library": "0.2.0",
|
||||||
"@storybook/theming": "7.0.27",
|
"@storybook/theming": "7.4.0",
|
||||||
"@storybook/types": "7.0.27",
|
"@storybook/types": "7.4.0",
|
||||||
"@storybook/vue3": "7.0.27",
|
"@storybook/vue3": "7.4.0",
|
||||||
"@storybook/vue3-vite": "7.0.27",
|
"@storybook/vue3-vite": "7.4.0",
|
||||||
"@testing-library/jest-dom": "5.16.5",
|
|
||||||
"@testing-library/vue": "7.0.0",
|
"@testing-library/vue": "7.0.0",
|
||||||
"@types/escape-regexp": "0.0.1",
|
"@types/escape-regexp": "0.0.1",
|
||||||
"@types/estree": "1.0.1",
|
"@types/estree": "1.0.1",
|
||||||
"@types/gulp": "4.0.13",
|
"@types/gulp": "4.0.13",
|
||||||
"@types/gulp-rename": "2.0.2",
|
"@types/gulp-rename": "2.0.2",
|
||||||
"@types/matter-js": "0.18.5",
|
"@types/matter-js": "0.19.0",
|
||||||
"@types/micromatch": "4.0.2",
|
"@types/micromatch": "4.0.2",
|
||||||
"@types/node": "20.4.5",
|
"@types/node": "20.5.9",
|
||||||
"@types/punycode": "2.1.0",
|
"@types/punycode": "2.1.0",
|
||||||
"@types/sanitize-html": "2.9.0",
|
"@types/sanitize-html": "2.9.0",
|
||||||
"@types/testing-library__jest-dom": "5.14.9",
|
|
||||||
"@types/throttle-debounce": "5.0.0",
|
"@types/throttle-debounce": "5.0.0",
|
||||||
"@types/tinycolor2": "1.4.3",
|
"@types/tinycolor2": "1.4.3",
|
||||||
"@types/uuid": "9.0.2",
|
"@types/uuid": "9.0.3",
|
||||||
"@types/websocket": "1.0.5",
|
"@types/websocket": "1.0.6",
|
||||||
"@types/ws": "8.5.5",
|
"@types/ws": "8.5.5",
|
||||||
"@typescript-eslint/eslint-plugin": "6.2.0",
|
"@typescript-eslint/eslint-plugin": "6.5.0",
|
||||||
"@typescript-eslint/parser": "6.2.0",
|
"@typescript-eslint/parser": "6.5.0",
|
||||||
"@vitest/coverage-v8": "0.33.0",
|
"@vitest/coverage-v8": "0.34.3",
|
||||||
"@vue/runtime-core": "3.3.4",
|
"@vue/runtime-core": "3.3.4",
|
||||||
"acorn": "8.10.0",
|
"acorn": "8.10.0",
|
||||||
"cross-env": "7.0.3",
|
"cross-env": "7.0.3",
|
||||||
"cypress": "12.17.2",
|
"cypress": "13.1.0",
|
||||||
"eslint": "8.46.0",
|
"eslint": "8.48.0",
|
||||||
"eslint-plugin-import": "2.28.0",
|
"eslint-plugin-import": "2.28.1",
|
||||||
"eslint-plugin-vue": "9.16.1",
|
"eslint-plugin-vue": "9.17.0",
|
||||||
"fast-glob": "3.3.1",
|
"fast-glob": "3.3.1",
|
||||||
"happy-dom": "10.0.3",
|
"happy-dom": "10.0.3",
|
||||||
"micromatch": "4.0.5",
|
"micromatch": "4.0.5",
|
||||||
"msw": "1.2.3",
|
"msw": "1.3.0",
|
||||||
"msw-storybook-addon": "1.8.0",
|
"msw-storybook-addon": "1.8.0",
|
||||||
"nodemon": "3.0.1",
|
"nodemon": "3.0.1",
|
||||||
"prettier": "3.0.0",
|
"prettier": "3.0.3",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"start-server-and-test": "2.0.0",
|
"start-server-and-test": "2.0.0",
|
||||||
"storybook": "7.0.27",
|
"storybook": "7.4.0",
|
||||||
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
"storybook-addon-misskey-theme": "github:misskey-dev/storybook-addon-misskey-theme",
|
||||||
"summaly": "github:misskey-dev/summaly",
|
"summaly": "github:misskey-dev/summaly",
|
||||||
"vite-plugin-turbosnap": "1.0.2",
|
"vite-plugin-turbosnap": "1.0.2",
|
||||||
"vitest": "0.33.0",
|
"vitest": "0.34.3",
|
||||||
"vitest-fetch-mock": "0.2.2",
|
"vitest-fetch-mock": "0.2.2",
|
||||||
"vue-eslint-parser": "9.3.1",
|
"vue-eslint-parser": "9.3.1",
|
||||||
"vue-tsc": "1.8.8"
|
"vue-tsc": "1.8.8"
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { defineAsyncComponent, reactive, ref } from 'vue';
|
import { defineAsyncComponent, reactive, ref } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { showSuspendedDialog } from './scripts/show-suspended-dialog';
|
import { showSuspendedDialog } from './scripts/show-suspended-dialog';
|
||||||
import { i18n } from './i18n';
|
import { i18n } from './i18n';
|
||||||
import { miLocalStorage } from './local-storage';
|
import { miLocalStorage } from './local-storage';
|
||||||
|
@ -16,7 +16,7 @@ import { unisonReload, reloadChannel } from '@/scripts/unison-reload';
|
||||||
|
|
||||||
// TODO: 他のタブと永続化されたstateを同期
|
// TODO: 他のタブと永続化されたstateを同期
|
||||||
|
|
||||||
type Account = misskey.entities.MeDetailed;
|
type Account = Misskey.entities.MeDetailed;
|
||||||
|
|
||||||
const accountData = miLocalStorage.getItem('account');
|
const accountData = miLocalStorage.getItem('account');
|
||||||
|
|
||||||
|
@ -211,8 +211,8 @@ export async function login(token: Account['token'], redirect?: string) {
|
||||||
export async function openAccountMenu(opts: {
|
export async function openAccountMenu(opts: {
|
||||||
includeCurrentAccount?: boolean;
|
includeCurrentAccount?: boolean;
|
||||||
withExtraOperation: boolean;
|
withExtraOperation: boolean;
|
||||||
active?: misskey.entities.UserDetailed['id'];
|
active?: Misskey.entities.UserDetailed['id'];
|
||||||
onChoose?: (account: misskey.entities.UserDetailed) => void;
|
onChoose?: (account: Misskey.entities.UserDetailed) => void;
|
||||||
}, ev: MouseEvent) {
|
}, ev: MouseEvent) {
|
||||||
if (!$i) return;
|
if (!$i) return;
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ export async function openAccountMenu(opts: {
|
||||||
}, 'closed');
|
}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function switchAccount(account: misskey.entities.UserDetailed) {
|
async function switchAccount(account: Misskey.entities.UserDetailed) {
|
||||||
const storedAccounts = await getAccounts();
|
const storedAccounts = await getAccounts();
|
||||||
const found = storedAccounts.find(x => x.id === account.id);
|
const found = storedAccounts.find(x => x.id === account.id);
|
||||||
if (found == null) return;
|
if (found == null) return;
|
||||||
|
@ -248,7 +248,7 @@ export async function openAccountMenu(opts: {
|
||||||
const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== $i.id));
|
const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== $i.id));
|
||||||
const accountsPromise = api('users/show', { userIds: storedAccounts.map(x => x.id) });
|
const accountsPromise = api('users/show', { userIds: storedAccounts.map(x => x.id) });
|
||||||
|
|
||||||
function createItem(account: misskey.entities.UserDetailed) {
|
function createItem(account: Misskey.entities.UserDetailed) {
|
||||||
return {
|
return {
|
||||||
type: 'user' as const,
|
type: 'user' as const,
|
||||||
user: account,
|
user: account,
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { Cache } from '@/scripts/cache';
|
import { Cache } from '@/scripts/cache';
|
||||||
|
|
||||||
export const clipsCache = new Cache<misskey.entities.Clip[]>(Infinity);
|
export const clipsCache = new Cache<Misskey.entities.Clip[]>(Infinity);
|
||||||
export const rolesCache = new Cache(Infinity);
|
export const rolesCache = new Cache(Infinity);
|
||||||
export const userListsCache = new Cache<misskey.entities.UserList[]>(Infinity);
|
export const userListsCache = new Cache<Misskey.entities.UserList[]>(Infinity);
|
||||||
export const antennasCache = new Cache<misskey.entities.Antenna[]>(Infinity);
|
export const antennasCache = new Cache<Misskey.entities.Antenna[]>(Infinity);
|
||||||
|
|
|
@ -13,13 +13,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { UserLite } from 'misskey-js/built/entities';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkMention from './MkMention.vue';
|
import MkMention from './MkMention.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { host as localHost } from '@/config';
|
import { host as localHost } from '@/config';
|
||||||
import { api } from '@/os';
|
import { api } from '@/os';
|
||||||
|
|
||||||
const user = ref<UserLite>();
|
const user = ref<Misskey.entities.UserLite>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
movedTo: string; // user id
|
movedTo: string; // user id
|
||||||
|
|
|
@ -52,14 +52,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { ACHIEVEMENT_TYPES, ACHIEVEMENT_BADGES, claimAchievement } from '@/scripts/achievements';
|
import { ACHIEVEMENT_TYPES, ACHIEVEMENT_BADGES, claimAchievement } from '@/scripts/achievements';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
withLocked: boolean;
|
withLocked: boolean;
|
||||||
withDescription: boolean;
|
withDescription: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
|
|
@ -23,7 +23,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, shallowRef } from 'vue';
|
import { onMounted, shallowRef } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import MkModal from '@/components/MkModal.vue';
|
import MkModal from '@/components/MkModal.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
@ -31,7 +31,7 @@ import { i18n } from '@/i18n';
|
||||||
import { $i, updateAccount } from '@/account';
|
import { $i, updateAccount } from '@/account';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
announcement: misskey.entities.Announcement;
|
announcement: Misskey.entities.Announcement;
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { UserLite } from 'misskey-js/built/entities';
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
userIds: string[];
|
userIds: string[];
|
||||||
|
@ -24,11 +24,11 @@ const props = withDefaults(defineProps<{
|
||||||
limit: Infinity,
|
limit: Infinity,
|
||||||
});
|
});
|
||||||
|
|
||||||
const users = ref<UserLite[]>([]);
|
const users = ref<Misskey.entities.UserLite[]>([]);
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
users.value = await os.api('users/show', {
|
users.value = await os.api('users/show', {
|
||||||
userIds: props.userIds,
|
userIds: props.userIds,
|
||||||
}) as unknown as UserLite[];
|
}) as unknown as Misskey.entities.UserLite[];
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -32,7 +32,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import Cropper from 'cropperjs';
|
import Cropper from 'cropperjs';
|
||||||
import tinycolor from 'tinycolor2';
|
import tinycolor from 'tinycolor2';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
|
@ -44,13 +44,13 @@ import { i18n } from '@/i18n';
|
||||||
import { getProxiedImageUrl } from '@/scripts/media-proxy';
|
import { getProxiedImageUrl } from '@/scripts/media-proxy';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'ok', cropped: misskey.entities.DriveFile): void;
|
(ev: 'ok', cropped: Misskey.entities.DriveFile): void;
|
||||||
(ev: 'cancel'): void;
|
(ev: 'cancel'): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
file: misskey.entities.DriveFile;
|
file: Misskey.entities.DriveFile;
|
||||||
aspectRatio: number;
|
aspectRatio: number;
|
||||||
uploadFolder?: string | null;
|
uploadFolder?: string | null;
|
||||||
}>();
|
}>();
|
||||||
|
@ -62,7 +62,7 @@ let cropper: Cropper | null = null;
|
||||||
let loading = $ref(true);
|
let loading = $ref(true);
|
||||||
|
|
||||||
const ok = async () => {
|
const ok = async () => {
|
||||||
const promise = new Promise<misskey.entities.DriveFile>(async (res) => {
|
const promise = new Promise<Misskey.entities.DriveFile>(async (res) => {
|
||||||
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
const croppedCanvas = await cropper?.getCropperSelection()?.$toCanvas();
|
||||||
croppedCanvas?.toBlob(blob => {
|
croppedCanvas?.toBlob(blob => {
|
||||||
if (!blob) return;
|
if (!blob) return;
|
||||||
|
|
|
@ -12,13 +12,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { concat } from '@/scripts/array';
|
import { concat } from '@/scripts/array';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: boolean;
|
modelValue: boolean;
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
|
|
@ -9,7 +9,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkA
|
<MkA
|
||||||
v-for="file in items"
|
v-for="file in items"
|
||||||
:key="file.id"
|
:key="file.id"
|
||||||
v-tooltip.mfm="`${file.type}\n${bytes(file.size)}\n${dateString(file.createdAt)}\nby ${file.user ? '@' + Acct.toString(file.user) : 'system'}`"
|
v-tooltip.mfm="`${file.type}\n${bytes(file.size)}\n${dateString(file.createdAt)}\nby ${file.user ? '@' + Misskey.acct.toString(file.user) : 'system'}`"
|
||||||
:to="`/admin/file/${file.id}`"
|
:to="`/admin/file/${file.id}`"
|
||||||
class="file _button"
|
class="file _button"
|
||||||
>
|
>
|
||||||
|
@ -37,7 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
|
|
|
@ -23,7 +23,7 @@ import { } from 'vue';
|
||||||
import { userName } from '@/filters/user';
|
import { userName } from '@/filters/user';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
//flash: misskey.entities.Flash;
|
//flash: Misskey.entities.Flash;
|
||||||
flash: any;
|
flash: any;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -32,13 +32,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
post: misskey.entities.GalleryPost;
|
post: Misskey.entities.GalleryPost;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const hover = ref(false);
|
const hover = ref(false);
|
||||||
|
|
|
@ -15,13 +15,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkMiniChart from '@/components/MkMiniChart.vue';
|
import MkMiniChart from '@/components/MkMiniChart.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy';
|
import { getProxiedImageUrlNullable } from '@/scripts/media-proxy';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
instance: misskey.entities.Instance;
|
instance: Misskey.entities.Instance;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let chartValues = $ref<number[] | null>(null);
|
let chartValues = $ref<number[] | null>(null);
|
||||||
|
|
|
@ -59,7 +59,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||||
|
@ -67,7 +67,7 @@ import { i18n } from '@/i18n';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
invite: misskey.entities.Invite;
|
invite: Misskey.entities.Invite;
|
||||||
moderator?: boolean;
|
moderator?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -34,12 +34,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { soundConfigStore } from '@/scripts/sound';
|
import { soundConfigStore } from '@/scripts/sound';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
media: misskey.entities.DriveFile;
|
media: Misskey.entities.DriveFile;
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { getStaticImageUrl } from '@/scripts/media-proxy';
|
import { getStaticImageUrl } from '@/scripts/media-proxy';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
import ImgWithBlurhash from '@/components/MkImgWithBlurhash.vue';
|
||||||
|
@ -55,7 +55,7 @@ import * as os from '@/os';
|
||||||
import { iAmModerator } from '@/account';
|
import { iAmModerator } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
image: misskey.entities.DriveFile;
|
image: Misskey.entities.DriveFile;
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ async function getClientWidthWithCache(targetEl: HTMLElement, containerEl: HTMLE
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, onUnmounted, shallowRef } from 'vue';
|
import { onMounted, onUnmounted, shallowRef } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
import PhotoSwipeLightbox from 'photoswipe/lightbox';
|
||||||
import PhotoSwipe from 'photoswipe';
|
import PhotoSwipe from 'photoswipe';
|
||||||
import 'photoswipe/style.css';
|
import 'photoswipe/style.css';
|
||||||
|
@ -77,7 +77,7 @@ import { defaultStore } from '@/store';
|
||||||
import { getScrollContainer, getBodyScrollHeight } from '@/scripts/scroll';
|
import { getScrollContainer, getBodyScrollHeight } from '@/scripts/scroll';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
mediaList: misskey.entities.DriveFile[];
|
mediaList: Misskey.entities.DriveFile[];
|
||||||
raw?: boolean;
|
raw?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
@ -252,7 +252,7 @@ onUnmounted(() => {
|
||||||
lightbox = null;
|
lightbox = null;
|
||||||
});
|
});
|
||||||
|
|
||||||
const previewable = (file: misskey.entities.DriveFile): boolean => {
|
const previewable = (file: Misskey.entities.DriveFile): boolean => {
|
||||||
if (file.type === 'image/svg+xml') return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
if (file.type === 'image/svg+xml') return true; // svgのwebpublic/thumbnailはpngなのでtrue
|
||||||
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
// FILE_TYPE_BROWSERSAFEに適合しないものはブラウザで表示するのに不適切
|
||||||
return (file.type.startsWith('video') || file.type.startsWith('image')) && FILE_TYPE_BROWSERSAFE.includes(file.type);
|
return (file.type.startsWith('video') || file.type.startsWith('image')) && FILE_TYPE_BROWSERSAFE.includes(file.type);
|
||||||
|
|
|
@ -32,13 +32,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import bytes from '@/filters/bytes';
|
import bytes from '@/filters/bytes';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
video: misskey.entities.DriveFile;
|
video: Misskey.entities.DriveFile;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.enableDataSaverMode) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore'));
|
const hide = ref((defaultStore.state.nsfw === 'force' || defaultStore.state.enableDataSaverMode) ? true : (props.video.isSensitive && defaultStore.state.nsfw !== 'ignore'));
|
||||||
|
|
|
@ -140,7 +140,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, onMounted, ref, shallowRef, Ref, defineAsyncComponent } from 'vue';
|
import { computed, inject, onMounted, ref, shallowRef, Ref, defineAsyncComponent } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkNoteSub from '@/components/MkNoteSub.vue';
|
import MkNoteSub from '@/components/MkNoteSub.vue';
|
||||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||||
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
|
@ -173,12 +173,12 @@ import { showMovedDialog } from '@/scripts/show-moved-dialog';
|
||||||
import { shouldCollapsed } from '@/scripts/collapsed';
|
import { shouldCollapsed } from '@/scripts/collapsed';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
pinned?: boolean;
|
pinned?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const inChannel = inject('inChannel', null);
|
const inChannel = inject('inChannel', null);
|
||||||
const currentClip = inject<Ref<misskey.entities.Clip> | null>('currentClip', null);
|
const currentClip = inject<Ref<Misskey.entities.Clip> | null>('currentClip', null);
|
||||||
|
|
||||||
let note = $ref(deepClone(props.note));
|
let note = $ref(deepClone(props.note));
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ const renoteButton = shallowRef<HTMLElement>();
|
||||||
const renoteTime = shallowRef<HTMLElement>();
|
const renoteTime = shallowRef<HTMLElement>();
|
||||||
const reactButton = shallowRef<HTMLElement>();
|
const reactButton = shallowRef<HTMLElement>();
|
||||||
const clipButton = shallowRef<HTMLElement>();
|
const clipButton = shallowRef<HTMLElement>();
|
||||||
let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
|
let appearNote = $computed(() => isRenote ? note.renote as Misskey.entities.Note : note);
|
||||||
const isMyRenote = $i && ($i.id === note.userId);
|
const isMyRenote = $i && ($i.id === note.userId);
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
||||||
|
|
|
@ -141,7 +141,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, inject, onMounted, ref, shallowRef } from 'vue';
|
import { computed, inject, onMounted, ref, shallowRef } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkNoteSub from '@/components/MkNoteSub.vue';
|
import MkNoteSub from '@/components/MkNoteSub.vue';
|
||||||
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
import MkReactionsViewer from '@/components/MkReactionsViewer.vue';
|
||||||
|
@ -171,7 +171,7 @@ import MkRippleEffect from '@/components/MkRippleEffect.vue';
|
||||||
import { showMovedDialog } from '@/scripts/show-moved-dialog';
|
import { showMovedDialog } from '@/scripts/show-moved-dialog';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const inChannel = inject('inChannel', null);
|
const inChannel = inject('inChannel', null);
|
||||||
|
@ -202,7 +202,7 @@ const renoteButton = shallowRef<HTMLElement>();
|
||||||
const renoteTime = shallowRef<HTMLElement>();
|
const renoteTime = shallowRef<HTMLElement>();
|
||||||
const reactButton = shallowRef<HTMLElement>();
|
const reactButton = shallowRef<HTMLElement>();
|
||||||
const clipButton = shallowRef<HTMLElement>();
|
const clipButton = shallowRef<HTMLElement>();
|
||||||
let appearNote = $computed(() => isRenote ? note.renote as misskey.entities.Note : note);
|
let appearNote = $computed(() => isRenote ? note.renote as Misskey.entities.Note : note);
|
||||||
const isMyRenote = $i && ($i.id === note.userId);
|
const isMyRenote = $i && ($i.id === note.userId);
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
|
@ -211,8 +211,8 @@ const translation = ref(null);
|
||||||
const translating = ref(false);
|
const translating = ref(false);
|
||||||
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
const urls = appearNote.text ? extractUrlFromMfm(mfm.parse(appearNote.text)) : null;
|
||||||
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.user.instance);
|
||||||
const conversation = ref<misskey.entities.Note[]>([]);
|
const conversation = ref<Misskey.entities.Note[]>([]);
|
||||||
const replies = ref<misskey.entities.Note[]>([]);
|
const replies = ref<Misskey.entities.Note[]>([]);
|
||||||
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id);
|
const canRenote = computed(() => ['public', 'home'].includes(appearNote.visibility) || appearNote.userId === $i.id);
|
||||||
|
|
||||||
const keymap = {
|
const keymap = {
|
||||||
|
|
|
@ -30,13 +30,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { notePage } from '@/filters/note';
|
import { notePage } from '@/filters/note';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -23,14 +23,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||||
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
||||||
import MkCwButton from '@/components/MkCwButton.vue';
|
import MkCwButton from '@/components/MkCwButton.vue';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const showContent = $ref(false);
|
const showContent = $ref(false);
|
||||||
|
|
|
@ -41,7 +41,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
import MkNoteHeader from '@/components/MkNoteHeader.vue';
|
||||||
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
import MkSubNoteContent from '@/components/MkSubNoteContent.vue';
|
||||||
import MkCwButton from '@/components/MkCwButton.vue';
|
import MkCwButton from '@/components/MkCwButton.vue';
|
||||||
|
@ -54,7 +54,7 @@ import { checkWordMute } from "@/scripts/check-word-mute";
|
||||||
import { defaultStore } from "@/store";
|
import { defaultStore } from "@/store";
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
detail?: boolean;
|
detail?: boolean;
|
||||||
|
|
||||||
// how many notes are in between this one and the note being viewed in detail
|
// how many notes are in between this one and the note being viewed in detail
|
||||||
|
@ -66,7 +66,7 @@ const props = withDefaults(defineProps<{
|
||||||
const muted = ref(checkWordMute(props.note, $i, defaultStore.state.mutedWords));
|
const muted = ref(checkWordMute(props.note, $i, defaultStore.state.mutedWords));
|
||||||
|
|
||||||
let showContent = $ref(false);
|
let showContent = $ref(false);
|
||||||
let replies: misskey.entities.Note[] = $ref([]);
|
let replies: Misskey.entities.Note[] = $ref([]);
|
||||||
|
|
||||||
if (props.detail) {
|
if (props.detail) {
|
||||||
os.api('notes/children', {
|
os.api('notes/children', {
|
||||||
|
|
|
@ -101,7 +101,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, shallowRef } from 'vue';
|
import { ref, shallowRef } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||||
import XReactionTooltip from '@/components/MkReactionTooltip.vue';
|
import XReactionTooltip from '@/components/MkReactionTooltip.vue';
|
||||||
|
@ -115,7 +115,7 @@ import { useTooltip } from '@/scripts/use-tooltip';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
notification: misskey.entities.Notification;
|
notification: Misskey.entities.Notification;
|
||||||
withTime?: boolean;
|
withTime?: boolean;
|
||||||
full?: boolean;
|
full?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
|
|
|
@ -21,11 +21,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { userName } from '@/filters/user';
|
import { userName } from '@/filters/user';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
page: misskey.entities.Page;
|
page: Misskey.entities.Page;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -44,7 +44,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, watch } from 'vue';
|
import { computed, ComputedRef, isRef, nextTick, onActivated, onBeforeUnmount, onDeactivated, onMounted, ref, watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottomVisible } from '@/scripts/scroll';
|
import { onScrollTop, isTopVisible, getBodyScrollHeight, getScrollContainer, onScrollBottom, scrollToBottom, scroll, isBottomVisible } from '@/scripts/scroll';
|
||||||
import { useDocumentVisibility } from '@/scripts/use-document-visibility';
|
import { useDocumentVisibility } from '@/scripts/use-document-visibility';
|
||||||
|
@ -57,10 +57,10 @@ const SECOND_FETCH_LIMIT = 30;
|
||||||
const TOLERANCE = 16;
|
const TOLERANCE = 16;
|
||||||
const APPEAR_MINIMUM_INTERVAL = 600;
|
const APPEAR_MINIMUM_INTERVAL = 600;
|
||||||
|
|
||||||
export type Paging<E extends keyof misskey.Endpoints = keyof misskey.Endpoints> = {
|
export type Paging<E extends keyof Misskey.Endpoints = keyof Misskey.Endpoints> = {
|
||||||
endpoint: E;
|
endpoint: E;
|
||||||
limit: number;
|
limit: number;
|
||||||
params?: misskey.Endpoints[E]['req'] | ComputedRef<misskey.Endpoints[E]['req']>;
|
params?: Misskey.Endpoints[E]['req'] | ComputedRef<Misskey.Endpoints[E]['req']>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
* 検索APIのような、ページング不可なエンドポイントを利用する場合
|
||||||
|
|
|
@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { sum } from '@/scripts/array';
|
import { sum } from '@/scripts/array';
|
||||||
import { pleaseLogin } from '@/scripts/please-login';
|
import { pleaseLogin } from '@/scripts/please-login';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -36,7 +36,7 @@ import { i18n } from '@/i18n';
|
||||||
import { useInterval } from '@/scripts/use-interval';
|
import { useInterval } from '@/scripts/use-interval';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -100,10 +100,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, watch, nextTick, onMounted, defineAsyncComponent } from 'vue';
|
import { inject, watch, nextTick, onMounted, defineAsyncComponent } from 'vue';
|
||||||
import * as mfm from 'mfm-js';
|
import * as mfm from 'mfm-js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import insertTextAtCursor from 'insert-text-at-cursor';
|
import insertTextAtCursor from 'insert-text-at-cursor';
|
||||||
import { toASCII } from 'punycode/';
|
import { toASCII } from 'punycode/';
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
|
||||||
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
import MkNoteSimple from '@/components/MkNoteSimple.vue';
|
||||||
import MkNotePreview from '@/components/MkNotePreview.vue';
|
import MkNotePreview from '@/components/MkNotePreview.vue';
|
||||||
import XPostFormAttaches from '@/components/MkPostFormAttaches.vue';
|
import XPostFormAttaches from '@/components/MkPostFormAttaches.vue';
|
||||||
|
@ -129,17 +128,17 @@ import { claimAchievement } from '@/scripts/achievements';
|
||||||
const modal = inject('modal');
|
const modal = inject('modal');
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
reply?: misskey.entities.Note;
|
reply?: Misskey.entities.Note;
|
||||||
renote?: misskey.entities.Note;
|
renote?: Misskey.entities.Note;
|
||||||
channel?: misskey.entities.Channel; // TODO
|
channel?: Misskey.entities.Channel; // TODO
|
||||||
mention?: misskey.entities.User;
|
mention?: Misskey.entities.User;
|
||||||
specified?: misskey.entities.User;
|
specified?: Misskey.entities.User;
|
||||||
initialText?: string;
|
initialText?: string;
|
||||||
initialVisibility?: (typeof misskey.noteVisibilities)[number];
|
initialVisibility?: (typeof Misskey.noteVisibilities)[number];
|
||||||
initialFiles?: misskey.entities.DriveFile[];
|
initialFiles?: Misskey.entities.DriveFile[];
|
||||||
initialLocalOnly?: boolean;
|
initialLocalOnly?: boolean;
|
||||||
initialVisibleUsers?: misskey.entities.User[];
|
initialVisibleUsers?: Misskey.entities.User[];
|
||||||
initialNote?: misskey.entities.Note;
|
initialNote?: Misskey.entities.Note;
|
||||||
instant?: boolean;
|
instant?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
|
@ -175,7 +174,7 @@ let showPreview = $ref(defaultStore.state.showPreview);
|
||||||
watch($$(showPreview), () => defaultStore.set('showPreview', showPreview));
|
watch($$(showPreview), () => defaultStore.set('showPreview', showPreview));
|
||||||
let cw = $ref<string | null>(null);
|
let cw = $ref<string | null>(null);
|
||||||
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
let localOnly = $ref<boolean>(props.initialLocalOnly ?? defaultStore.state.rememberNoteVisibility ? defaultStore.state.localOnly : defaultStore.state.defaultNoteLocalOnly);
|
||||||
let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof misskey.noteVisibilities[number]);
|
let visibility = $ref(props.initialVisibility ?? (defaultStore.state.rememberNoteVisibility ? defaultStore.state.visibility : defaultStore.state.defaultNoteVisibility) as typeof Misskey.noteVisibilities[number]);
|
||||||
let visibleUsers = $ref([]);
|
let visibleUsers = $ref([]);
|
||||||
if (props.initialVisibleUsers) {
|
if (props.initialVisibleUsers) {
|
||||||
props.initialVisibleUsers.forEach(pushVisibleUser);
|
props.initialVisibleUsers.forEach(pushVisibleUser);
|
||||||
|
@ -416,7 +415,7 @@ function updateFileName(file, name) {
|
||||||
files[files.findIndex(x => x.id === file.id)].name = name;
|
files[files.findIndex(x => x.id === file.id)].name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
function replaceFile(file: misskey.entities.DriveFile, newFile: misskey.entities.DriveFile): void {
|
function replaceFile(file: Misskey.entities.DriveFile, newFile: Misskey.entities.DriveFile): void {
|
||||||
files[files.findIndex(x => x.id === file.id)] = newFile;
|
files[files.findIndex(x => x.id === file.id)] = newFile;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -516,7 +515,7 @@ function addVisibleUser() {
|
||||||
pushVisibleUser(user);
|
pushVisibleUser(user);
|
||||||
|
|
||||||
if (!text.toLowerCase().includes(`@${user.username.toLowerCase()}`)) {
|
if (!text.toLowerCase().includes(`@${user.username.toLowerCase()}`)) {
|
||||||
text = `@${Acct.toString(user)} ${text}`;
|
text = `@${Misskey.acct.toString(user)} ${text}`;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -761,7 +760,7 @@ async function post(ev?: MouseEvent) {
|
||||||
'https://youtu.be/Efrlqw8ytg4',
|
'https://youtu.be/Efrlqw8ytg4',
|
||||||
'https://www.youtube.com/watch?v=Efrlqw8ytg4',
|
'https://www.youtube.com/watch?v=Efrlqw8ytg4',
|
||||||
'https://m.youtube.com/watch?v=Efrlqw8ytg4',
|
'https://m.youtube.com/watch?v=Efrlqw8ytg4',
|
||||||
|
|
||||||
'https://youtu.be/XVCwzwxdHuA',
|
'https://youtu.be/XVCwzwxdHuA',
|
||||||
'https://www.youtube.com/watch?v=XVCwzwxdHuA',
|
'https://www.youtube.com/watch?v=XVCwzwxdHuA',
|
||||||
'https://m.youtube.com/watch?v=XVCwzwxdHuA',
|
'https://m.youtube.com/watch?v=XVCwzwxdHuA',
|
||||||
|
@ -804,7 +803,7 @@ function cancel() {
|
||||||
|
|
||||||
function insertMention() {
|
function insertMention() {
|
||||||
os.selectUser().then(user => {
|
os.selectUser().then(user => {
|
||||||
insertTextAtCursor(textareaEl, '@' + Acct.toString(user) + ' ');
|
insertTextAtCursor(textareaEl, '@' + Misskey.acct.toString(user) + ' ');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -825,7 +824,7 @@ function showActions(ev) {
|
||||||
})), ev.currentTarget ?? ev.target);
|
})), ev.currentTarget ?? ev.target);
|
||||||
}
|
}
|
||||||
|
|
||||||
let postAccount = $ref<misskey.entities.UserDetailed | null>(null);
|
let postAccount = $ref<Misskey.entities.UserDetailed | null>(null);
|
||||||
|
|
||||||
function openAccountMenu(ev: MouseEvent) {
|
function openAccountMenu(ev: MouseEvent) {
|
||||||
openAccountMenu_({
|
openAccountMenu_({
|
||||||
|
|
|
@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { defineAsyncComponent } from 'vue';
|
import { defineAsyncComponent } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
import MkDriveFileThumbnail from '@/components/MkDriveFileThumbnail.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
@ -36,9 +36,9 @@ const props = defineProps<{
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'update:modelValue', value: any[]): void;
|
(ev: 'update:modelValue', value: any[]): void;
|
||||||
(ev: 'detach', id: string): void;
|
(ev: 'detach', id: string): void;
|
||||||
(ev: 'changeSensitive', file: misskey.entities.DriveFile, isSensitive: boolean): void;
|
(ev: 'changeSensitive', file: Misskey.entities.DriveFile, isSensitive: boolean): void;
|
||||||
(ev: 'changeName', file: misskey.entities.DriveFile, newName: string): void;
|
(ev: 'changeName', file: Misskey.entities.DriveFile, newName: string): void;
|
||||||
(ev: 'replaceFile', file: misskey.entities.DriveFile, newFile: misskey.entities.DriveFile): void;
|
(ev: 'replaceFile', file: Misskey.entities.DriveFile, newFile: Misskey.entities.DriveFile): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let menuShowing = false;
|
let menuShowing = false;
|
||||||
|
@ -92,12 +92,12 @@ async function describe(file) {
|
||||||
}, 'closed');
|
}, 'closed');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function crop(file: misskey.entities.DriveFile): Promise<void> {
|
async function crop(file: Misskey.entities.DriveFile): Promise<void> {
|
||||||
const newFile = await os.cropImage(file, { aspectRatio: NaN });
|
const newFile = await os.cropImage(file, { aspectRatio: NaN });
|
||||||
emit('replaceFile', file, newFile);
|
emit('replaceFile', file, newFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
function showFileMenu(file: misskey.entities.DriveFile, ev: MouseEvent): void {
|
function showFileMenu(file: Misskey.entities.DriveFile, ev: MouseEvent): void {
|
||||||
if (menuShowing) return;
|
if (menuShowing) return;
|
||||||
|
|
||||||
const isImage = file.type.startsWith('image/');
|
const isImage = file.type.startsWith('image/');
|
||||||
|
|
|
@ -11,22 +11,22 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModal from '@/components/MkModal.vue';
|
import MkModal from '@/components/MkModal.vue';
|
||||||
import MkPostForm from '@/components/MkPostForm.vue';
|
import MkPostForm from '@/components/MkPostForm.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
reply?: misskey.entities.Note;
|
reply?: Misskey.entities.Note;
|
||||||
renote?: misskey.entities.Note;
|
renote?: Misskey.entities.Note;
|
||||||
channel?: any; // TODO
|
channel?: any; // TODO
|
||||||
mention?: misskey.entities.User;
|
mention?: Misskey.entities.User;
|
||||||
specified?: misskey.entities.User;
|
specified?: Misskey.entities.User;
|
||||||
initialText?: string;
|
initialText?: string;
|
||||||
initialVisibility?: typeof misskey.noteVisibilities;
|
initialVisibility?: typeof Misskey.noteVisibilities;
|
||||||
initialFiles?: misskey.entities.DriveFile[];
|
initialFiles?: Misskey.entities.DriveFile[];
|
||||||
initialLocalOnly?: boolean;
|
initialLocalOnly?: boolean;
|
||||||
initialVisibleUsers?: misskey.entities.User[];
|
initialVisibleUsers?: Misskey.entities.User[];
|
||||||
initialNote?: misskey.entities.Note;
|
initialNote?: Misskey.entities.Note;
|
||||||
instant?: boolean;
|
instant?: boolean;
|
||||||
fixed?: boolean;
|
fixed?: boolean;
|
||||||
autofocus?: boolean;
|
autofocus?: boolean;
|
||||||
|
|
|
@ -40,7 +40,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, watch } from 'vue';
|
import { onMounted, watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
|
@ -54,12 +54,12 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
noteId: misskey.entities.Note['id'];
|
noteId: Misskey.entities.Note['id'];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>();
|
const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
|
|
||||||
let note = $ref<misskey.entities.Note>();
|
let note = $ref<Misskey.entities.Note>();
|
||||||
let tab = $ref<string>();
|
let tab = $ref<string>();
|
||||||
let reactions = $ref<string[]>();
|
let reactions = $ref<string[]>();
|
||||||
let users = $ref();
|
let users = $ref();
|
||||||
|
|
|
@ -18,7 +18,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, onMounted, shallowRef, watch } from 'vue';
|
import { computed, onMounted, shallowRef, watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import XDetails from '@/components/MkReactionsViewer.details.vue';
|
import XDetails from '@/components/MkReactionsViewer.details.vue';
|
||||||
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
import MkReactionIcon from '@/components/MkReactionIcon.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -33,7 +33,7 @@ const props = defineProps<{
|
||||||
reaction: string;
|
reaction: string;
|
||||||
count: number;
|
count: number;
|
||||||
isInitial: boolean;
|
isInitial: boolean;
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const buttonEl = shallowRef<HTMLElement>();
|
const buttonEl = shallowRef<HTMLElement>();
|
||||||
|
|
|
@ -18,13 +18,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import XReaction from '@/components/MkReactionsViewer.reaction.vue';
|
import XReaction from '@/components/MkReactionsViewer.reaction.vue';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
maxNumber?: number;
|
maxNumber?: number;
|
||||||
}>(), {
|
}>(), {
|
||||||
maxNumber: Infinity,
|
maxNumber: Infinity,
|
||||||
|
|
|
@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
import MkUserCardMini from '@/components/MkUserCardMini.vue';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
|
@ -47,12 +47,12 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
noteId: misskey.entities.Note['id'];
|
noteId: Misskey.entities.Note['id'];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>();
|
const dialog = $shallowRef<InstanceType<typeof MkModalWindow>>();
|
||||||
|
|
||||||
let note = $ref<misskey.entities.Note>();
|
let note = $ref<Misskey.entities.Note>();
|
||||||
let renotes = $ref();
|
let renotes = $ref();
|
||||||
let users = $ref();
|
let users = $ref();
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkMediaList from '@/components/MkMediaList.vue';
|
import MkMediaList from '@/components/MkMediaList.vue';
|
||||||
import MkPoll from '@/components/MkPoll.vue';
|
import MkPoll from '@/components/MkPoll.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
@ -39,7 +39,7 @@ import { $i } from '@/account';
|
||||||
import { shouldCollapsed } from '@/scripts/collapsed';
|
import { shouldCollapsed } from '@/scripts/collapsed';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
note: misskey.entities.Note;
|
note: Misskey.entities.Note;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const isLong = shouldCollapsed(props.note);
|
const isLong = shouldCollapsed(props.note);
|
||||||
|
|
|
@ -40,7 +40,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import { permissions as kinds } from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkInput from './MkInput.vue';
|
import MkInput from './MkInput.vue';
|
||||||
import MkSwitch from './MkSwitch.vue';
|
import MkSwitch from './MkSwitch.vue';
|
||||||
import MkButton from './MkButton.vue';
|
import MkButton from './MkButton.vue';
|
||||||
|
@ -74,7 +74,7 @@ if (props.initialPermissions) {
|
||||||
permissions[kind] = true;
|
permissions[kind] = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (const kind of kinds) {
|
for (const kind of Misskey.permissions) {
|
||||||
permissions[kind] = false;
|
permissions[kind] = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
|
@ -62,7 +62,7 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkRadios from '@/components/MkRadios.vue';
|
import MkRadios from '@/components/MkRadios.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User,
|
user: Misskey.entities.User,
|
||||||
announcement?: any,
|
announcement?: any,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -15,14 +15,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import MkMiniChart from '@/components/MkMiniChart.vue';
|
import MkMiniChart from '@/components/MkMiniChart.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { acct } from '@/filters/user';
|
import { acct } from '@/filters/user';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
withChart: boolean;
|
withChart: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
withChart: true,
|
withChart: true,
|
||||||
|
|
|
@ -34,7 +34,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||||
import number from '@/filters/number';
|
import number from '@/filters/number';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
|
@ -43,7 +43,7 @@ import { $i } from '@/account';
|
||||||
import { isFfVisibleForMe } from '@/scripts/isFfVisibleForMe';
|
import { isFfVisibleForMe } from '@/scripts/isFfVisibleForMe';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: Misskey.entities.UserDetailed;
|
||||||
}>();
|
}>();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -17,11 +17,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const text = $computed(() => {
|
const text = $computed(() => {
|
||||||
|
|
|
@ -56,8 +56,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as misskey from 'misskey-js';
|
|
||||||
import MkFollowButton from '@/components/MkFollowButton.vue';
|
import MkFollowButton from '@/components/MkFollowButton.vue';
|
||||||
import { userPage } from '@/filters/user';
|
import { userPage } from '@/filters/user';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -81,7 +80,7 @@ const emit = defineEmits<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const zIndex = os.claimZIndex('middle');
|
const zIndex = os.claimZIndex('middle');
|
||||||
let user = $ref<misskey.entities.UserDetailed | null>(null);
|
let user = $ref<Misskey.entities.UserDetailed | null>(null);
|
||||||
let top = $ref(0);
|
let top = $ref(0);
|
||||||
let left = $ref(0);
|
let left = $ref(0);
|
||||||
|
|
||||||
|
@ -95,7 +94,7 @@ onMounted(() => {
|
||||||
user = props.q;
|
user = props.q;
|
||||||
} else {
|
} else {
|
||||||
const query = props.q.startsWith('@') ?
|
const query = props.q.startsWith('@') ?
|
||||||
Acct.parse(props.q.substring(1)) :
|
Misskey.acct.parse(props.q.substring(1)) :
|
||||||
{ userId: props.q };
|
{ userId: props.q };
|
||||||
|
|
||||||
os.api('users/show', query).then(res => {
|
os.api('users/show', query).then(res => {
|
||||||
|
|
|
@ -58,7 +58,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import FormSplit from '@/components/form/split.vue';
|
import FormSplit from '@/components/form/split.vue';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
|
@ -69,7 +69,7 @@ import { $i } from '@/account';
|
||||||
import { hostname } from '@/config';
|
import { hostname } from '@/config';
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'ok', selected: misskey.entities.UserDetailed): void;
|
(ev: 'ok', selected: Misskey.entities.UserDetailed): void;
|
||||||
(ev: 'cancel'): void;
|
(ev: 'cancel'): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
@ -80,9 +80,9 @@ const props = defineProps<{
|
||||||
|
|
||||||
let username = $ref('');
|
let username = $ref('');
|
||||||
let host = $ref('');
|
let host = $ref('');
|
||||||
let users: misskey.entities.UserDetailed[] = $ref([]);
|
let users: Misskey.entities.UserDetailed[] = $ref([]);
|
||||||
let recentUsers: misskey.entities.UserDetailed[] = $ref([]);
|
let recentUsers: Misskey.entities.UserDetailed[] = $ref([]);
|
||||||
let selected: misskey.entities.UserDetailed | null = $ref(null);
|
let selected: Misskey.entities.UserDetailed | null = $ref(null);
|
||||||
let dialogEl = $ref();
|
let dialogEl = $ref();
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
|
|
|
@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
@ -33,7 +33,7 @@ import { $i } from '@/account';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: Misskey.entities.UserDetailed;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const isFollowing = ref(false);
|
const isFollowing = ref(false);
|
||||||
|
|
|
@ -43,27 +43,27 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { nextTick } from 'vue';
|
import { nextTick } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModal from '@/components/MkModal.vue';
|
import MkModal from '@/components/MkModal.vue';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const modal = $shallowRef<InstanceType<typeof MkModal>>();
|
const modal = $shallowRef<InstanceType<typeof MkModal>>();
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
currentVisibility: typeof misskey.noteVisibilities[number];
|
currentVisibility: typeof Misskey.noteVisibilities[number];
|
||||||
localOnly: boolean;
|
localOnly: boolean;
|
||||||
src?: HTMLElement;
|
src?: HTMLElement;
|
||||||
}>(), {
|
}>(), {
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(ev: 'changeVisibility', v: typeof misskey.noteVisibilities[number]): void;
|
(ev: 'changeVisibility', v: typeof Misskey.noteVisibilities[number]): void;
|
||||||
(ev: 'closed'): void;
|
(ev: 'closed'): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let v = $ref(props.currentVisibility);
|
let v = $ref(props.currentVisibility);
|
||||||
|
|
||||||
function choose(visibility: typeof misskey.noteVisibilities[number]): void {
|
function choose(visibility: typeof Misskey.noteVisibilities[number]): void {
|
||||||
v = visibility;
|
v = visibility;
|
||||||
emit('changeVisibility', visibility);
|
emit('changeVisibility', visibility);
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|
|
@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import { Instance } from 'misskey-js/built/entities';
|
import * as Misskey from 'misskey-js';
|
||||||
import XTimeline from './welcome.timeline.vue';
|
import XTimeline from './welcome.timeline.vue';
|
||||||
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
import XSigninDialog from '@/components/MkSigninDialog.vue';
|
||||||
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
import XSignupDialog from '@/components/MkSignupDialog.vue';
|
||||||
|
@ -67,7 +67,7 @@ import number from '@/filters/number';
|
||||||
import MkNumber from '@/components/MkNumber.vue';
|
import MkNumber from '@/components/MkNumber.vue';
|
||||||
import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue';
|
import XActiveUsersChart from '@/components/MkVisitorDashboard.ActiveUsersChart.vue';
|
||||||
|
|
||||||
let meta = $ref<Instance>();
|
let meta = $ref<Misskey.entities.Instance>();
|
||||||
let stats = $ref(null);
|
let stats = $ref(null);
|
||||||
|
|
||||||
os.api('meta', { detail: true }).then(_meta => {
|
os.api('meta', { detail: true }).then(_meta => {
|
||||||
|
|
|
@ -15,14 +15,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import { toUnicode } from 'punycode/';
|
import { toUnicode } from 'punycode/';
|
||||||
import MkCondensedLine from './MkCondensedLine.vue';
|
import MkCondensedLine from './MkCondensedLine.vue';
|
||||||
import { host as hostRaw } from '@/config';
|
import { host as hostRaw } from '@/config';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
defineProps<{
|
defineProps<{
|
||||||
user: misskey.entities.UserDetailed;
|
user: Misskey.entities.UserDetailed;
|
||||||
detail?: boolean;
|
detail?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkImgWithBlurhash from '../MkImgWithBlurhash.vue';
|
import MkImgWithBlurhash from '../MkImgWithBlurhash.vue';
|
||||||
import MkA from './MkA.vue';
|
import MkA from './MkA.vue';
|
||||||
import { getStaticImageUrl } from '@/scripts/media-proxy';
|
import { getStaticImageUrl } from '@/scripts/media-proxy';
|
||||||
|
@ -42,7 +42,7 @@ const squareAvatars = $ref(defaultStore.state.squareAvatars);
|
||||||
const useBlurEffect = $ref(defaultStore.state.useBlurEffect);
|
const useBlurEffect = $ref(defaultStore.state.useBlurEffect);
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
target?: string | null;
|
target?: string | null;
|
||||||
link?: boolean;
|
link?: boolean;
|
||||||
preview?: boolean;
|
preview?: boolean;
|
||||||
|
|
|
@ -9,10 +9,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
nowrap?: boolean;
|
nowrap?: boolean;
|
||||||
}>(), {
|
}>(), {
|
||||||
nowrap: true,
|
nowrap: true,
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
* SPDX-License-Identifier: AGPL-3.0-only
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
import * as Misskey from 'misskey-js';
|
||||||
import { url } from '@/config';
|
import { url } from '@/config';
|
||||||
|
|
||||||
export const acct = (user: misskey.Acct) => {
|
export const acct = (user: misskey.Acct) => {
|
||||||
return Acct.toString(user);
|
return Misskey.acct.toString(user);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const userName = (user: misskey.entities.User) => {
|
export const userName = (user: Misskey.entities.User) => {
|
||||||
return user.name || user.username;
|
return user.name || user.username;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,6 @@ import MkContextMenu from '@/components/MkContextMenu.vue';
|
||||||
import { MenuItem } from '@/types/menu';
|
import { MenuItem } from '@/types/menu';
|
||||||
import copyToClipboard from './scripts/copy-to-clipboard';
|
import copyToClipboard from './scripts/copy-to-clipboard';
|
||||||
import { showMovedDialog } from './scripts/show-moved-dialog';
|
import { showMovedDialog } from './scripts/show-moved-dialog';
|
||||||
import { DriveFile } from 'misskey-js/built/entities';
|
|
||||||
|
|
||||||
export const openingWindowsCount = ref(0);
|
export const openingWindowsCount = ref(0);
|
||||||
|
|
||||||
|
@ -420,7 +419,7 @@ export async function selectUser(opts: { includeSelf?: boolean } = {}) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function selectDriveFile(multiple: boolean): Promise<DriveFile[]> {
|
export async function selectDriveFile(multiple: boolean): Promise<Misskey.entities.DriveFile[]> {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), {
|
popup(defineAsyncComponent(() => import('@/components/MkDriveSelectDialog.vue')), {
|
||||||
type: 'file',
|
type: 'file',
|
||||||
|
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import { version } from '@/config';
|
import { version } from '@/config';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -44,7 +44,7 @@ const props = withDefaults(defineProps<{
|
||||||
|
|
||||||
let loaded = $ref(false);
|
let loaded = $ref(false);
|
||||||
let serverIsDead = $ref(false);
|
let serverIsDead = $ref(false);
|
||||||
let meta = $ref<misskey.entities.LiteInstanceMetadata | null>(null);
|
let meta = $ref<Misskey.entities.LiteInstanceMetadata | null>(null);
|
||||||
|
|
||||||
os.api('meta', {
|
os.api('meta', {
|
||||||
detail: false,
|
detail: false,
|
||||||
|
|
|
@ -200,7 +200,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, defineAsyncComponent, watch } from 'vue';
|
import { computed, defineAsyncComponent, watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkChart from '@/components/MkChart.vue';
|
import MkChart from '@/components/MkChart.vue';
|
||||||
import MkObjectView from '@/components/MkObjectView.vue';
|
import MkObjectView from '@/components/MkObjectView.vue';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
|
@ -232,7 +232,7 @@ const props = withDefaults(defineProps<{
|
||||||
|
|
||||||
let tab = $ref(props.initialTab);
|
let tab = $ref(props.initialTab);
|
||||||
let chartSrc = $ref('per-user-notes');
|
let chartSrc = $ref('per-user-notes');
|
||||||
let user = $ref<null | misskey.entities.UserDetailed>();
|
let user = $ref<null | Misskey.entities.UserDetailed>();
|
||||||
let init = $ref<ReturnType<typeof createFetcher>>();
|
let init = $ref<ReturnType<typeof createFetcher>>();
|
||||||
let info = $ref();
|
let info = $ref();
|
||||||
let ips = $ref(null);
|
let ips = $ref(null);
|
||||||
|
|
|
@ -21,13 +21,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import { AuthSession } from 'misskey-js/built/entities';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
session: AuthSession;
|
session: Misskey.entities.AuthSession;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
|
@ -58,7 +58,6 @@ function accept() {
|
||||||
emit('accepted');
|
emit('accepted');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
|
|
@ -43,7 +43,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { AuthSession } from 'misskey-js/built/entities';
|
import * as Misskey from 'misskey-js';
|
||||||
import XForm from './auth.form.vue';
|
import XForm from './auth.form.vue';
|
||||||
import MkSignin from '@/components/MkSignin.vue';
|
import MkSignin from '@/components/MkSignin.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -56,7 +56,7 @@ const props = defineProps<{
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let state = $ref<'waiting' | 'accepted' | 'fetch-session-error' | 'denied' | null>(null);
|
let state = $ref<'waiting' | 'accepted' | 'fetch-session-error' | 'denied' | null>(null);
|
||||||
let session = $ref<AuthSession | null>(null);
|
let session = $ref<Misskey.entities.AuthSession | null>(null);
|
||||||
|
|
||||||
function accepted() {
|
function accepted() {
|
||||||
state = 'accepted';
|
state = 'accepted';
|
||||||
|
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch, provide } from 'vue';
|
import { computed, watch, provide } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkNotes from '@/components/MkNotes.vue';
|
import MkNotes from '@/components/MkNotes.vue';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
@ -41,7 +41,7 @@ const props = defineProps<{
|
||||||
clipId: string,
|
clipId: string,
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let clip: misskey.entities.Clip = $ref<misskey.entities.Clip>();
|
let clip: Misskey.entities.Clip = $ref<Misskey.entities.Clip>();
|
||||||
let favorited = $ref(false);
|
let favorited = $ref(false);
|
||||||
const pagination = {
|
const pagination = {
|
||||||
endpoint: 'clips/notes' as const,
|
endpoint: 'clips/notes' as const,
|
||||||
|
|
|
@ -75,7 +75,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch } from 'vue';
|
import { computed, watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkModalWindow from '@/components/MkModalWindow.vue';
|
import MkModalWindow from '@/components/MkModalWindow.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
|
@ -101,7 +101,7 @@ let isSensitive = $ref(props.emoji ? props.emoji.isSensitive : false);
|
||||||
let localOnly = $ref(props.emoji ? props.emoji.localOnly : false);
|
let localOnly = $ref(props.emoji ? props.emoji.localOnly : false);
|
||||||
let roleIdsThatCanBeUsedThisEmojiAsReaction = $ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
let roleIdsThatCanBeUsedThisEmojiAsReaction = $ref(props.emoji ? props.emoji.roleIdsThatCanBeUsedThisEmojiAsReaction : []);
|
||||||
let rolesThatCanBeUsedThisEmojiAsReaction = $ref([]);
|
let rolesThatCanBeUsedThisEmojiAsReaction = $ref([]);
|
||||||
let file = $ref<misskey.entities.DriveFile>();
|
let file = $ref<Misskey.entities.DriveFile>();
|
||||||
|
|
||||||
watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
watch($$(roleIdsThatCanBeUsedThisEmojiAsReaction), async () => {
|
||||||
rolesThatCanBeUsedThisEmojiAsReaction = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null);
|
rolesThatCanBeUsedThisEmojiAsReaction = (await Promise.all(roleIdsThatCanBeUsedThisEmojiAsReaction.map((id) => os.api('admin/roles/show', { roleId: id }).catch(() => null)))).filter(x => x != null);
|
||||||
|
|
|
@ -10,7 +10,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
|
@ -57,7 +57,7 @@ if (acct.startsWith('https://')) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
promise = os.api('users/show', Acct.parse(acct));
|
promise = os.api('users/show', Misskey.acct.parse(acct));
|
||||||
promise.then(user => {
|
promise.then(user => {
|
||||||
follow(user);
|
follow(user);
|
||||||
});
|
});
|
||||||
|
|
|
@ -117,7 +117,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkChart from '@/components/MkChart.vue';
|
import MkChart from '@/components/MkChart.vue';
|
||||||
import MkObjectView from '@/components/MkObjectView.vue';
|
import MkObjectView from '@/components/MkObjectView.vue';
|
||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
|
@ -143,8 +143,8 @@ const props = defineProps<{
|
||||||
|
|
||||||
let tab = $ref('overview');
|
let tab = $ref('overview');
|
||||||
let chartSrc = $ref('instance-requests');
|
let chartSrc = $ref('instance-requests');
|
||||||
let meta = $ref<misskey.entities.AdminInstanceMetadata | null>(null);
|
let meta = $ref<Misskey.entities.AdminInstanceMetadata | null>(null);
|
||||||
let instance = $ref<misskey.entities.Instance | null>(null);
|
let instance = $ref<Misskey.entities.Instance | null>(null);
|
||||||
let suspended = $ref(false);
|
let suspended = $ref(false);
|
||||||
let isBlocked = $ref(false);
|
let isBlocked = $ref(false);
|
||||||
let faviconUrl = $ref<string | null>(null);
|
let faviconUrl = $ref<string | null>(null);
|
||||||
|
|
|
@ -26,7 +26,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkPagination ref="pagingComponent" :pagination="pagination">
|
<MkPagination ref="pagingComponent" :pagination="pagination">
|
||||||
<template #default="{ items }">
|
<template #default="{ items }">
|
||||||
<div class="_gaps_s">
|
<div class="_gaps_s">
|
||||||
<MkInviteCode v-for="item in (items as Invite[])" :key="item.id" :invite="item" :onDeleted="deleted"/>
|
<MkInviteCode v-for="item in (items as Misskey.entities.Invite[])" :key="item.id" :invite="item" :onDeleted="deleted"/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</MkPagination>
|
</MkPagination>
|
||||||
|
@ -37,7 +37,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, shallowRef } from 'vue';
|
import { computed, ref, shallowRef } from 'vue';
|
||||||
import type { Invite } from 'misskey-js/built/entities';
|
import type * as Misskey from 'misskey-js';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
|
|
@ -48,7 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { watch } from 'vue';
|
import { watch } from 'vue';
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkTextarea from '@/components/MkTextarea.vue';
|
import MkTextarea from '@/components/MkTextarea.vue';
|
||||||
|
@ -127,7 +127,7 @@ async function deleteAntenna() {
|
||||||
function addUser() {
|
function addUser() {
|
||||||
os.selectUser().then(user => {
|
os.selectUser().then(user => {
|
||||||
users = users.trim();
|
users = users.trim();
|
||||||
users += '\n@' + Acct.toString(user as any);
|
users += '\n@' + Misskey.acct.toString(user as any);
|
||||||
users = users.trim();
|
users = users.trim();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,6 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, ref, watch } from 'vue';
|
import { computed, ref, watch } from 'vue';
|
||||||
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { mainRouter } from '@/router';
|
import { mainRouter } from '@/router';
|
||||||
|
@ -59,7 +60,6 @@ import MkSwitch from '@/components/MkSwitch.vue';
|
||||||
import MkFolder from '@/components/MkFolder.vue';
|
import MkFolder from '@/components/MkFolder.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import { userListsCache } from '@/cache';
|
import { userListsCache } from '@/cache';
|
||||||
import { UserList, UserLite } from 'misskey-js/built/entities';
|
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
const {
|
const {
|
||||||
|
@ -72,8 +72,8 @@ const props = defineProps<{
|
||||||
|
|
||||||
const FETCH_USERS_LIMIT = 20;
|
const FETCH_USERS_LIMIT = 20;
|
||||||
|
|
||||||
let list = $ref<UserList | null>(null);
|
let list = $ref<Misskey.entities.UserList | null>(null);
|
||||||
let users = $ref<UserLite[]>([]);
|
let users = $ref<Misskey.entities.UserLite[]>([]);
|
||||||
let queueUserIds = $ref<string[]>([]);
|
let queueUserIds = $ref<string[]>([]);
|
||||||
let fetching = $ref(true);
|
let fetching = $ref(true);
|
||||||
const isPublic = ref(false);
|
const isPublic = ref(false);
|
||||||
|
|
|
@ -45,7 +45,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed, watch } from 'vue';
|
import { computed, watch } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
import MkNoteDetailed from '@/components/MkNoteDetailed.vue';
|
||||||
import MkNotes from '@/components/MkNotes.vue';
|
import MkNotes from '@/components/MkNotes.vue';
|
||||||
import MkRemoteCaution from '@/components/MkRemoteCaution.vue';
|
import MkRemoteCaution from '@/components/MkRemoteCaution.vue';
|
||||||
|
@ -61,7 +61,7 @@ const props = defineProps<{
|
||||||
noteId: string;
|
noteId: string;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let note = $ref<null | misskey.entities.Note>();
|
let note = $ref<null | Misskey.entities.Note>();
|
||||||
let clips = $ref();
|
let clips = $ref();
|
||||||
let showPrev = $ref(false);
|
let showPrev = $ref(false);
|
||||||
let showNext = $ref(false);
|
let showNext = $ref(false);
|
||||||
|
|
|
@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSpacer :marginMin="20" :marginMax="28">
|
<MkSpacer :marginMin="20" :marginMax="28">
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div>{{ i18n.ts._2fa.step3Title }}</div>
|
<div>{{ i18n.ts._2fa.step3Title }}</div>
|
||||||
<MkInput v-model="token" autocomplete="one-time-code" type="number"></MkInput>
|
<MkInput v-model="token" autocomplete="one-time-code"></MkInput>
|
||||||
<div>{{ i18n.ts._2fa.step3 }}</div>
|
<div>{{ i18n.ts._2fa.step3 }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="_buttonsCenter" style="margin-top: 16px;">
|
<div class="_buttonsCenter" style="margin-top: 16px;">
|
||||||
|
|
|
@ -19,6 +19,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template #icon><i class="ti ti-shield-lock"></i></template>
|
<template #icon><i class="ti ti-shield-lock"></i></template>
|
||||||
<template #label>{{ i18n.ts.totp }}</template>
|
<template #label>{{ i18n.ts.totp }}</template>
|
||||||
<template #caption>{{ i18n.ts.totpDescription }}</template>
|
<template #caption>{{ i18n.ts.totpDescription }}</template>
|
||||||
|
<template #suffix><i v-if="$i.twoFactorEnabled" class="ti ti-check" style="color: var(--success)"></i></template>
|
||||||
|
|
||||||
<div v-if="$i.twoFactorEnabled" class="_gaps_s">
|
<div v-if="$i.twoFactorEnabled" class="_gaps_s">
|
||||||
<div v-text="i18n.ts._2fa.alreadyRegistered"/>
|
<div v-text="i18n.ts._2fa.alreadyRegistered"/>
|
||||||
|
|
|
@ -59,8 +59,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
import { toString } from 'misskey-js/built/acct';
|
import * as Misskey from 'misskey-js';
|
||||||
import { UserDetailed } from 'misskey-js/built/entities';
|
|
||||||
import FormInfo from '@/components/MkInfo.vue';
|
import FormInfo from '@/components/MkInfo.vue';
|
||||||
import MkInput from '@/components/MkInput.vue';
|
import MkInput from '@/components/MkInput.vue';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
|
@ -73,7 +72,7 @@ import { $i } from '@/account';
|
||||||
import { unisonReload } from '@/scripts/unison-reload';
|
import { unisonReload } from '@/scripts/unison-reload';
|
||||||
|
|
||||||
const moveToAccount = ref('');
|
const moveToAccount = ref('');
|
||||||
const movedTo = ref<UserDetailed>();
|
const movedTo = ref<Misskey.entities.UserDetailed>();
|
||||||
const accountAliases = ref(['']);
|
const accountAliases = ref(['']);
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
|
@ -85,7 +84,7 @@ async function init() {
|
||||||
|
|
||||||
if ($i?.alsoKnownAs && $i.alsoKnownAs.length > 0) {
|
if ($i?.alsoKnownAs && $i.alsoKnownAs.length > 0) {
|
||||||
const alsoKnownAs = await os.api('users/show', { userIds: $i.alsoKnownAs });
|
const alsoKnownAs = await os.api('users/show', { userIds: $i.alsoKnownAs });
|
||||||
accountAliases.value = (alsoKnownAs && alsoKnownAs.length > 0) ? alsoKnownAs.map(user => `@${toString(user)}`) : [''];
|
accountAliases.value = (alsoKnownAs && alsoKnownAs.length > 0) ? alsoKnownAs.map(user => `@${Misskey.acct.toString(user)}`) : [''];
|
||||||
} else {
|
} else {
|
||||||
accountAliases.value = [''];
|
accountAliases.value = [''];
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
// SPECIFICATION: https://misskey-hub.net/docs/features/share-form.html
|
// SPECIFICATION: https://misskey-hub.net/docs/features/share-form.html
|
||||||
|
|
||||||
import { } from 'vue';
|
import { } from 'vue';
|
||||||
import { noteVisibilities } from 'misskey-js';
|
|
||||||
import * as Acct from 'misskey-js/built/acct';
|
|
||||||
import * as Misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkButton from '@/components/MkButton.vue';
|
import MkButton from '@/components/MkButton.vue';
|
||||||
import MkPostForm from '@/components/MkPostForm.vue';
|
import MkPostForm from '@/components/MkPostForm.vue';
|
||||||
|
@ -45,7 +43,7 @@ import { i18n } from '@/i18n';
|
||||||
|
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const localOnlyQuery = urlParams.get('localOnly');
|
const localOnlyQuery = urlParams.get('localOnly');
|
||||||
const visibilityQuery = urlParams.get('visibility') as typeof noteVisibilities[number];
|
const visibilityQuery = urlParams.get('visibility') as typeof Misskey.noteVisibilities[number];
|
||||||
|
|
||||||
let state = $ref('fetching' as 'fetching' | 'writing' | 'posted');
|
let state = $ref('fetching' as 'fetching' | 'writing' | 'posted');
|
||||||
let title = $ref(urlParams.get('title'));
|
let title = $ref(urlParams.get('title'));
|
||||||
|
@ -54,7 +52,7 @@ const url = urlParams.get('url');
|
||||||
let initialText = $ref<string | undefined>();
|
let initialText = $ref<string | undefined>();
|
||||||
let reply = $ref<Misskey.entities.Note | undefined>();
|
let reply = $ref<Misskey.entities.Note | undefined>();
|
||||||
let renote = $ref<Misskey.entities.Note | undefined>();
|
let renote = $ref<Misskey.entities.Note | undefined>();
|
||||||
let visibility = $ref(noteVisibilities.includes(visibilityQuery) ? visibilityQuery : undefined);
|
let visibility = $ref(Misskey.noteVisibilities.includes(visibilityQuery) ? visibilityQuery : undefined);
|
||||||
let localOnly = $ref(localOnlyQuery === '0' ? false : localOnlyQuery === '1' ? true : undefined);
|
let localOnly = $ref(localOnlyQuery === '0' ? false : localOnlyQuery === '1' ? true : undefined);
|
||||||
let files = $ref([] as Misskey.entities.DriveFile[]);
|
let files = $ref([] as Misskey.entities.DriveFile[]);
|
||||||
let visibleUsers = $ref([] as Misskey.entities.User[]);
|
let visibleUsers = $ref([] as Misskey.entities.User[]);
|
||||||
|
@ -74,7 +72,7 @@ async function init() {
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
[
|
[
|
||||||
...(visibleUserIds ? visibleUserIds.split(',').map(userId => ({ userId })) : []),
|
...(visibleUserIds ? visibleUserIds.split(',').map(userId => ({ userId })) : []),
|
||||||
...(visibleAccts ? visibleAccts.split(',').map(Acct.parse) : []),
|
...(visibleAccts ? visibleAccts.split(',').map(Misskey.acct.parse) : []),
|
||||||
]
|
]
|
||||||
// TypeScriptの指示通りに変換する
|
// TypeScriptの指示通りに変換する
|
||||||
.map(q => 'username' in q ? { username: q.username, host: q.host === null ? undefined : q.host } : q)
|
.map(q => 'username' in q ? { username: q.username, host: q.host === null ? undefined : q.host } : q)
|
||||||
|
|
|
@ -11,13 +11,13 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onActivated, onDeactivated, onMounted, onUnmounted } from 'vue';
|
import { onActivated, onDeactivated, onMounted, onUnmounted } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkAchievements from '@/components/MkAchievements.vue';
|
import MkAchievements from '@/components/MkAchievements.vue';
|
||||||
import { claimAchievement } from '@/scripts/achievements';
|
import { claimAchievement } from '@/scripts/achievements';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
let timer: number | null;
|
let timer: number | null;
|
||||||
|
|
|
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { Chart, ChartDataset } from 'chart.js';
|
import { Chart, ChartDataset } from 'chart.js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import gradient from 'chartjs-plugin-gradient';
|
import gradient from 'chartjs-plugin-gradient';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
@ -29,7 +29,7 @@ import MkChartLegend from '@/components/MkChartLegend.vue';
|
||||||
initChart();
|
initChart();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
||||||
|
|
|
@ -15,7 +15,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, nextTick, watch } from 'vue';
|
import { onMounted, nextTick, watch } from 'vue';
|
||||||
import { Chart } from 'chart.js';
|
import { Chart } from 'chart.js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
import { useChartTooltip } from '@/scripts/use-chart-tooltip';
|
import { useChartTooltip } from '@/scripts/use-chart-tooltip';
|
||||||
|
@ -26,7 +26,7 @@ initChart();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
src: string;
|
src: string;
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const rootEl = $shallowRef<HTMLDivElement>(null);
|
const rootEl = $shallowRef<HTMLDivElement>(null);
|
||||||
|
|
|
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { Chart, ChartDataset } from 'chart.js';
|
import { Chart, ChartDataset } from 'chart.js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import gradient from 'chartjs-plugin-gradient';
|
import gradient from 'chartjs-plugin-gradient';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
@ -29,7 +29,7 @@ import MkChartLegend from '@/components/MkChartLegend.vue';
|
||||||
initChart();
|
initChart();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
||||||
|
|
|
@ -16,7 +16,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted } from 'vue';
|
import { onMounted } from 'vue';
|
||||||
import { Chart, ChartDataset } from 'chart.js';
|
import { Chart, ChartDataset } from 'chart.js';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import gradient from 'chartjs-plugin-gradient';
|
import gradient from 'chartjs-plugin-gradient';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
@ -29,7 +29,7 @@ import MkChartLegend from '@/components/MkChartLegend.vue';
|
||||||
initChart();
|
initChart();
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
const chartEl = $shallowRef<HTMLCanvasElement>(null);
|
||||||
|
|
|
@ -27,7 +27,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import XHeatmap from './activity.heatmap.vue';
|
import XHeatmap from './activity.heatmap.vue';
|
||||||
import XPv from './activity.pv.vue';
|
import XPv from './activity.pv.vue';
|
||||||
import XNotes from './activity.notes.vue';
|
import XNotes from './activity.notes.vue';
|
||||||
|
@ -35,7 +35,7 @@ import XFollowing from './activity.following.vue';
|
||||||
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -18,11 +18,11 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
|
@ -13,12 +13,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkFlashPreview from '@/components/MkFlashPreview.vue';
|
import MkFlashPreview from '@/components/MkFlashPreview.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const pagination = {
|
const pagination = {
|
||||||
|
|
|
@ -15,12 +15,12 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as Misskey from 'misskey-js';
|
||||||
import MkUserInfo from '@/components/MkUserInfo.vue';
|
import MkUserInfo from '@/components/MkUserInfo.vue';
|
||||||
import MkPagination from '@/components/MkPagination.vue';
|
import MkPagination from '@/components/MkPagination.vue';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
user: misskey.entities.User;
|
user: Misskey.entities.User;
|
||||||
type: 'following' | 'followers';
|
type: 'following' | 'followers';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue