mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-07-30 07:54:36 +02:00
Merge branch 'notification-read-api' into swn
This commit is contained in:
@@ -109,6 +109,14 @@ export function getUserMenu(user) {
|
||||
return !confirm.canceled;
|
||||
}
|
||||
|
||||
async function invalidateFollow() {
|
||||
os.apiWithDialog('following/invalidate', {
|
||||
userId: user.id
|
||||
}).then(() => {
|
||||
user.isFollowed = !user.isFollowed;
|
||||
})
|
||||
}
|
||||
|
||||
let menu = [{
|
||||
icon: 'fas fa-at',
|
||||
text: i18n.locale.copyUsername,
|
||||
@@ -153,6 +161,14 @@ export function getUserMenu(user) {
|
||||
action: toggleBlock
|
||||
}]);
|
||||
|
||||
if (user.isFollowed) {
|
||||
menu = menu.concat([{
|
||||
icon: 'fas fa-unlink',
|
||||
text: i18n.locale.breakFollow,
|
||||
action: invalidateFollow
|
||||
}]);
|
||||
}
|
||||
|
||||
menu = menu.concat([null, {
|
||||
icon: 'fas fa-exclamation-circle',
|
||||
text: i18n.locale.reportAbuse,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { isScreenTouching } from '@/os';
|
||||
import { Ref, ref } from 'vue';
|
||||
import { isDeviceTouch } from './is-device-touch';
|
||||
|
||||
export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
|
||||
let isHovering = false;
|
||||
@@ -13,7 +14,7 @@ export function useTooltip(onShow: (showing: Ref<boolean>) => void) {
|
||||
|
||||
// iOS(Androidも?)では、要素をタップした直後に(おせっかいで)mouseoverイベントを発火させたりするため、その対策
|
||||
// これが無いと、画面に触れてないのにツールチップが出たりしてしまう
|
||||
if (!isScreenTouching) return;
|
||||
if (isDeviceTouch && !isScreenTouching) return;
|
||||
|
||||
const showing = ref(true);
|
||||
onShow(showing);
|
||||
|
||||
Reference in New Issue
Block a user