mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 04:53:08 +02:00
Merge branch 'develop'
This commit is contained in:
commit
0589171ceb
5 changed files with 25 additions and 13 deletions
|
@ -10,6 +10,14 @@
|
||||||
You should also include the user name that made the change.
|
You should also include the user name that made the change.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
## 12.106.3 (2022/02/11)
|
||||||
|
|
||||||
|
### Improvements
|
||||||
|
- クライアント: スマートフォンでの余白を調整 @syuilo
|
||||||
|
|
||||||
|
### Bugfixes
|
||||||
|
- クライアント: ノートの詳細が表示されない問題を修正 @syuilo
|
||||||
|
|
||||||
## 12.106.2 (2022/02/11)
|
## 12.106.2 (2022/02/11)
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "misskey",
|
"name": "misskey",
|
||||||
"version": "12.106.2",
|
"version": "12.106.3",
|
||||||
"codename": "indigo",
|
"codename": "indigo",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
|
import { deviceKind } from '@/scripts/device-kind';
|
||||||
import { defineComponent, inject, onMounted, onUnmounted, ref } from 'vue';
|
import { defineComponent, inject, onMounted, onUnmounted, ref } from 'vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -35,7 +36,7 @@ export default defineComponent({
|
||||||
const margin = ref(0);
|
const margin = ref(0);
|
||||||
const shouldSpacerMin = inject('shouldSpacerMin', false);
|
const shouldSpacerMin = inject('shouldSpacerMin', false);
|
||||||
const adjust = (rect: { width: number; height: number; }) => {
|
const adjust = (rect: { width: number; height: number; }) => {
|
||||||
if (shouldSpacerMin) {
|
if (shouldSpacerMin || deviceKind === 'smartphone') {
|
||||||
margin.value = props.marginMin;
|
margin.value = props.marginMin;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,11 +154,13 @@ const props = defineProps<{
|
||||||
|
|
||||||
const inChannel = inject('inChannel', null);
|
const inChannel = inject('inChannel', null);
|
||||||
|
|
||||||
|
const note = $ref(JSON.parse(JSON.stringify(props.note)));
|
||||||
|
|
||||||
const isRenote = (
|
const isRenote = (
|
||||||
props.note.renote != null &&
|
note.renote != null &&
|
||||||
props.note.text == null &&
|
note.text == null &&
|
||||||
props.note.fileIds.length === 0 &&
|
note.fileIds.length === 0 &&
|
||||||
props.note.poll == null
|
note.poll == null
|
||||||
);
|
);
|
||||||
|
|
||||||
const el = ref<HTMLElement>();
|
const el = ref<HTMLElement>();
|
||||||
|
@ -166,8 +168,8 @@ const menuButton = ref<HTMLElement>();
|
||||||
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
const renoteButton = ref<InstanceType<typeof XRenoteButton>>();
|
||||||
const renoteTime = ref<HTMLElement>();
|
const renoteTime = ref<HTMLElement>();
|
||||||
const reactButton = ref<HTMLElement>();
|
const reactButton = ref<HTMLElement>();
|
||||||
let appearNote = $ref(isRenote ? props.note.renote as misskey.entities.Note : props.note);
|
let appearNote = $ref(isRenote ? note.renote as misskey.entities.Note : note);
|
||||||
const isMyRenote = $i && ($i.id === props.note.userId);
|
const isMyRenote = $i && ($i.id === note.userId);
|
||||||
const showContent = ref(false);
|
const showContent = ref(false);
|
||||||
const isDeleted = ref(false);
|
const isDeleted = ref(false);
|
||||||
const muted = ref(checkWordMute(appearNote, $i, defaultStore.state.mutedWords));
|
const muted = ref(checkWordMute(appearNote, $i, defaultStore.state.mutedWords));
|
||||||
|
@ -188,8 +190,9 @@ const keymap = {
|
||||||
};
|
};
|
||||||
|
|
||||||
useNoteCapture({
|
useNoteCapture({
|
||||||
appearNote: $$(appearNote),
|
|
||||||
rootEl: el,
|
rootEl: el,
|
||||||
|
note: $$(appearNote),
|
||||||
|
isDeletedRef: isDeleted,
|
||||||
});
|
});
|
||||||
|
|
||||||
function reply(viaKeyboard = false): void {
|
function reply(viaKeyboard = false): void {
|
||||||
|
@ -237,12 +240,12 @@ function onContextmenu(ev: MouseEvent): void {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
react();
|
react();
|
||||||
} else {
|
} else {
|
||||||
os.contextMenu(getNoteMenu({ note: props.note, translating, translation, menuButton }), ev).then(focus);
|
os.contextMenu(getNoteMenu({ note: note, translating, translation, menuButton }), ev).then(focus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function menu(viaKeyboard = false): void {
|
function menu(viaKeyboard = false): void {
|
||||||
os.popupMenu(getNoteMenu({ note: props.note, translating, translation, menuButton }), menuButton.value, {
|
os.popupMenu(getNoteMenu({ note: note, translating, translation, menuButton }), menuButton.value, {
|
||||||
viaKeyboard
|
viaKeyboard
|
||||||
}).then(focus);
|
}).then(focus);
|
||||||
}
|
}
|
||||||
|
@ -255,7 +258,7 @@ function showRenoteMenu(viaKeyboard = false): void {
|
||||||
danger: true,
|
danger: true,
|
||||||
action: () => {
|
action: () => {
|
||||||
os.api('notes/delete', {
|
os.api('notes/delete', {
|
||||||
noteId: props.note.id
|
noteId: note.id
|
||||||
});
|
});
|
||||||
isDeleted.value = true;
|
isDeleted.value = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ const keymap = {
|
||||||
useNoteCapture({
|
useNoteCapture({
|
||||||
rootEl: el,
|
rootEl: el,
|
||||||
note: $$(appearNote),
|
note: $$(appearNote),
|
||||||
isDeletedRef: $$(isDeleted),
|
isDeletedRef: isDeleted,
|
||||||
});
|
});
|
||||||
|
|
||||||
function reply(viaKeyboard = false): void {
|
function reply(viaKeyboard = false): void {
|
||||||
|
|
Loading…
Reference in a new issue