This commit is contained in:
syuilo 2022-01-07 17:06:47 +09:00
parent 03206623f3
commit a8ccb5ef81
160 changed files with 11 additions and 2323 deletions

View File

@ -7,6 +7,16 @@
-->
## 12.x.x (unreleased)
### Changes
- Room機能が削除されました
- 後日別リポジトリとして復活予定です
### Improvements
### Bugfixes
## 12.101.1 (2021/12/29)
### Bugfixes

View File

@ -90,17 +90,6 @@ Misskey uses Vue(v3) as its front-end framework.
**When creating a new component, please use the Composition API (with [setup sugar](https://v3.vuejs.org/api/sfc-script-setup.html) and [ref sugar](https://github.com/vuejs/rfcs/discussions/369)) instead of the Options API.**
Some of the existing components are implemented in the Options API, but it is an old implementation. Refactors that migrate those components to the Composition API are also welcome.
## Adding MisskeyRoom items
* Use English for material, object and texture names.
* Use meter for unit of length.
* Your PR should include all source files (e.g. `.png`, `.blend`) of your models (for later editing).
* Your PR must include the glTF binary files (`.glb`) of your models.
* Add a locale key `room.furnitures.YOUR_ITEM` at [`/locales/ja-JP.yml`](/locales/ja-JP.yml).
* Add a furniture definition at [`src/client/scripts/room/furnitures.json5`](src/client/scripts/room/furnitures.json5).
If you have no experience on 3D modeling, we suggest to use the free 3DCG software [Blender](https://www.blender.org/).
You can find information on glTF 2.0 at [glTF 2.0 — Blender Manual]( https://docs.blender.org/manual/en/dev/addons/io_scene_gltf2.html).
## Notes
### How to resolve conflictions occurred at yarn.lock?

View File

@ -537,7 +537,6 @@ yourAccountSuspendedDescription: "このアカウントは、サーバーの利
menu: "メニュー"
divider: "分割線"
addItem: "項目を追加"
rooms: "ルーム"
relays: "リレー"
addRelay: "リレーの追加"
inboxUrl: "inboxのURL"
@ -1362,69 +1361,6 @@ _timelines:
social: "ソーシャル"
global: "グローバル"
_rooms:
roomOf: "{user}のルーム"
addFurniture: "家具を置く"
translate: "移動"
rotate: "回転"
exit: "戻る"
remove: "しまう"
clear: "片付け"
clearConfirm: "全ての家具をしまいますか?"
leaveConfirm: "未保存の変更があります、移動しますか?"
chooseImage: "画像を選択"
roomType: "部屋のタイプ"
carpetColor: "床の色"
_roomType:
default: "デフォルト"
washitsu: "和室"
_furnitures:
milk: "牛乳パック"
bed: "ベッド"
low-table: "ローテーブル"
desk: "デスク"
chair: "チェア"
chair2: "チェア2"
fan: "換気扇"
pc: "パソコン"
plant: "観葉植物"
plant2: "観葉植物2"
eraser: "消しゴム"
pencil: "鉛筆"
pudding: "プリン"
cardboard-box: "段ボール箱"
cardboard-box2: "段ボール箱2"
cardboard-box3: "段ボール箱3"
book: "本"
book2: "本2"
piano: "ピアノ"
facial-tissue: "ティッシュボックス"
server: "サーバー"
moon: "月"
corkboard: "コルクボード"
mousepad: "マウスパッド"
monitor: "モニター"
keyboard: "キーボード"
carpet-stripe: "カーペット(縞)"
mat: "マット"
color-box: "カラーボックス"
wall-clock: "壁掛け時計"
photoframe: "額縁"
cube: "キューブ"
tv: "テレビ"
pinguin: "ピンギン"
rubik-cube: "ルービックキューブ"
poster-h: "ポスター(横長)"
poster-v: "ポスター(縦長)"
sofa: "ソファ"
spiral: "螺旋階段"
bin: "ゴミ箱"
cup-noodle: "カップ麺"
holo-display: "ホログラフィックディスプレイ"
energy-drink: "エナジードリンク"
doll-ai: "藍ちゃん人形"
banknote: "札束"
_pages:
newPage: "ページの作成"
editPage: "ページの編集"

View File

@ -124,6 +124,7 @@ export class UserProfile {
})
public clientData: Record<string, any>;
// TODO: そのうち消す
@Column('jsonb', {
default: {},
comment: 'The room data of the User.',

View File

@ -1,160 +0,0 @@
import $ from 'cafy';
import define from '../../define';
import { ApiError } from '../../error';
import { Users, UserProfiles } from '@/models/index';
import { ID } from '@/misc/cafy-id';
import { toPunyNullable } from '@/misc/convert-host';
export const meta = {
tags: ['room'],
requireCredential: false as const,
params: {
userId: {
validator: $.optional.type(ID),
},
username: {
validator: $.optional.str,
},
host: {
validator: $.optional.nullable.str,
},
},
errors: {
noSuchUser: {
message: 'No such user.',
code: 'NO_SUCH_USER',
id: '7ad3fa3e-5e12-42f0-b23a-f3d13f10ee4b',
},
},
res: {
type: 'object' as const,
optional: false as const, nullable: false as const,
properties: {
roomType: {
type: 'string' as const,
optional: false as const, nullable: false as const,
enum: ['default', 'washitsu'],
},
furnitures: {
type: 'array' as const,
optional: false as const, nullable: false as const,
items: {
type: 'object' as const,
optional: false as const, nullable: false as const,
properties: {
id: {
type: 'string' as const,
optional: false as const, nullable: false as const,
},
type: {
type: 'string' as const,
optional: false as const, nullable: false as const,
},
props: {
type: 'object' as const,
optional: true as const, nullable: false as const,
},
position: {
type: 'object' as const,
optional: false as const, nullable: false as const,
properties: {
x: {
type: 'number' as const,
optional: false as const, nullable: false as const,
},
y: {
type: 'number' as const,
optional: false as const, nullable: false as const,
},
z: {
type: 'number' as const,
optional: false as const, nullable: false as const,
},
},
},
rotation: {
type: 'object' as const,
optional: false as const, nullable: false as const,
properties: {
x: {
type: 'number' as const,
optional: false as const, nullable: false as const,
},
y: {
type: 'number' as const,
optional: false as const, nullable: false as const,
},
z: {
type: 'number' as const,
optional: false as const, nullable: false as const,
},
},
},
},
},
},
carpetColor: {
type: 'string' as const,
optional: false as const, nullable: false as const,
format: 'hex',
example: '#85CAF0',
},
},
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, me) => {
const user = await Users.findOne(ps.userId != null
? { id: ps.userId }
: { usernameLower: ps.username!.toLowerCase(), host: toPunyNullable(ps.host) });
if (user == null) {
throw new ApiError(meta.errors.noSuchUser);
}
const profile = await UserProfiles.findOneOrFail(user.id);
if (profile.room.furnitures == null) {
await UserProfiles.update(user.id, {
room: {
furnitures: [],
...profile.room,
},
});
profile.room.furnitures = [];
}
if (profile.room.roomType == null) {
const initialType = 'default';
await UserProfiles.update(user.id, {
room: {
roomType: initialType as any,
...profile.room,
},
});
profile.room.roomType = initialType;
}
if (profile.room.carpetColor == null) {
const initialColor = '#85CAF0';
await UserProfiles.update(user.id, {
room: {
carpetColor: initialColor as any,
...profile.room,
},
});
profile.room.carpetColor = initialColor;
}
return profile.room;
});

View File

@ -1,52 +0,0 @@
import $ from 'cafy';
import { publishMainStream } from '@/services/stream';
import define from '../../define';
import { Users, UserProfiles } from '@/models/index';
export const meta = {
tags: ['room'],
requireCredential: true as const,
params: {
room: {
validator: $.obj({
furnitures: $.arr($.obj({
id: $.str,
type: $.str,
position: $.obj({
x: $.num,
y: $.num,
z: $.num,
}),
rotation: $.obj({
x: $.num,
y: $.num,
z: $.num,
}),
props: $.optional.nullable.obj(),
})),
roomType: $.str,
carpetColor: $.str,
}),
},
},
};
// eslint-disable-next-line import/no-default-export
export default define(meta, async (ps, user) => {
await UserProfiles.update(user.id, {
room: ps.room as any,
});
const iObj = await Users.pack(user.id, user, {
detail: true,
includeSecrets: true,
});
// Publish meUpdated event
publishMainStream(user.id, 'meUpdated', iObj);
// TODO: レスポンスがおかしいと思う by YuzuRyo61
return iObj;
});

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:15ccf449b85d73ef668a7742b6d1c7123c622061685644ba3acd7a179cb2abea
size 573584

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b29c807a0128c4e11e8acf2c523f8932102491a9d25fffad08ac2e46d2accdb7
size 8944

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:922de39569c278efb41ff7946be65f41db3009d63e510ff90bbeafb0cbf2e846
size 22140

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3b0018d07eb02779d2d4df30832cf5dea8093f2e7c8e192c022088b81e2309f3
size 4304

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8d1e783d043aba4d11be9098aa4e394375a517ebcf6a967d2a6dfcc064b0cfe
size 61019

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e22b6e1536524e61af923e820c646375da2e4c51a8022aa27d3cd66778c47012
size 16879

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c67916c00bbb2238fd8801bd33ddd8619aaf2f58a53da8dd5b4c096279487613
size 481784

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0a7f3e3c3716f284a89f09392f50c4a8c9988ef9905f08749c08e5e6b93d58a2
size 565404

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f70817e90861ddc17173e79986f5ac02447635c0cc6edd8eec8f8eabd685678a
size 188392

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4066cc164c9cb6d3b4aefb4a59e628cf3fb468f13263838f9b02b80af3fd6035
size 112160

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bce900486f2ec4b146ba783aa367e97ba726945cc03c55ec61cc808f9313e7fc
size 724764

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2dada764e73fa2ad36f8687bd8a723bb4975564ef7133051fdd08d25be7e8daf
size 145836

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c1df07561fce6169ae1c7eeece2a98f173f8c07dceeb9bcd29b42c8ddb4047e7
size 8336

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ce6e482349c98659b38b62bf565b47e1c0176990c8fc84920e2462edd8b52482
size 4470

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e59f36a617f6b8f7bea5a1ae7e8830a58e2cc549796a6054190523a7211d89f0
size 8332

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4f8c82f59ac0bfca0bfb10945811182749e8f34aaaa86a89d58307645b161435
size 688

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:65593e078bbb6861788cade8525b170364243780e2abf522f190691b4c87c46c
size 51612

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:17aa9c7d7ce954bca59e408cd3b3b0f7b0d31de84fd1071e960951331cf3cdb7
size 788456

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:191fc3f4da2323cce9148168e9e324f640a1143036a39b22905fa77ee98225c2
size 1700

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f3d012ad177ecb771bab7a9e746800ed09a31db9b6106632c4777a97544301a6
size 8456

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8e68dd2bcf0f4b0794b1acea8e38d8f38ff83c3c9c1ac68c3112845c3ed9cba9
size 125415

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:fc9289bebf658662e17b537f4004894861de229a0ca2b81aa47388cc18885bc6
size 725536

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c8e31e99fc62a29b493749f6b94fa46c8284e76bd758f8324ad1d617843cb1f
size 122112

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8ecc74391bdbe47b7fea3ea04dca5d19a814b0b18ede6fbc429005945081ba96
size 2920

Binary file not shown.

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:18025d82ce87b69521213214396640b416c30674c00118d4a460abc7801c32ce
size 64600

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:881e55e5ea3865aee9c25431c71333ffc676ed21b6d64353762f459942fbcc29
size 818152

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More