Merge remote-tracking branch 'misskey-dev/develop' into prismisskey
# Conflicts: # package.json
This commit is contained in:
commit
6e0b64bebe
35 changed files with 864 additions and 363 deletions
|
|
@ -89,6 +89,7 @@ export function userDetailed(id = 'someuserid', username = 'miskist', host = 'mi
|
|||
value: 'https://misskey-hub.net',
|
||||
},
|
||||
],
|
||||
verifiedLinks: [],
|
||||
followersCount: 1024,
|
||||
followingCount: 16,
|
||||
hasPendingFollowRequestFromYou: false,
|
||||
|
|
@ -119,6 +120,7 @@ export function userDetailed(id = 'someuserid', username = 'miskist', host = 'mi
|
|||
updatedAt: null,
|
||||
uri: null,
|
||||
url: null,
|
||||
notify: 'none',
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -59,13 +59,13 @@
|
|||
"querystring": "0.2.1",
|
||||
"rollup": "3.29.2",
|
||||
"sanitize-html": "2.11.0",
|
||||
"sass": "1.67.0",
|
||||
"sass": "1.68.0",
|
||||
"strict-event-emitter-types": "2.0.0",
|
||||
"textarea-caret": "3.1.0",
|
||||
"three": "0.156.1",
|
||||
"throttle-debounce": "5.0.0",
|
||||
"tinycolor2": "1.6.0",
|
||||
"tsc-alias": "1.8.7",
|
||||
"tsc-alias": "1.8.8",
|
||||
"tsconfig-paths": "4.2.0",
|
||||
"twemoji-parser": "14.0.0",
|
||||
"typescript": "5.2.2",
|
||||
|
|
@ -77,24 +77,24 @@
|
|||
"vuedraggable": "next"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@storybook/addon-actions": "7.4.2",
|
||||
"@storybook/addon-essentials": "7.4.2",
|
||||
"@storybook/addon-interactions": "7.4.2",
|
||||
"@storybook/addon-links": "7.4.2",
|
||||
"@storybook/addon-storysource": "7.4.2",
|
||||
"@storybook/addons": "7.4.2",
|
||||
"@storybook/blocks": "7.4.2",
|
||||
"@storybook/core-events": "7.4.2",
|
||||
"@storybook/addon-actions": "7.4.3",
|
||||
"@storybook/addon-essentials": "7.4.3",
|
||||
"@storybook/addon-interactions": "7.4.3",
|
||||
"@storybook/addon-links": "7.4.3",
|
||||
"@storybook/addon-storysource": "7.4.3",
|
||||
"@storybook/addons": "7.4.3",
|
||||
"@storybook/blocks": "7.4.3",
|
||||
"@storybook/core-events": "7.4.3",
|
||||
"@storybook/jest": "0.2.2",
|
||||
"@storybook/manager-api": "7.4.2",
|
||||
"@storybook/preview-api": "7.4.2",
|
||||
"@storybook/react": "7.4.2",
|
||||
"@storybook/react-vite": "7.4.2",
|
||||
"@storybook/manager-api": "7.4.3",
|
||||
"@storybook/preview-api": "7.4.3",
|
||||
"@storybook/react": "7.4.3",
|
||||
"@storybook/react-vite": "7.4.3",
|
||||
"@storybook/testing-library": "0.2.1",
|
||||
"@storybook/theming": "7.4.2",
|
||||
"@storybook/types": "7.4.2",
|
||||
"@storybook/vue3": "7.4.2",
|
||||
"@storybook/vue3-vite": "7.4.2",
|
||||
"@storybook/theming": "7.4.3",
|
||||
"@storybook/types": "7.4.3",
|
||||
"@storybook/vue3": "7.4.3",
|
||||
"@storybook/vue3-vite": "7.4.3",
|
||||
"@testing-library/vue": "7.0.0",
|
||||
"@types/escape-regexp": "0.0.1",
|
||||
"@types/estree": "1.0.1",
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div ref="elRef" :class="$style.root">
|
||||
<div :class="$style.head">
|
||||
<MkAvatar v-if="notification.type === 'pollEnded'" :class="$style.icon" :user="notification.note.user" link preview/>
|
||||
<MkAvatar v-else-if="notification.type === 'note'" :class="$style.icon" :user="notification.note.user" link preview/>
|
||||
<MkAvatar v-else-if="notification.type === 'achievementEarned'" :class="$style.icon" :user="$i" link preview/>
|
||||
<img v-else-if="notification.type === 'test'" :class="$style.icon" :src="infoImageUrl"/>
|
||||
<MkAvatar v-else-if="notification.user" :class="$style.icon" :user="notification.user" link preview/>
|
||||
|
|
@ -47,6 +48,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<div :class="$style.tail">
|
||||
<header :class="$style.header">
|
||||
<span v-if="notification.type === 'pollEnded'">{{ i18n.ts._notification.pollEnded }}</span>
|
||||
<span v-else-if="notification.type === 'note'">{{ i18n.ts._notification.newNote }}: {{ notification.note.user.name ?? notification.note.user.username }}</span>
|
||||
<span v-else-if="notification.type === 'achievementEarned'">{{ i18n.ts._notification.achievementEarned }}</span>
|
||||
<span v-else-if="notification.type === 'test'">{{ i18n.ts._notification.testNotification }}</span>
|
||||
<MkA v-else-if="notification.user" v-user-preview="notification.user.id" :class="$style.headerName" :to="userPage(notification.user)"><MkUserName :user="notification.user"/></MkA>
|
||||
|
|
@ -73,6 +75,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<MkA v-else-if="notification.type === 'quote'" :class="$style.text" :to="notePage(notification.note)" :title="getNoteSummary(notification.note)">
|
||||
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="true" :author="notification.note.user"/>
|
||||
</MkA>
|
||||
<MkA v-else-if="notification.type === 'note'" :class="$style.text" :to="notePage(notification.note)" :title="getNoteSummary(notification.note)">
|
||||
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="true" :author="notification.note.user"/>
|
||||
</MkA>
|
||||
<MkA v-else-if="notification.type === 'pollEnded'" :class="$style.text" :to="notePage(notification.note)" :title="getNoteSummary(notification.note)">
|
||||
<i class="ti ti-quote" :class="$style.quote"></i>
|
||||
<Mfm :text="getNoteSummary(notification.note)" :plain="true" :nowrap="true" :author="notification.note.user"/>
|
||||
|
|
|
|||
|
|
@ -170,6 +170,10 @@ useTooltip(buttonEl, async (showing) => {
|
|||
}
|
||||
}
|
||||
|
||||
.icon {
|
||||
max-width: 150px;
|
||||
}
|
||||
|
||||
.count {
|
||||
font-size: 0.7em;
|
||||
line-height: 42px;
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ https://github.com/sindresorhus/file-type/blob/main/core.js
|
|||
https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
|
||||
*/
|
||||
|
||||
export const notificationTypes = ['follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'achievementEarned', 'app'] as const;
|
||||
export const notificationTypes = ['note', 'follow', 'mention', 'reply', 'renote', 'quote', 'reaction', 'pollEnded', 'receiveFollowRequest', 'followRequestAccepted', 'achievementEarned', 'app'] as const;
|
||||
export const obsoleteNotificationTypes = ['pollVote', 'groupInvited'] as const;
|
||||
|
||||
export const ROLE_POLICIES = [
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</template>
|
||||
</Sortable>
|
||||
|
||||
<MkInfo>{{ i18n.ts._profile.verifiedLinkDescription }}</MkInfo>
|
||||
</div>
|
||||
</MkFolder>
|
||||
<template #caption>{{ i18n.ts._profile.metadataDescription }}</template>
|
||||
|
|
@ -119,6 +121,7 @@ import { langmap } from '@/scripts/langmap.js';
|
|||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||
import { claimAchievement } from '@/scripts/achievements.js';
|
||||
import { defaultStore } from '@/store.js';
|
||||
import MkInfo from '@/components/MkInfo.vue';
|
||||
|
||||
const Sortable = defineAsyncComponent(() => import('vuedraggable').then(x => x.default));
|
||||
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</dt>
|
||||
<dd class="value">
|
||||
<Mfm :text="field.value" :author="user" :i="$i" :colored="false"/>
|
||||
<i v-if="user.verifiedLinks.includes(field.value)" v-tooltip:dialog="i18n.ts.verifiedLink" class="ti ti-circle-check" :class="$style.verifiedLink"></i>
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
|
|
@ -671,7 +672,12 @@ onUnmounted(() => {
|
|||
<style lang="scss" module>
|
||||
.tl {
|
||||
background: var(--bg);
|
||||
border-radius: var(--radius);
|
||||
overflow: clip;
|
||||
border-radius: var(--radius);
|
||||
overflow: clip;
|
||||
}
|
||||
|
||||
.verifiedLink {
|
||||
margin-left: 4px;
|
||||
color: var(--success);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -80,6 +80,15 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
|
|||
});
|
||||
}
|
||||
|
||||
async function toggleNotify() {
|
||||
os.apiWithDialog('following/update', {
|
||||
userId: user.id,
|
||||
notify: user.notify === 'normal' ? 'none' : 'normal',
|
||||
}).then(() => {
|
||||
user.notify = user.notify === 'normal' ? 'none' : 'normal';
|
||||
});
|
||||
}
|
||||
|
||||
function reportAbuse() {
|
||||
os.popup(defineAsyncComponent(() => import('@/components/MkAbuseReportWindow.vue')), {
|
||||
user: user,
|
||||
|
|
@ -270,6 +279,15 @@ export function getUserMenu(user: Misskey.entities.UserDetailed, router: Router
|
|||
}]);
|
||||
}
|
||||
|
||||
// フォローしたとしても user.isFollowing はリアルタイム更新されないので不便なため
|
||||
//if (user.isFollowing) {
|
||||
menu = menu.concat([{
|
||||
icon: user.notify === 'none' ? 'ti ti-bell' : 'ti ti-bell-off',
|
||||
text: user.notify === 'none' ? i18n.ts.notifyNotes : i18n.ts.unnotifyNotes,
|
||||
action: toggleNotify,
|
||||
}]);
|
||||
//}
|
||||
|
||||
menu = menu.concat([null, {
|
||||
icon: user.isMuted ? 'ti ti-eye' : 'ti ti-eye-off',
|
||||
text: user.isMuted ? i18n.ts.unmute : i18n.ts.mute,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue