Compare commits

..

No commits in common. "0f1fc416320187a52727774ddc828edf111a2e53" and "4007fbb8d8212f000e3959c95e306d22aa596566" have entirely different histories.

2 changed files with 8 additions and 12 deletions

View file

@ -7,10 +7,10 @@ SPDX-License-Identifier: AGPL-3.0-only
<div class="_gaps_m"> <div class="_gaps_m">
<MkSelect v-model="type"> <MkSelect v-model="type">
<option value="all">{{ i18n.ts.all }}</option> <option value="all">{{ i18n.ts.all }}</option>
<option value="following" v-if="hasSender">{{ i18n.ts.following }}</option> <option value="following">{{ i18n.ts.following }}</option>
<option value="follower" v-if="hasSender">{{ i18n.ts.followers }}</option> <option value="follower">{{ i18n.ts.followers }}</option>
<option value="mutualFollow" v-if="hasSender">{{ i18n.ts.mutualFollow }}</option> <option value="mutualFollow">{{ i18n.ts.mutualFollow }}</option>
<option value="list" v-if="hasSender">{{ i18n.ts.userList }}</option> <option value="list">{{ i18n.ts.userList }}</option>
<option value="never">{{ i18n.ts.none }}</option> <option value="never">{{ i18n.ts.none }}</option>
</MkSelect> </MkSelect>
@ -32,13 +32,10 @@ import MkSelect from '@/components/MkSelect.vue';
import MkButton from '@/components/MkButton.vue'; import MkButton from '@/components/MkButton.vue';
import { i18n } from '@/i18n.js'; import { i18n } from '@/i18n.js';
const props = withDefaults(defineProps<{ const props = defineProps<{
value: any; value: any;
userLists: Misskey.entities.UserList[]; userLists: Misskey.entities.UserList[];
hasSender: boolean; }>();
}>(), {
hasSender: true,
});
const emit = defineEmits<{ const emit = defineEmits<{
(ev: 'update', result: any): void; (ev: 'update', result: any): void;

View file

@ -21,7 +21,7 @@ SPDX-License-Identifier: AGPL-3.0-only
}} }}
</template> </template>
<XNotificationConfig :userLists="userLists" :value="$i.notificationRecieveConfig[type] ?? { type: 'all' }" :hasSender="!(notificationTypesWithoutSender.includes(type))" @update="(res) => updateReceiveConfig(type, res)"/> <XNotificationConfig :userLists="userLists" :value="$i.notificationRecieveConfig[type] ?? { type: 'all' }" @update="(res) => updateReceiveConfig(type, res)"/>
</MkFolder> </MkFolder>
</div> </div>
</FormSection> </FormSection>
@ -71,8 +71,7 @@ import { notificationTypes } from '@/const.js';
const $i = signinRequired(); const $i = signinRequired();
const nonConfigurableNotificationTypes = ['note', 'roleAssigned', 'followRequestAccepted']; const nonConfigurableNotificationTypes = ['note', 'roleAssigned', 'followRequestAccepted', 'achievementEarned'];
const notificationTypesWithoutSender = ['achievementEarned'];
const allowButton = shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>(); const allowButton = shallowRef<InstanceType<typeof MkPushNotificationAllowButton>>();
const pushRegistrationInServer = computed(() => allowButton.value?.pushRegistrationInServer); const pushRegistrationInServer = computed(() => allowButton.value?.pushRegistrationInServer);