Merge pull request #45 from lqvp/master

feat: ドライブの写真をプロフィールから見れなくする
This commit is contained in:
ひたりん 2024-10-09 12:51:25 +09:00 committed by hijiki
parent 1cd2d64536
commit 09d3449309
12 changed files with 59 additions and 11 deletions

View File

@ -1,14 +1,14 @@
# DIFFRENCE
<<<<<<< HEAD
## 2024.9.0-yami-1.3.2
## Feat
- ドライブの写真をプロフィールから見れなくする
## 2024.9.0-yami-1.3.1
## Client
- フォロー/フォロワー/アナウンス/みつける/Play/ギャラリー/チャンネル/TL/ユーザー/ノートのページをログイン必須に
- hideReactionUsersをデフォルトで有効に(未ログインユーザーからリアクションしたユーザーを隠せます)
## 2024.9.0-yami-1.3.0
## Feat
- ロールで引用通知の設定を制限出来るように
## 2024.9.0-yami-1.2.9
## Feat
- ノート数を隠せるように(連合しません)
@ -29,8 +29,6 @@
### Server
- `notes/show`, `users/notes`の認証を不要に(revert?)
=======
>>>>>>> 12828a4aa2 (Merge pull request #35 from lqvp/master)
## 2024.9.0-yami-1.2.5
### Feat
- フォロー解除時にも通知するように

View File

@ -1347,6 +1347,8 @@ scheduledNoteDelete: "Time Bomb"
noteDeletationAt: "This note will be deleted at {time}"
hideActivity: "Hide Activity"
hideActivityDescription: "This option prevents others from viewing your activity on your profile (Summary/Activity tab). Even with this option enabled, you can still view your activity from the Activity tab on your profile."
hideProfileFiles: "Hide Profile Files"
hideProfileFilesDescription: "Prevent viewing your profile files."
hideReactionUsers: "Hide Users Who Reacted"
hideReactionUsersDescription: "This option hides the list of users who reacted when hovering over the reaction and the list of users who reacted in the reactions tab on the note detail page."
hideReactionCount: "Hide Reaction Count"

8
locales/index.d.ts vendored
View File

@ -5413,6 +5413,14 @@ export interface Locale extends ILocale {
* (/)
*/
"hideActivityDescription": string;
/**
*
*/
"hideProfileFiles": string;
/**
*
*/
"hideProfileFilesDescription": string;
/**
*
*/

View File

@ -1351,6 +1351,8 @@ cannotScheduleLaterThanOneYear: "1年以上先の日時を指定することは
defaultScheduledNoteDelete: "デフォルトでノートが自己消滅するように"
hideActivity: "アクティビティを非公開にする"
hideActivityDescription: "自分のプロフィールのアクティビティ (概要/アクティビティタブ) を他人が見れないようにします。このオプションを有効にしても、自分であればプロフィールのアクティビティタブから引き続き閲覧できます。"
hideProfileFiles: "プロフィールのファイルを非公開にする"
hideProfileFilesDescription: "自分のプロフィールのファイルを見れないようにします。"
hideReactionUsers: "誰がリアクションをしたのかを非表示にする"
hideReactionUsersDescription: "リアクションをホバーした際のユーザー一覧と、ノート詳細ページのリアクションタブにあるリアクションをしたユーザー一覧を非表示にします"
hideReactionCount: "リアクション数の非表示"

View File

@ -0,0 +1,9 @@
export class FeatHideProfileFile1710146785086 {
name = 'FeatHideProfileFile1710146785086'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_profile" ADD "hideProfileFiles" boolean NOT NULL DEFAULT false`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_profile" DROP COLUMN "hideProfileFiles"`);
}
}

View File

@ -588,6 +588,7 @@ export class UserEntityService implements OnModuleInit {
pinnedPage: profile!.pinnedPageId ? this.pageEntityService.pack(profile!.pinnedPageId, me) : null,
publicReactions: this.isLocalUser(user) ? profile!.publicReactions : false, // https://github.com/misskey-dev/misskey/issues/12964
hideActivity: this.isLocalUser(user) ? profile!.hideActivity : false, //
hideProfileFiles: this.isLocalUser(user) ? profile!.hideProfileFiles : false,
followersVisibility: profile!.followersVisibility,
followingVisibility: profile!.followingVisibility,
twoFactorEnabled: profile!.twoFactorEnabled,

View File

@ -117,6 +117,11 @@ export class MiUserProfile {
})
public hideActivity: boolean;
@Column('boolean', {
default: true,
})
public hideProfileFiles: boolean;
@Column('varchar', {
length: 128, nullable: true,
})

View File

@ -373,6 +373,10 @@ export const packedUserDetailedNotMeOnlySchema = {
type: 'boolean',
nullable: false, optional: false,
},
hideProfileFiles: {
type: 'boolean',
nullable: false, optional: false,
},
followingVisibility: {
type: 'string',
nullable: false, optional: false,

View File

@ -182,6 +182,7 @@ export const paramDef = {
hideOnlineStatus: { type: 'boolean' },
publicReactions: { type: 'boolean' },
hideActivity: { type: 'boolean' },
hideProfileFiles: { type: 'boolean' },
carefulBot: { type: 'boolean' },
autoAcceptFollowed: { type: 'boolean' },
autoRejectFollowRequest: { type: 'boolean' },
@ -337,6 +338,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (typeof ps.publicReactions === 'boolean') profileUpdates.publicReactions = ps.publicReactions;
if (typeof ps.noindex === 'boolean') updates.noindex = ps.noindex;
if (typeof ps.hideActivity === 'boolean') profileUpdates.hideActivity = ps.hideActivity;
if (typeof ps.hideProfileFiles === 'boolean') profileUpdates.hideProfileFiles = ps.hideProfileFiles;
if (typeof ps.isBot === 'boolean') updates.isBot = ps.isBot;
if (typeof ps.carefulBot === 'boolean') profileUpdates.carefulBot = ps.carefulBot;
if (typeof ps.autoAcceptFollowed === 'boolean') profileUpdates.autoAcceptFollowed = ps.autoAcceptFollowed;

View File

@ -22,6 +22,11 @@ SPDX-License-Identifier: AGPL-3.0-only
<template #caption>{{ i18n.ts.hideActivityDescription }}</template>
</MkSwitch>
<MkSwitch v-model="hideProfileFiles" @update:modelValue="save()">
{{ i18n.ts.hideProfileFiles }}<span class="_beta">{{ i18n.ts.originalFeature }}</span>
<template #caption>{{ i18n.ts.hideProfileFilesDescription }}</template>
</MkSwitch>
<MkSelect v-model="followingVisibility" @update:modelValue="save()">
<template #label>{{ i18n.ts.followingVisibility }}</template>
<option value="public">{{ i18n.ts._ffVisibility.public }}</option>
@ -103,6 +108,11 @@ const isExplorable = ref($i.isExplorable);
const hideOnlineStatus = ref($i.hideOnlineStatus);
const publicReactions = ref($i.publicReactions);
const hideActivity = ref($i.hideActivity);
<<<<<<< HEAD
=======
const hideProfileFiles = ref($i.hideProfileFiles);
const notesVisibility = ref($i.notesVisibility);
>>>>>>> 57b9d89d55 (Merge pull request #45 from lqvp/master)
const followingVisibility = ref($i.followingVisibility);
const followersVisibility = ref($i.followersVisibility);
@ -122,6 +132,11 @@ function save() {
hideOnlineStatus: !!hideOnlineStatus.value,
publicReactions: !!publicReactions.value,
hideActivity: !!hideActivity.value,
<<<<<<< HEAD
=======
hideProfileFiles: !!hideProfileFiles.value,
notesVisibility: notesVisibility.value,
>>>>>>> 57b9d89d55 (Merge pull request #45 from lqvp/master)
followingVisibility: followingVisibility.value,
followersVisibility: followersVisibility.value,
});

View File

@ -126,7 +126,7 @@ SPDX-License-Identifier: AGPL-3.0-only
<MkInfo v-else-if="$i && $i.id === user.id">{{ i18n.ts.userPagePinTip }}</MkInfo>
<template v-if="narrow">
<MkLazy>
<XFiles :key="user.id" :user="user"/>
<XFiles v-if="!user.hideProfileFiles" :key="user.id" :user="user"/>
</MkLazy>
<MkLazy>
<XActivity v-if="!user.hideActivity" :key="user.id" :user="user"/>
@ -155,9 +155,9 @@ SPDX-License-Identifier: AGPL-3.0-only
</div>
</div>
<div v-if="!narrow" class="sub _gaps" style="container-type: inline-size;">
<XFiles :key="user.id" :user="user"/>
<XActivity v-if="!user.hideActivity" :key="user.id" :user="user"/>
<XListenBrainz v-if="user.listenbrainz && listenbrainzdata" :key="user.id" :user="user"/>
<XFiles v-if="!user.hideProfileFiles" :key="user.id" :user="user"/>
<XActivity v-if="!user.hideActivity" :key="user.id" :user="user"/>
</div>
</div>
<div class="background"></div>

View File

@ -3889,6 +3889,7 @@ export type components = {
pinnedPage: components['schemas']['Page'] | null;
publicReactions: boolean;
hideActivity: boolean;
hideProfileFiles: boolean;
/** @enum {string} */
followingVisibility: 'public' | 'followers' | 'private';
/** @enum {string} */
@ -20241,6 +20242,7 @@ export type operations = {
hideOnlineStatus?: boolean;
publicReactions?: boolean;
hideActivity?: boolean;
hideProfileFiles?: boolean;
carefulBot?: boolean;
autoAcceptFollowed?: boolean;
noCrawle?: boolean;