Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: nyaizeを無効化できるように #39

Merged
merged 4 commits into from
Nov 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
- 任意のTLを非表示にできるように https://github.com/team-shahu/misskey/pull/36
- プロフィールからアクティビティとファイルを隠せるようにする https://github.com/team-shahu/misskey/pull/37
- フォローしているユーザーなら鍵ノートでもアンテナにひっかかるように https://github.com/team-shahu/misskey/pull/38
- nyaizeを無効化できるように https://github.com/team-shahu/misskey/pull/39

## Special Thanks
- [Misskey](https://github.com/misskey-dev/misskey)
Expand Down
1 change: 1 addition & 0 deletions locales/en-US.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1342,6 +1342,7 @@ _bubbleGame:
section1: "Adjust the position and drop the object into the box."
section2: "When two objects of the same type touch each other, they will change into a different object and you score points."
section3: "The game is over when objects overflow from the box. Aim for a high score by fusing objects together while you avoid overflowing the box!"
disableNoteNyaize: "Disable nyaize"
_announcement:
forExistingUsers: "Existing users only"
forExistingUsersDescription: "This announcement will only be shown to users existing at the point of publishment if enabled. If disabled, those newly signing up after it has been posted will also see it."
Expand Down
4 changes: 4 additions & 0 deletions locales/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5423,6 +5423,10 @@ export interface Locale extends ILocale {
"section3": string;
};
};
/**
* nayizeを無効化する
*/
"disableNoteNyaize": string;
"_announcement": {
/**
* 既存ユーザーのみ
Expand Down
1 change: 1 addition & 0 deletions locales/ja-JP.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1357,6 +1357,7 @@ _bubbleGame:
section1: "位置を調整してハコにモノを落とします。"
section2: "同じ種類のモノがくっつくと別のモノに変化して、スコアが得られます。"
section3: "モノがハコからあふれるとゲームオーバーです。ハコからあふれないようにしつつモノを融合させてハイスコアを目指そう!"
disableNoteNyaize: "nayizeを無効化する"

_announcement:
forExistingUsers: "既存ユーザーのみ"
Expand Down
1 change: 1 addition & 0 deletions locales/ja-KS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1297,6 +1297,7 @@ _bubbleGame:
section1: "位置を調整してハコにモノを落とすで。"
section2: "同じもんがくっついたら別のやつになって、スコアがもらえるで。"
section3: "モノがハコからあふれたらゲームオーバーや。ハコからあふれんようにしながらモノを融合させてハイスコアを目指しいや!"
disableNoteNyaize: "nayizeしなくする"
_announcement:
forExistingUsers: "もうおるユーザーのみ"
forExistingUsersDescription: "オンにしたらこのお知らせができた時点でおる人らにだけお知らせが行くで。切ったらこの知らせが行ったあとにアカウント作った人にもちゃんとお知らせが行くで。"
Expand Down
8 changes: 6 additions & 2 deletions packages/frontend/src/components/MkPostForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@drop.stop="onDrop"
>
<header :class="$style.header">
<div :class="$style.headerLeft">
<div :class="[$style.headerLeft, {[$style.headerFixedBasis]: fixed}]">
<button v-if="!fixed" :class="$style.cancel" class="_button" @click="cancel"><i class="ti ti-x"></i></button>
<button v-click-anime v-tooltip="i18n.ts.switchAccount" :class="$style.account" class="_button" @click="openAccountMenu">
<MkAvatar :user="postAccount ?? $i" :class="$style.avatar"/>
Expand Down Expand Up @@ -1205,6 +1205,10 @@ defineExpose({
flex: 0 1 100px;
}

.headerFixedBasis {
flex-basis: 70px;
}

.cancel {
padding: 0;
font-size: 1em;
Expand Down Expand Up @@ -1439,7 +1443,7 @@ html[data-color-scheme=light] .preview {
font-size: .9em;
color: var(--MI_THEME-warn);
border-radius: 6px;
min-width: 1.6em;
min-width: 2em;
text-align: center;

&.textOver {
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/src/components/global/MkMfm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function (props: MfmProps, { emit }: { emit: SetupContext<MfmEven
//provide('linkNavigationBehavior', props.linkNavigationBehavior);

const isNote = props.isNote ?? true;
const shouldNyaize = props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat : false : false;
const shouldNyaize = defaultStore.state.disableNoteNyaize ? false : props.nyaize ? props.nyaize === 'respect' ? props.author?.isCat : false : false;

// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition
if (props.text == null || props.text === '') return;
Expand Down
3 changes: 3 additions & 0 deletions packages/frontend/src/pages/settings/general.vue
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ SPDX-License-Identifier: AGPL-3.0-only
<option value="1_1">{{ i18n.tsx.limitTo({ x: '1:1' }) }}</option>
<option value="2_3">{{ i18n.tsx.limitTo({ x: '2:3' }) }}</option>
</MkRadios>

<MkSwitch v-model="disableNoteNyaize">{{ i18n.ts.disableNoteNyaize }}<span class="_beta">{{ i18n.ts.originalFeature }}</span></MkSwitch>
</div>
</FormSection>

Expand Down Expand Up @@ -384,6 +386,7 @@ const keepScreenOn = computed(defaultStore.makeGetterSetter('keepScreenOn'));
const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline'));
const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications'));
const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect'));
const disableNoteNyaize = computed(defaultStore.makeGetterSetter('disableNoteNyaize'));
const enableHorizontalSwipe = computed(defaultStore.makeGetterSetter('enableHorizontalSwipe'));
const useNativeUIForVideoAudioPlayer = computed(defaultStore.makeGetterSetter('useNativeUIForVideoAudioPlayer'));
const alwaysConfirmFollow = computed(defaultStore.makeGetterSetter('alwaysConfirmFollow'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ const defaultStoreSaveKeys: (keyof typeof defaultStore['state'])[] = [
'hiddenPinnedNotes',
'hiddenActivity',
'hiddenFiles',
'disableNoteNyaize',
];
const coldDeviceStorageSaveKeys: (keyof typeof ColdDeviceStorage.default)[] = [
'lightTheme',
Expand Down
4 changes: 4 additions & 0 deletions packages/frontend/src/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,10 @@ export const defaultStore = markRaw(new Storage('base', {
where: 'device',
default: 'app' as 'app' | 'appWithShift' | 'native',
},
disableNoteNyaize: {
where: 'device',
default: false,
},
hideLocalTimeLine: {
where: 'device',
default: false,
Expand Down
Loading