mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-30 08:23:09 +02:00
右クリックでリアクションピッカーを開くオプション
This commit is contained in:
parent
65fbca47f9
commit
8668bc2609
7 changed files with 29 additions and 3 deletions
|
@ -705,6 +705,7 @@ apply: "適用"
|
||||||
receiveAnnouncementFromInstance: "インスタンスからのお知らせを受け取る"
|
receiveAnnouncementFromInstance: "インスタンスからのお知らせを受け取る"
|
||||||
emailNotification: "メール通知"
|
emailNotification: "メール通知"
|
||||||
inChannelSearch: "チャンネル内検索"
|
inChannelSearch: "チャンネル内検索"
|
||||||
|
useReactionPickerForContextMenu: "右クリックでリアクションピッカーを開く"
|
||||||
|
|
||||||
_email:
|
_email:
|
||||||
_follow:
|
_follow:
|
||||||
|
|
|
@ -756,7 +756,13 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
if (isLink(e.target)) return;
|
if (isLink(e.target)) return;
|
||||||
if (window.getSelection().toString() !== '') return;
|
if (window.getSelection().toString() !== '') return;
|
||||||
|
|
||||||
|
if (this.$store.state.useReactionPickerForContextMenu) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.react();
|
||||||
|
} else {
|
||||||
os.contextMenu(this.getMenu(), e).then(this.focus);
|
os.contextMenu(this.getMenu(), e).then(this.focus);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
menu(viaKeyboard = false) {
|
menu(viaKeyboard = false) {
|
||||||
|
|
|
@ -731,7 +731,13 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
if (isLink(e.target)) return;
|
if (isLink(e.target)) return;
|
||||||
if (window.getSelection().toString() !== '') return;
|
if (window.getSelection().toString() !== '') return;
|
||||||
|
|
||||||
|
if (this.$store.state.useReactionPickerForContextMenu) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.react();
|
||||||
|
} else {
|
||||||
os.contextMenu(this.getMenu(), e).then(this.focus);
|
os.contextMenu(this.getMenu(), e).then(this.focus);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
menu(viaKeyboard = false) {
|
menu(viaKeyboard = false) {
|
||||||
|
|
|
@ -70,6 +70,7 @@ export default defineComponent({
|
||||||
// TODO: ResizeObserver無くしたい
|
// TODO: ResizeObserver無くしたい
|
||||||
new ResizeObserver((entries, observer) => {
|
new ResizeObserver((entries, observer) => {
|
||||||
const rect = this.src.getBoundingClientRect();
|
const rect = this.src.getBoundingClientRect();
|
||||||
|
|
||||||
const width = popover.offsetWidth;
|
const width = popover.offsetWidth;
|
||||||
const height = popover.offsetHeight;
|
const height = popover.offsetHeight;
|
||||||
|
|
||||||
|
|
|
@ -19,6 +19,7 @@
|
||||||
<template #label>{{ $ts.behavior }}</template>
|
<template #label>{{ $ts.behavior }}</template>
|
||||||
<FormSwitch v-model:value="imageNewTab">{{ $ts.openImageInNewTab }}</FormSwitch>
|
<FormSwitch v-model:value="imageNewTab">{{ $ts.openImageInNewTab }}</FormSwitch>
|
||||||
<FormSwitch v-model:value="enableInfiniteScroll">{{ $ts.enableInfiniteScroll }}</FormSwitch>
|
<FormSwitch v-model:value="enableInfiniteScroll">{{ $ts.enableInfiniteScroll }}</FormSwitch>
|
||||||
|
<FormSwitch v-model:value="useReactionPickerForContextMenu">{{ $ts.useReactionPickerForContextMenu }}</FormSwitch>
|
||||||
<FormSwitch v-model:value="disablePagesScript">{{ $ts.disablePagesScript }}</FormSwitch>
|
<FormSwitch v-model:value="disablePagesScript">{{ $ts.disablePagesScript }}</FormSwitch>
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
|
@ -144,6 +145,7 @@ export default defineComponent({
|
||||||
chatOpenBehavior: ColdDeviceStorage.makeGetterSetter('chatOpenBehavior'),
|
chatOpenBehavior: ColdDeviceStorage.makeGetterSetter('chatOpenBehavior'),
|
||||||
instanceTicker: defaultStore.makeGetterSetter('instanceTicker'),
|
instanceTicker: defaultStore.makeGetterSetter('instanceTicker'),
|
||||||
enableInfiniteScroll: defaultStore.makeGetterSetter('enableInfiniteScroll'),
|
enableInfiniteScroll: defaultStore.makeGetterSetter('enableInfiniteScroll'),
|
||||||
|
useReactionPickerForContextMenu: defaultStore.makeGetterSetter('useReactionPickerForContextMenu'),
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
@ -144,6 +144,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
useReactionPickerForContextMenu: {
|
||||||
|
where: 'device',
|
||||||
|
default: true
|
||||||
|
},
|
||||||
showGapBetweenNotesInTimeline: {
|
showGapBetweenNotesInTimeline: {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: true
|
default: true
|
||||||
|
|
|
@ -741,7 +741,13 @@ export default defineComponent({
|
||||||
};
|
};
|
||||||
if (isLink(e.target)) return;
|
if (isLink(e.target)) return;
|
||||||
if (window.getSelection().toString() !== '') return;
|
if (window.getSelection().toString() !== '') return;
|
||||||
|
|
||||||
|
if (this.$store.state.useReactionPickerForContextMenu) {
|
||||||
|
e.preventDefault();
|
||||||
|
this.react();
|
||||||
|
} else {
|
||||||
os.contextMenu(this.getMenu(), e).then(this.focus);
|
os.contextMenu(this.getMenu(), e).then(this.focus);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
menu(viaKeyboard = false) {
|
menu(viaKeyboard = false) {
|
||||||
|
|
Loading…
Reference in a new issue