tweak client
This commit is contained in:
parent
9ac526b6b6
commit
bffe6fb9bf
@ -858,6 +858,8 @@ isSystemAccount: "システムにより自動で作成・管理されている
|
|||||||
typeToConfirm: "この操作を行うには {x} と入力してください"
|
typeToConfirm: "この操作を行うには {x} と入力してください"
|
||||||
deleteAccount: "アカウント削除"
|
deleteAccount: "アカウント削除"
|
||||||
document: "ドキュメント"
|
document: "ドキュメント"
|
||||||
|
numberOfPageCache: "ページキャッシュ数"
|
||||||
|
numberOfPageCacheDescription: "多くすると利便性が向上しますが、負荷とメモリ使用量が増えます。"
|
||||||
|
|
||||||
_emailUnavailable:
|
_emailUnavailable:
|
||||||
used: "既に使用されています"
|
used: "既に使用されています"
|
||||||
|
@ -1,36 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div v-sticky-container class="adfeebaf _formBlock">
|
|
||||||
<div class="label"><slot name="label"></slot></div>
|
|
||||||
<div class="main _formRoot">
|
|
||||||
<slot></slot>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { defineComponent } from 'vue';
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.adfeebaf {
|
|
||||||
padding: 24px 24px;
|
|
||||||
border: solid 1px var(--divider);
|
|
||||||
border-radius: var(--radius);
|
|
||||||
|
|
||||||
> .label {
|
|
||||||
font-weight: bold;
|
|
||||||
padding: 0 0 16px 0;
|
|
||||||
|
|
||||||
&:empty {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
> .main {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -4,7 +4,7 @@
|
|||||||
<div v-adaptive-border class="body">
|
<div v-adaptive-border class="body">
|
||||||
<div ref="containerEl" class="container">
|
<div ref="containerEl" class="container">
|
||||||
<div class="track">
|
<div class="track">
|
||||||
<div class="highlight" :style="{ width: (steppedValue * 100) + '%' }"></div>
|
<div class="highlight" :style="{ width: (steppedRawValue * 100) + '%' }"></div>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="steps" class="ticks">
|
<div v-if="steps" class="ticks">
|
||||||
<div v-for="i in (steps + 1)" class="tick" :style="{ left: (((i - 1) / steps) * 100) + '%' }"></div>
|
<div v-for="i in (steps + 1)" class="tick" :style="{ left: (((i - 1) / steps) * 100) + '%' }"></div>
|
||||||
@ -12,6 +12,7 @@
|
|||||||
<div ref="thumbEl" v-tooltip="textConverter(finalValue)" class="thumb" :style="{ left: thumbPosition + 'px' }" @mousedown="onMousedown" @touchstart="onMousedown"></div>
|
<div ref="thumbEl" v-tooltip="textConverter(finalValue)" class="thumb" :style="{ left: thumbPosition + 'px' }" @mousedown="onMousedown" @touchstart="onMousedown"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="caption"><slot name="caption"></slot></div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -62,7 +63,7 @@ export default defineComponent({
|
|||||||
const thumbEl = ref<HTMLElement>();
|
const thumbEl = ref<HTMLElement>();
|
||||||
|
|
||||||
const rawValue = ref((props.modelValue - props.min) / (props.max - props.min));
|
const rawValue = ref((props.modelValue - props.min) / (props.max - props.min));
|
||||||
const steppedValue = computed(() => {
|
const steppedRawValue = computed(() => {
|
||||||
if (props.step) {
|
if (props.step) {
|
||||||
const step = props.step / (props.max - props.min);
|
const step = props.step / (props.max - props.min);
|
||||||
return (step * Math.round(rawValue.value / step));
|
return (step * Math.round(rawValue.value / step));
|
||||||
@ -71,7 +72,11 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const finalValue = computed(() => {
|
const finalValue = computed(() => {
|
||||||
return (steppedValue.value * (props.max - props.min)) + props.min;
|
if (Number.isInteger(props.step)) {
|
||||||
|
return Math.round((steppedRawValue.value * (props.max - props.min)) + props.min);
|
||||||
|
} else {
|
||||||
|
return (steppedRawValue.value * (props.max - props.min)) + props.min;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
watch(finalValue, () => {
|
watch(finalValue, () => {
|
||||||
context.emit('update:modelValue', finalValue.value);
|
context.emit('update:modelValue', finalValue.value);
|
||||||
@ -86,10 +91,10 @@ export default defineComponent({
|
|||||||
if (containerEl.value == null) {
|
if (containerEl.value == null) {
|
||||||
thumbPosition.value = 0;
|
thumbPosition.value = 0;
|
||||||
} else {
|
} else {
|
||||||
thumbPosition.value = (containerEl.value.offsetWidth - thumbWidth.value) * steppedValue.value;
|
thumbPosition.value = (containerEl.value.offsetWidth - thumbWidth.value) * steppedRawValue.value;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
watch([steppedValue, containerEl], calcThumbPosition);
|
watch([steppedRawValue, containerEl], calcThumbPosition);
|
||||||
|
|
||||||
let ro: ResizeObserver | undefined;
|
let ro: ResizeObserver | undefined;
|
||||||
|
|
||||||
@ -154,7 +159,7 @@ export default defineComponent({
|
|||||||
return {
|
return {
|
||||||
rawValue,
|
rawValue,
|
||||||
finalValue,
|
finalValue,
|
||||||
steppedValue,
|
steppedRawValue,
|
||||||
onMousedown,
|
onMousedown,
|
||||||
containerEl,
|
containerEl,
|
||||||
thumbEl,
|
thumbEl,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<KeepAlive max="5">
|
<KeepAlive :max="defaultStore.state.numberOfPageCache">
|
||||||
<component :is="currentPageComponent" :key="key" v-bind="Object.fromEntries(currentPageProps)"/>
|
<component :is="currentPageComponent" :key="key" v-bind="Object.fromEntries(currentPageProps)"/>
|
||||||
</KeepAlive>
|
</KeepAlive>
|
||||||
</template>
|
</template>
|
||||||
@ -7,6 +7,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { inject, nextTick, onMounted, onUnmounted, watch } from 'vue';
|
import { inject, nextTick, onMounted, onUnmounted, watch } from 'vue';
|
||||||
import { Router } from '@/nirax';
|
import { Router } from '@/nirax';
|
||||||
|
import { defaultStore } from '@/store';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
router?: Router;
|
router?: Router;
|
||||||
|
@ -81,12 +81,14 @@ export const menuDef = reactive({
|
|||||||
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
groups: {
|
groups: {
|
||||||
title: 'groups',
|
title: 'groups',
|
||||||
icon: 'fas fa-users',
|
icon: 'fas fa-users',
|
||||||
show: computed(() => $i != null),
|
show: computed(() => $i != null),
|
||||||
to: '/my/groups',
|
to: '/my/groups',
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
antennas: {
|
antennas: {
|
||||||
title: 'antennas',
|
title: 'antennas',
|
||||||
icon: 'fas fa-satellite',
|
icon: 'fas fa-satellite',
|
||||||
|
@ -73,7 +73,6 @@ import { } from 'vue';
|
|||||||
import XHeader from './_header_.vue';
|
import XHeader from './_header_.vue';
|
||||||
import FormSwitch from '@/components/form/switch.vue';
|
import FormSwitch from '@/components/form/switch.vue';
|
||||||
import FormInput from '@/components/form/input.vue';
|
import FormInput from '@/components/form/input.vue';
|
||||||
import FormGroup from '@/components/form/group.vue';
|
|
||||||
import FormSuspense from '@/components/form/suspense.vue';
|
import FormSuspense from '@/components/form/suspense.vue';
|
||||||
import FormSplit from '@/components/form/split.vue';
|
import FormSplit from '@/components/form/split.vue';
|
||||||
import FormSection from '@/components/form/section.vue';
|
import FormSection from '@/components/form/section.vue';
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
<template #label>{{ $ts.description }}</template>
|
<template #label>{{ $ts.description }}</template>
|
||||||
</FormTextarea>
|
</FormTextarea>
|
||||||
|
|
||||||
<FormGroup>
|
<div class="">
|
||||||
<div v-for="file in files" :key="file.id" class="_formGroup wqugxsfx" :style="{ backgroundImage: file ? `url(${ file.thumbnailUrl })` : null }">
|
<div v-for="file in files" :key="file.id" class="wqugxsfx" :style="{ backgroundImage: file ? `url(${ file.thumbnailUrl })` : null }">
|
||||||
<div class="name">{{ file.name }}</div>
|
<div class="name">{{ file.name }}</div>
|
||||||
<button v-tooltip="$ts.remove" class="remove _button" @click="remove(file)"><i class="fas fa-times"></i></button>
|
<button v-tooltip="$ts.remove" class="remove _button" @click="remove(file)"><i class="fas fa-times"></i></button>
|
||||||
</div>
|
</div>
|
||||||
<FormButton primary @click="selectFile"><i class="fas fa-plus"></i> {{ $ts.attachFile }}</FormButton>
|
<FormButton primary @click="selectFile"><i class="fas fa-plus"></i> {{ $ts.attachFile }}</FormButton>
|
||||||
</FormGroup>
|
</div>
|
||||||
|
|
||||||
<FormSwitch v-model="isSensitive">{{ $ts.markAsSensitive }}</FormSwitch>
|
<FormSwitch v-model="isSensitive">{{ $ts.markAsSensitive }}</FormSwitch>
|
||||||
|
|
||||||
@ -33,7 +33,6 @@ import FormButton from '@/components/ui/button.vue';
|
|||||||
import FormInput from '@/components/form/input.vue';
|
import FormInput from '@/components/form/input.vue';
|
||||||
import FormTextarea from '@/components/form/textarea.vue';
|
import FormTextarea from '@/components/form/textarea.vue';
|
||||||
import FormSwitch from '@/components/form/switch.vue';
|
import FormSwitch from '@/components/form/switch.vue';
|
||||||
import FormGroup from '@/components/form/group.vue';
|
|
||||||
import FormSuspense from '@/components/form/suspense.vue';
|
import FormSuspense from '@/components/form/suspense.vue';
|
||||||
import { selectFiles } from '@/scripts/select-file';
|
import { selectFiles } from '@/scripts/select-file';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
|
@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="_formRoot">
|
<div class="_formRoot">
|
||||||
<FormGroup>
|
<FormSwitch v-model="navWindow">{{ i18n.ts.defaultNavigationBehaviour }}: {{ i18n.ts.openInWindow }}</FormSwitch>
|
||||||
<template #label>{{ i18n.ts.defaultNavigationBehaviour }}</template>
|
|
||||||
<FormSwitch v-model="navWindow">{{ i18n.ts.openInWindow }}</FormSwitch>
|
|
||||||
</FormGroup>
|
|
||||||
|
|
||||||
<FormSwitch v-model="alwaysShowMainColumn" class="_formBlock">{{ i18n.ts._deck.alwaysShowMainColumn }}</FormSwitch>
|
<FormSwitch v-model="alwaysShowMainColumn" class="_formBlock">{{ i18n.ts._deck.alwaysShowMainColumn }}</FormSwitch>
|
||||||
|
|
||||||
@ -35,7 +32,6 @@ import FormSwitch from '@/components/form/switch.vue';
|
|||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
import FormRadios from '@/components/form/radios.vue';
|
import FormRadios from '@/components/form/radios.vue';
|
||||||
import FormInput from '@/components/form/input.vue';
|
import FormInput from '@/components/form/input.vue';
|
||||||
import FormGroup from '@/components/form/group.vue';
|
|
||||||
import { deckStore } from '@/ui/deck/deck-store';
|
import { deckStore } from '@/ui/deck/deck-store';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { unisonReload } from '@/scripts/unison-reload';
|
import { unisonReload } from '@/scripts/unison-reload';
|
||||||
|
@ -81,10 +81,10 @@
|
|||||||
<option value="force">{{ i18n.ts._nsfw.force }}</option>
|
<option value="force">{{ i18n.ts._nsfw.force }}</option>
|
||||||
</FormSelect>
|
</FormSelect>
|
||||||
|
|
||||||
<FormGroup>
|
<FormRange v-model="numberOfPageCache" :min="1" :max="10" :step="1" class="_formBlock">
|
||||||
<template #label>{{ i18n.ts.defaultNavigationBehaviour }}</template>
|
<template #label>{{ i18n.ts.numberOfPageCache }}</template>
|
||||||
<FormSwitch v-model="defaultSideView">{{ i18n.ts.openInSideView }}</FormSwitch>
|
<template #caption>{{ i18n.ts.numberOfPageCacheDescription }}</template>
|
||||||
</FormGroup>
|
</FormRange>
|
||||||
|
|
||||||
<FormLink to="/settings/deck" class="_formBlock">{{ i18n.ts.deck }}</FormLink>
|
<FormLink to="/settings/deck" class="_formBlock">{{ i18n.ts.deck }}</FormLink>
|
||||||
|
|
||||||
@ -97,7 +97,7 @@ import { computed, ref, watch } from 'vue';
|
|||||||
import FormSwitch from '@/components/form/switch.vue';
|
import FormSwitch from '@/components/form/switch.vue';
|
||||||
import FormSelect from '@/components/form/select.vue';
|
import FormSelect from '@/components/form/select.vue';
|
||||||
import FormRadios from '@/components/form/radios.vue';
|
import FormRadios from '@/components/form/radios.vue';
|
||||||
import FormGroup from '@/components/form/group.vue';
|
import FormRange from '@/components/form/range.vue';
|
||||||
import FormSection from '@/components/form/section.vue';
|
import FormSection from '@/components/form/section.vue';
|
||||||
import FormLink from '@/components/form/link.vue';
|
import FormLink from '@/components/form/link.vue';
|
||||||
import MkLink from '@/components/link.vue';
|
import MkLink from '@/components/link.vue';
|
||||||
@ -137,7 +137,7 @@ const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab'));
|
|||||||
const nsfw = computed(defaultStore.makeGetterSetter('nsfw'));
|
const nsfw = computed(defaultStore.makeGetterSetter('nsfw'));
|
||||||
const disablePagesScript = computed(defaultStore.makeGetterSetter('disablePagesScript'));
|
const disablePagesScript = computed(defaultStore.makeGetterSetter('disablePagesScript'));
|
||||||
const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm'));
|
const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm'));
|
||||||
const defaultSideView = computed(defaultStore.makeGetterSetter('defaultSideView'));
|
const numberOfPageCache = computed(defaultStore.makeGetterSetter('numberOfPageCache'));
|
||||||
const instanceTicker = computed(defaultStore.makeGetterSetter('instanceTicker'));
|
const instanceTicker = computed(defaultStore.makeGetterSetter('instanceTicker'));
|
||||||
const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfiniteScroll'));
|
const enableInfiniteScroll = computed(defaultStore.makeGetterSetter('enableInfiniteScroll'));
|
||||||
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
|
const useReactionPickerForContextMenu = computed(defaultStore.makeGetterSetter('useReactionPickerForContextMenu'));
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import { defineAsyncComponent, Ref, inject } from 'vue';
|
import { defineAsyncComponent, Ref, inject } from 'vue';
|
||||||
import * as misskey from 'misskey-js';
|
import * as misskey from 'misskey-js';
|
||||||
|
import { pleaseLogin } from './please-login';
|
||||||
import { $i } from '@/account';
|
import { $i } from '@/account';
|
||||||
import { i18n } from '@/i18n';
|
import { i18n } from '@/i18n';
|
||||||
import { instance } from '@/instance';
|
import { instance } from '@/instance';
|
||||||
@ -7,7 +8,6 @@ import * as os from '@/os';
|
|||||||
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
import copyToClipboard from '@/scripts/copy-to-clipboard';
|
||||||
import { url } from '@/config';
|
import { url } from '@/config';
|
||||||
import { noteActions } from '@/store';
|
import { noteActions } from '@/store';
|
||||||
import { pleaseLogin } from './please-login';
|
|
||||||
|
|
||||||
export function getNoteMenu(props: {
|
export function getNoteMenu(props: {
|
||||||
note: misskey.entities.Note;
|
note: misskey.entities.Note;
|
||||||
@ -34,7 +34,7 @@ export function getNoteMenu(props: {
|
|||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
os.api('notes/delete', {
|
os.api('notes/delete', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -47,7 +47,7 @@ export function getNoteMenu(props: {
|
|||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
os.api('notes/delete', {
|
os.api('notes/delete', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel });
|
os.post({ initialNote: appearNote, renote: appearNote.renote, reply: appearNote.reply, channel: appearNote.channel });
|
||||||
@ -56,19 +56,19 @@ export function getNoteMenu(props: {
|
|||||||
|
|
||||||
function toggleFavorite(favorite: boolean): void {
|
function toggleFavorite(favorite: boolean): void {
|
||||||
os.apiWithDialog(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
|
os.apiWithDialog(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleWatch(watch: boolean): void {
|
function toggleWatch(watch: boolean): void {
|
||||||
os.apiWithDialog(watch ? 'notes/watching/create' : 'notes/watching/delete', {
|
os.apiWithDialog(watch ? 'notes/watching/create' : 'notes/watching/delete', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleThreadMute(mute: boolean): void {
|
function toggleThreadMute(mute: boolean): void {
|
||||||
os.apiWithDialog(mute ? 'notes/thread-muting/create' : 'notes/thread-muting/delete', {
|
os.apiWithDialog(mute ? 'notes/thread-muting/create' : 'notes/thread-muting/delete', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,12 +84,12 @@ export function getNoteMenu(props: {
|
|||||||
|
|
||||||
function togglePin(pin: boolean): void {
|
function togglePin(pin: boolean): void {
|
||||||
os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', {
|
os.apiWithDialog(pin ? 'i/pin' : 'i/unpin', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
}, undefined, null, res => {
|
}, undefined, null, res => {
|
||||||
if (res.id === '72dab508-c64d-498f-8740-a8eec1ba385a') {
|
if (res.id === '72dab508-c64d-498f-8740-a8eec1ba385a') {
|
||||||
os.alert({
|
os.alert({
|
||||||
type: 'error',
|
type: 'error',
|
||||||
text: i18n.ts.pinLimitExceeded
|
text: i18n.ts.pinLimitExceeded,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -104,26 +104,26 @@ export function getNoteMenu(props: {
|
|||||||
const { canceled, result } = await os.form(i18n.ts.createNewClip, {
|
const { canceled, result } = await os.form(i18n.ts.createNewClip, {
|
||||||
name: {
|
name: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
label: i18n.ts.name
|
label: i18n.ts.name,
|
||||||
},
|
},
|
||||||
description: {
|
description: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
required: false,
|
required: false,
|
||||||
multiline: true,
|
multiline: true,
|
||||||
label: i18n.ts.description
|
label: i18n.ts.description,
|
||||||
},
|
},
|
||||||
isPublic: {
|
isPublic: {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
label: i18n.ts.public,
|
label: i18n.ts.public,
|
||||||
default: false
|
default: false,
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
if (canceled) return;
|
if (canceled) return;
|
||||||
|
|
||||||
const clip = await os.apiWithDialog('clips/create', result);
|
const clip = await os.apiWithDialog('clips/create', result);
|
||||||
|
|
||||||
os.apiWithDialog('clips/add-note', { clipId: clip.id, noteId: appearNote.id });
|
os.apiWithDialog('clips/add-note', { clipId: clip.id, noteId: appearNote.id });
|
||||||
}
|
},
|
||||||
}, null, ...clips.map(clip => ({
|
}, null, ...clips.map(clip => ({
|
||||||
text: clip.name,
|
text: clip.name,
|
||||||
action: () => {
|
action: () => {
|
||||||
@ -146,9 +146,9 @@ export function getNoteMenu(props: {
|
|||||||
text: err.message + '\n' + err.id,
|
text: err.message + '\n' + err.id,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
}
|
},
|
||||||
}))], props.menuButton.value, {
|
}))], props.menuButton.value, {
|
||||||
}).then(focus);
|
}).then(focus);
|
||||||
}
|
}
|
||||||
@ -193,7 +193,7 @@ export function getNoteMenu(props: {
|
|||||||
let menu;
|
let menu;
|
||||||
if ($i) {
|
if ($i) {
|
||||||
const statePromise = os.api('notes/state', {
|
const statePromise = os.api('notes/state', {
|
||||||
noteId: appearNote.id
|
noteId: appearNote.id,
|
||||||
});
|
});
|
||||||
|
|
||||||
menu = [
|
menu = [
|
||||||
@ -208,69 +208,69 @@ export function getNoteMenu(props: {
|
|||||||
{
|
{
|
||||||
icon: 'fas fa-copy',
|
icon: 'fas fa-copy',
|
||||||
text: i18n.ts.copyContent,
|
text: i18n.ts.copyContent,
|
||||||
action: copyContent
|
action: copyContent,
|
||||||
}, {
|
}, {
|
||||||
icon: 'fas fa-link',
|
icon: 'fas fa-link',
|
||||||
text: i18n.ts.copyLink,
|
text: i18n.ts.copyLink,
|
||||||
action: copyLink
|
action: copyLink,
|
||||||
}, (appearNote.url || appearNote.uri) ? {
|
}, (appearNote.url || appearNote.uri) ? {
|
||||||
icon: 'fas fa-external-link-square-alt',
|
icon: 'fas fa-external-link-square-alt',
|
||||||
text: i18n.ts.showOnRemote,
|
text: i18n.ts.showOnRemote,
|
||||||
action: () => {
|
action: () => {
|
||||||
window.open(appearNote.url || appearNote.uri, '_blank');
|
window.open(appearNote.url || appearNote.uri, '_blank');
|
||||||
}
|
},
|
||||||
} : undefined,
|
} : undefined,
|
||||||
{
|
{
|
||||||
icon: 'fas fa-share-alt',
|
icon: 'fas fa-share-alt',
|
||||||
text: i18n.ts.share,
|
text: i18n.ts.share,
|
||||||
action: share
|
action: share,
|
||||||
},
|
},
|
||||||
instance.translatorAvailable ? {
|
instance.translatorAvailable ? {
|
||||||
icon: 'fas fa-language',
|
icon: 'fas fa-language',
|
||||||
text: i18n.ts.translate,
|
text: i18n.ts.translate,
|
||||||
action: translate
|
action: translate,
|
||||||
} : undefined,
|
} : undefined,
|
||||||
null,
|
null,
|
||||||
statePromise.then(state => state.isFavorited ? {
|
statePromise.then(state => state.isFavorited ? {
|
||||||
icon: 'fas fa-star',
|
icon: 'fas fa-star',
|
||||||
text: i18n.ts.unfavorite,
|
text: i18n.ts.unfavorite,
|
||||||
action: () => toggleFavorite(false)
|
action: () => toggleFavorite(false),
|
||||||
} : {
|
} : {
|
||||||
icon: 'fas fa-star',
|
icon: 'fas fa-star',
|
||||||
text: i18n.ts.favorite,
|
text: i18n.ts.favorite,
|
||||||
action: () => toggleFavorite(true)
|
action: () => toggleFavorite(true),
|
||||||
}),
|
}),
|
||||||
{
|
{
|
||||||
icon: 'fas fa-paperclip',
|
icon: 'fas fa-paperclip',
|
||||||
text: i18n.ts.clip,
|
text: i18n.ts.clip,
|
||||||
action: () => clip()
|
action: () => clip(),
|
||||||
},
|
},
|
||||||
(appearNote.userId !== $i.id) ? statePromise.then(state => state.isWatching ? {
|
(appearNote.userId !== $i.id) ? statePromise.then(state => state.isWatching ? {
|
||||||
icon: 'fas fa-eye-slash',
|
icon: 'fas fa-eye-slash',
|
||||||
text: i18n.ts.unwatch,
|
text: i18n.ts.unwatch,
|
||||||
action: () => toggleWatch(false)
|
action: () => toggleWatch(false),
|
||||||
} : {
|
} : {
|
||||||
icon: 'fas fa-eye',
|
icon: 'fas fa-eye',
|
||||||
text: i18n.ts.watch,
|
text: i18n.ts.watch,
|
||||||
action: () => toggleWatch(true)
|
action: () => toggleWatch(true),
|
||||||
}) : undefined,
|
}) : undefined,
|
||||||
statePromise.then(state => state.isMutedThread ? {
|
statePromise.then(state => state.isMutedThread ? {
|
||||||
icon: 'fas fa-comment-slash',
|
icon: 'fas fa-comment-slash',
|
||||||
text: i18n.ts.unmuteThread,
|
text: i18n.ts.unmuteThread,
|
||||||
action: () => toggleThreadMute(false)
|
action: () => toggleThreadMute(false),
|
||||||
} : {
|
} : {
|
||||||
icon: 'fas fa-comment-slash',
|
icon: 'fas fa-comment-slash',
|
||||||
text: i18n.ts.muteThread,
|
text: i18n.ts.muteThread,
|
||||||
action: () => toggleThreadMute(true)
|
action: () => toggleThreadMute(true),
|
||||||
}),
|
}),
|
||||||
appearNote.userId === $i.id ? ($i.pinnedNoteIds || []).includes(appearNote.id) ? {
|
appearNote.userId === $i.id ? ($i.pinnedNoteIds || []).includes(appearNote.id) ? {
|
||||||
icon: 'fas fa-thumbtack',
|
icon: 'fas fa-thumbtack',
|
||||||
text: i18n.ts.unpin,
|
text: i18n.ts.unpin,
|
||||||
action: () => togglePin(false)
|
action: () => togglePin(false),
|
||||||
} : {
|
} : {
|
||||||
icon: 'fas fa-thumbtack',
|
icon: 'fas fa-thumbtack',
|
||||||
text: i18n.ts.pin,
|
text: i18n.ts.pin,
|
||||||
action: () => togglePin(true)
|
action: () => togglePin(true),
|
||||||
} : undefined,
|
} : undefined,
|
||||||
/*
|
/*
|
||||||
...($i.isModerator || $i.isAdmin ? [
|
...($i.isModerator || $i.isAdmin ? [
|
||||||
@ -291,9 +291,9 @@ export function getNoteMenu(props: {
|
|||||||
const u = appearNote.url || appearNote.uri || `${url}/notes/${appearNote.id}`;
|
const u = appearNote.url || appearNote.uri || `${url}/notes/${appearNote.id}`;
|
||||||
os.popup(defineAsyncComponent(() => import('@/components/abuse-report-window.vue')), {
|
os.popup(defineAsyncComponent(() => import('@/components/abuse-report-window.vue')), {
|
||||||
user: appearNote.user,
|
user: appearNote.user,
|
||||||
initialComment: `Note: ${u}\n-----\n`
|
initialComment: `Note: ${u}\n-----\n`,
|
||||||
}, {}, 'closed');
|
}, {}, 'closed');
|
||||||
}
|
},
|
||||||
}]
|
}]
|
||||||
: []
|
: []
|
||||||
),
|
),
|
||||||
@ -302,13 +302,13 @@ export function getNoteMenu(props: {
|
|||||||
appearNote.userId === $i.id ? {
|
appearNote.userId === $i.id ? {
|
||||||
icon: 'fas fa-edit',
|
icon: 'fas fa-edit',
|
||||||
text: i18n.ts.deleteAndEdit,
|
text: i18n.ts.deleteAndEdit,
|
||||||
action: delEdit
|
action: delEdit,
|
||||||
} : undefined,
|
} : undefined,
|
||||||
{
|
{
|
||||||
icon: 'fas fa-trash-alt',
|
icon: 'fas fa-trash-alt',
|
||||||
text: i18n.ts.delete,
|
text: i18n.ts.delete,
|
||||||
danger: true,
|
danger: true,
|
||||||
action: del
|
action: del,
|
||||||
}]
|
}]
|
||||||
: []
|
: []
|
||||||
)]
|
)]
|
||||||
@ -317,17 +317,17 @@ export function getNoteMenu(props: {
|
|||||||
menu = [{
|
menu = [{
|
||||||
icon: 'fas fa-copy',
|
icon: 'fas fa-copy',
|
||||||
text: i18n.ts.copyContent,
|
text: i18n.ts.copyContent,
|
||||||
action: copyContent
|
action: copyContent,
|
||||||
}, {
|
}, {
|
||||||
icon: 'fas fa-link',
|
icon: 'fas fa-link',
|
||||||
text: i18n.ts.copyLink,
|
text: i18n.ts.copyLink,
|
||||||
action: copyLink
|
action: copyLink,
|
||||||
}, (appearNote.url || appearNote.uri) ? {
|
}, (appearNote.url || appearNote.uri) ? {
|
||||||
icon: 'fas fa-external-link-square-alt',
|
icon: 'fas fa-external-link-square-alt',
|
||||||
text: i18n.ts.showOnRemote,
|
text: i18n.ts.showOnRemote,
|
||||||
action: () => {
|
action: () => {
|
||||||
window.open(appearNote.url || appearNote.uri, '_blank');
|
window.open(appearNote.url || appearNote.uri, '_blank');
|
||||||
}
|
},
|
||||||
} : undefined]
|
} : undefined]
|
||||||
.filter(x => x !== undefined);
|
.filter(x => x !== undefined);
|
||||||
}
|
}
|
||||||
@ -338,7 +338,7 @@ export function getNoteMenu(props: {
|
|||||||
text: action.title,
|
text: action.title,
|
||||||
action: () => {
|
action: () => {
|
||||||
action.handler(appearNote);
|
action.handler(appearNote);
|
||||||
}
|
},
|
||||||
}))]);
|
}))]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,6 +233,10 @@ export const defaultStore = markRaw(new Storage('base', {
|
|||||||
where: 'device',
|
where: 'device',
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
numberOfPageCache: {
|
||||||
|
where: 'device',
|
||||||
|
default: 5,
|
||||||
|
},
|
||||||
aiChanMode: {
|
aiChanMode: {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: false,
|
default: false,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<MkContainer :naked="widgetProps.transparent" class="mkw-instance-cloud">
|
<MkContainer :naked="widgetProps.transparent" :show-header="false" class="mkw-instance-cloud">
|
||||||
<div class="">
|
<div class="">
|
||||||
<MkTagCloud v-if="activeInstances">
|
<MkTagCloud v-if="activeInstances">
|
||||||
<li v-for="instance in activeInstances">
|
<li v-for="instance in activeInstances">
|
||||||
|
Loading…
Reference in New Issue
Block a user