色々リファ
This commit is contained in:
parent
6182194313
commit
1c108927ea
|
@ -24,6 +24,7 @@ export const paramDef = {
|
||||||
roleIdsThatCanBeUsedThisDecoration: { type: 'array', items: {
|
roleIdsThatCanBeUsedThisDecoration: { type: 'array', items: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
} },
|
} },
|
||||||
|
category: { type: 'string', nullable: true },
|
||||||
},
|
},
|
||||||
required: ['name', 'description', 'url'],
|
required: ['name', 'description', 'url'],
|
||||||
} as const;
|
} as const;
|
||||||
|
@ -39,6 +40,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
description: ps.description,
|
description: ps.description,
|
||||||
url: ps.url,
|
url: ps.url,
|
||||||
roleIdsThatCanBeUsedThisDecoration: ps.roleIdsThatCanBeUsedThisDecoration,
|
roleIdsThatCanBeUsedThisDecoration: ps.roleIdsThatCanBeUsedThisDecoration,
|
||||||
|
category: ps.category ?? '',
|
||||||
}, me);
|
}, me);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
name: avatarDecoration.name,
|
name: avatarDecoration.name,
|
||||||
description: avatarDecoration.description,
|
description: avatarDecoration.description,
|
||||||
url: avatarDecoration.url,
|
url: avatarDecoration.url,
|
||||||
|
category: avatarDecoration.category,
|
||||||
roleIdsThatCanBeUsedThisDecoration: avatarDecoration.roleIdsThatCanBeUsedThisDecoration,
|
roleIdsThatCanBeUsedThisDecoration: avatarDecoration.roleIdsThatCanBeUsedThisDecoration,
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
|
@ -6,8 +6,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
|
<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
|
||||||
<!-- フォルダの中にはカスタム絵文字だけ(Unicode絵文字もこっち) -->
|
<!-- フォルダの中にはカスタム絵文字だけ(Unicode絵文字もこっち) -->
|
||||||
<section v-if="!hasChildSection" style="border-radius: 6px; padding-top: 9px;">
|
<section v-if="!hasChildSection" style="border-radius: 6px;">
|
||||||
<header class="_acrylic" @click="shown = !shown" style="border-radius: 6px;">
|
<header class="_acrylic" @click="shown = !shown" >
|
||||||
<i class="toggle ti-fw" :class="shown ? 'ti ti-chevron-down' : 'ti ti-chevron-up'"></i> <slot></slot> ({{ emojis.length }})
|
<i class="toggle ti-fw" :class="shown ? 'ti ti-chevron-down' : 'ti ti-chevron-up'"></i> <slot></slot> ({{ emojis.length }})
|
||||||
</header>
|
</header>
|
||||||
<div v-if="shown" class="body">
|
<div v-if="shown" class="body">
|
||||||
|
|
|
@ -4,108 +4,113 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div ref="el" :class="$style.root">
|
<div ref="rootEl" :class="$style.root" role="group" :aria-expanded="opened">
|
||||||
<header :class="$style.header" class="_button" :style="{ background: bg }" @click="showBody = !showBody">
|
<header :class="[$style.header, { [$style.opened]: opened }]" class="_button" role="button" data-cy-folder-header @click="toggle">
|
||||||
<div :class="$style.title"><div><slot name="header"></slot></div></div>
|
<div :class="$style.title"><div><slot name="header"></slot></div></div>
|
||||||
<div :class="$style.divider"></div>
|
<div :class="$style.divider"></div>
|
||||||
<button class="_button" :class="$style.button">
|
<button class="_button" :class="$style.button">
|
||||||
<template v-if="showBody"><i class="ti ti-chevron-up"></i></template>
|
<template v-if="opened"><i class="ti ti-chevron-up"></i></template>
|
||||||
<template v-else><i class="ti ti-chevron-down"></i></template>
|
<template v-else><i class="ti ti-chevron-down"></i></template>
|
||||||
</button>
|
</button>
|
||||||
</header>
|
</header>
|
||||||
|
<div v-if="openedAtLeastOnce" :class="[$style.body, { [$style.bgSame]: bgSame }]" :style="{ maxHeight: maxHeight ? `${maxHeight}px` : null, overflow: maxHeight ? `auto` : null }" :aria-hidden="!opened">
|
||||||
<Transition
|
<Transition
|
||||||
:name="defaultStore.state.animation ? 'folder-toggle' : ''"
|
:enterActiveClass="defaultStore.state.animation ? $style.transition_toggle_enterActive : ''"
|
||||||
|
:leaveActiveClass="defaultStore.state.animation ? $style.transition_toggle_leaveActive : ''"
|
||||||
|
:enterFromClass="defaultStore.state.animation ? $style.transition_toggle_enterFrom : ''"
|
||||||
|
:leaveToClass="defaultStore.state.animation ? $style.transition_toggle_leaveTo : ''"
|
||||||
@enter="enter"
|
@enter="enter"
|
||||||
@afterEnter="afterEnter"
|
@afterEnter="afterEnter"
|
||||||
@leave="leave"
|
@leave="leave"
|
||||||
@afterLeave="afterLeave"
|
@afterLeave="afterLeave"
|
||||||
>
|
>
|
||||||
<div v-show="showBody">
|
<div v-show="opened">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { onMounted, ref, shallowRef, watch } from 'vue';
|
import { nextTick, onMounted, shallowRef, ref } from 'vue';
|
||||||
import tinycolor from 'tinycolor2';
|
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
|
||||||
import { defaultStore } from '@/store.js';
|
import { defaultStore } from '@/store.js';
|
||||||
|
|
||||||
const miLocalStoragePrefix = 'ui:folder:' as const;
|
|
||||||
|
|
||||||
const props = withDefaults(defineProps<{
|
const props = withDefaults(defineProps<{
|
||||||
expanded?: boolean;
|
defaultOpen?: boolean;
|
||||||
persistKey?: string;
|
maxHeight?: number | null;
|
||||||
}>(), {
|
}>(), {
|
||||||
expanded: true,
|
defaultOpen: true,
|
||||||
|
maxHeight: null,
|
||||||
});
|
});
|
||||||
|
|
||||||
const el = shallowRef<HTMLDivElement>();
|
const getBgColor = (el: HTMLElement) => {
|
||||||
const bg = ref<string | null>(null);
|
const style = window.getComputedStyle(el);
|
||||||
const showBody = ref((props.persistKey && miLocalStorage.getItem(`${miLocalStoragePrefix}${props.persistKey}`)) ? (miLocalStorage.getItem(`${miLocalStoragePrefix}${props.persistKey}`) === 't') : props.expanded);
|
if (style.backgroundColor && !['rgba(0, 0, 0, 0)', 'rgba(0,0,0,0)', 'transparent'].includes(style.backgroundColor)) {
|
||||||
|
return style.backgroundColor;
|
||||||
watch(showBody, () => {
|
} else {
|
||||||
if (props.persistKey) {
|
return el.parentElement ? getBgColor(el.parentElement) : 'transparent';
|
||||||
miLocalStorage.setItem(`${miLocalStoragePrefix}${props.persistKey}`, showBody.value ? 't' : 'f');
|
|
||||||
}
|
}
|
||||||
});
|
};
|
||||||
|
|
||||||
function enter(el: Element) {
|
const rootEl = shallowRef<HTMLElement>();
|
||||||
|
const bgSame = ref(false);
|
||||||
|
const opened = ref(props.defaultOpen);
|
||||||
|
const openedAtLeastOnce = ref(props.defaultOpen);
|
||||||
|
|
||||||
|
function enter(el) {
|
||||||
const elementHeight = el.getBoundingClientRect().height;
|
const elementHeight = el.getBoundingClientRect().height;
|
||||||
el.style.height = 0;
|
el.style.height = 0;
|
||||||
el.offsetHeight; // reflow
|
el.offsetHeight; // reflow
|
||||||
el.style.height = elementHeight + 'px';
|
el.style.height = Math.min(elementHeight, props.maxHeight ?? Infinity) + 'px';
|
||||||
}
|
}
|
||||||
|
|
||||||
function afterEnter(el: Element) {
|
function afterEnter(el) {
|
||||||
el.style.height = null;
|
el.style.height = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function leave(el: Element) {
|
function leave(el) {
|
||||||
const elementHeight = el.getBoundingClientRect().height;
|
const elementHeight = el.getBoundingClientRect().height;
|
||||||
el.style.height = elementHeight + 'px';
|
el.style.height = elementHeight + 'px';
|
||||||
el.offsetHeight; // reflow
|
el.offsetHeight; // reflow
|
||||||
el.style.height = 0;
|
el.style.height = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
function afterLeave(el: Element) {
|
function afterLeave(el) {
|
||||||
el.style.height = null;
|
el.style.height = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function toggle() {
|
||||||
|
if (!opened.value) {
|
||||||
|
openedAtLeastOnce.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
nextTick(() => {
|
||||||
|
opened.value = !opened.value;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
function getParentBg(el: HTMLElement | null): string {
|
const computedStyle = getComputedStyle(document.documentElement);
|
||||||
if (el == null || el.tagName === 'BODY') return 'var(--bg)';
|
const parentBg = getBgColor(rootEl.value.parentElement);
|
||||||
const bg = el.style.background || el.style.backgroundColor;
|
const myBg = computedStyle.getPropertyValue('--panel');
|
||||||
if (bg) {
|
bgSame.value = parentBg === myBg;
|
||||||
return bg;
|
|
||||||
} else {
|
|
||||||
return getParentBg(el.parentElement);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const rawBg = getParentBg(el.value);
|
|
||||||
const _bg = tinycolor(rawBg.startsWith('var(') ? getComputedStyle(document.documentElement).getPropertyValue(rawBg.slice(4, -1)) : rawBg);
|
|
||||||
_bg.setAlpha(0.85);
|
|
||||||
bg.value = _bg.toRgbString();
|
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
.folder-toggle-enter-active, .folder-toggle-leave-active {
|
.transition_toggle_enterActive,
|
||||||
|
.transition_toggle_leaveActive {
|
||||||
overflow-y: clip;
|
overflow-y: clip;
|
||||||
transition: opacity 0.5s, height 0.5s !important;
|
transition: opacity 0.3s, height 0.3s, transform 0.3s !important;
|
||||||
}
|
}
|
||||||
.folder-toggle-enter-from {
|
.transition_toggle_enterFrom,
|
||||||
opacity: 0;
|
.transition_toggle_leaveTo {
|
||||||
}
|
|
||||||
.folder-toggle-leave-to {
|
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
position: relative;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
@ -116,14 +121,64 @@ onMounted(() => {
|
||||||
top: var(--stickyTop, 0px);
|
top: var(--stickyTop, 0px);
|
||||||
-webkit-backdrop-filter: var(--blur, blur(8px));
|
-webkit-backdrop-filter: var(--blur, blur(8px));
|
||||||
backdrop-filter: var(--blur, blur(20px));
|
backdrop-filter: var(--blur, blur(20px));
|
||||||
|
|
||||||
|
&.opened {
|
||||||
|
border-radius: 6px 6px 0 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.headerUpper {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerLower {
|
||||||
|
color: var(--fgTransparentWeak);
|
||||||
|
font-size: .85em;
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerIcon {
|
||||||
|
margin-right: 0.75em;
|
||||||
|
flex-shrink: 0;
|
||||||
|
text-align: center;
|
||||||
|
opacity: 0.8;
|
||||||
|
|
||||||
|
&:empty {
|
||||||
|
display: none;
|
||||||
|
|
||||||
|
& + .headerText {
|
||||||
|
padding-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.title {
|
.title {
|
||||||
display: grid;
|
display: grid;
|
||||||
place-content: center;
|
place-content: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 12px 16px 12px 0;
|
padding: 12px 16px 12px 0;
|
||||||
}
|
}
|
||||||
|
.headerText {
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
padding-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerTextSub {
|
||||||
|
color: var(--fgTransparentWeak);
|
||||||
|
font-size: .85em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerRight {
|
||||||
|
margin-left: auto;
|
||||||
|
color: var(--fgTransparentWeak);
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.headerRightText:not(:empty) {
|
||||||
|
margin-right: 0.75em;
|
||||||
|
}
|
||||||
|
|
||||||
.divider {
|
.divider {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
@ -131,14 +186,4 @@ onMounted(() => {
|
||||||
height: 1px;
|
height: 1px;
|
||||||
background: var(--divider);
|
background: var(--divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
.button {
|
|
||||||
padding: 12px 0 12px 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
@container (max-width: 500px) {
|
|
||||||
.title {
|
|
||||||
padding: 8px 10px 8px 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -91,7 +91,7 @@ const showContent = ref(false);
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
font-size: 0.95em;
|
font-size: 0.95em;
|
||||||
border-bottom: solid 0.5px var(--divider);
|
|
||||||
}
|
}
|
||||||
.button{
|
.button{
|
||||||
margin-right: var(--margin);
|
margin-right: var(--margin);
|
||||||
|
|
|
@ -149,8 +149,10 @@ watch([choices, multiple, expiration, atDate, atTime, after, unit], () => emit('
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.zmdxowus {
|
.zmdxowus {
|
||||||
padding: 8px 16px;
|
margin: 4px 8px;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 8px;
|
||||||
|
border: solid 2px var(--divider);
|
||||||
> .caution {
|
> .caution {
|
||||||
margin: 0 0 8px 0;
|
margin: 0 0 8px 0;
|
||||||
font-size: 0.8em;
|
font-size: 0.8em;
|
||||||
|
|
|
@ -1274,23 +1274,21 @@ defineExpose({
|
||||||
.cw {
|
.cw {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
border-bottom: solid 0.5px var(--divider);
|
border-bottom: solid 1px var(--divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
.postOptionsRoot {
|
.postOptionsRoot {
|
||||||
>* {
|
>* {
|
||||||
border-bottom: solid 0.5px var(--divider);
|
border-bottom: solid 1px var(--divider);
|
||||||
}
|
|
||||||
>:last-child {
|
|
||||||
border-bottom: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.hashtags {
|
.hashtags {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
border-top: solid 0.5px var(--divider);
|
border-top: solid 1px var(--divider);
|
||||||
}
|
}
|
||||||
|
|
||||||
.textOuter {
|
.textOuter {
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<MkStickyContainer>
|
<MkStickyContainer>
|
||||||
<template #header>
|
<template #header>
|
||||||
<XHeader :actions="headerActions" :tabs="headerTabs"/>
|
<MkPageHeader v-model:tab="tab" :actions="headerActions" :tabs="headerTabs"/>
|
||||||
</template>
|
</template>
|
||||||
<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32">
|
<MkSpacer :contentMax="700" :marginMin="16" :marginMax="32">
|
||||||
<FormSuspense :p="init">
|
<FormSuspense :p="init">
|
||||||
|
@ -34,8 +34,8 @@ import * as os from '@/os.js';
|
||||||
import { fetchInstance } from '@/instance.js';
|
import { fetchInstance } from '@/instance.js';
|
||||||
import { i18n } from '@/i18n.js';
|
import { i18n } from '@/i18n.js';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import MkSpacer from "@/components/global/MkSpacer.vue";
|
import MkSpacer from '@/components/global/MkSpacer.vue';
|
||||||
import MkStickyContainer from "@/components/global/MkStickyContainer.vue";
|
import MkStickyContainer from '@/components/global/MkStickyContainer.vue';
|
||||||
|
|
||||||
const blockedHosts = ref<string>('');
|
const blockedHosts = ref<string>('');
|
||||||
const silencedHosts = ref<string>('');
|
const silencedHosts = ref<string>('');
|
||||||
|
@ -43,8 +43,8 @@ const tab = ref('block');
|
||||||
|
|
||||||
async function init() {
|
async function init() {
|
||||||
const meta = await os.api('admin/meta');
|
const meta = await os.api('admin/meta');
|
||||||
blockedHosts.value = meta.blockedHosts.join('\n');
|
blockedHosts.value = meta.blockedHosts ? meta.blockedHosts.join('\n') : '';
|
||||||
silencedHosts.value = meta.silencedHosts.join('\n');
|
silencedHosts.value = meta.silencedHosts ? meta.silencedHosts.join('\n') : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
function save() {
|
function save() {
|
||||||
|
|
|
@ -35,20 +35,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkButton v-if="defaultStore.reactiveState.pinnedUserLists.value.length === 0" @click="setPinnedList()">{{ i18n.ts.add }}</MkButton>
|
<MkButton v-if="defaultStore.reactiveState.pinnedUserLists.value.length === 0" @click="setPinnedList()">{{ i18n.ts.add }}</MkButton>
|
||||||
<MkButton v-else danger @click="removePinnedList()"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
|
<MkButton v-else danger @click="removePinnedList()"><i class="ti ti-trash"></i> {{ i18n.ts.remove }}</MkButton>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
<MkSwitch v-model="showMediaTimeline">{{ i18n.ts.showMediaTimeline}}<template #caption>{{ i18n.ts.showMediaTimelineInfo }} </template></MkSwitch>
|
<MkSwitch v-model="showMediaTimeline">{{ i18n.ts.showMediaTimeline }}<template #caption>{{ i18n.ts.showMediaTimelineInfo }} </template></MkSwitch>
|
||||||
<MkSwitch v-model="showGlobalTimeline">{{ i18n.ts.showGlobalTimeline }}</MkSwitch>
|
<MkSwitch v-model="showGlobalTimeline">{{ i18n.ts.showGlobalTimeline }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
</FormSection>
|
||||||
|
<MkFoldableSection :defaultOpen="false" class="item">
|
||||||
<FormSection>
|
<template #header>{{ i18n.ts.displayOfNote }}</template>
|
||||||
<template #label>{{ i18n.ts.displayOfNote }}</template>
|
|
||||||
|
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<div class="_gaps_s">
|
<div class="_gaps_s">
|
||||||
<MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch>
|
<MkSwitch v-model="showNoteActionsOnlyHover">{{ i18n.ts.showNoteActionsOnlyHover }}</MkSwitch>
|
||||||
<MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch>
|
<MkSwitch v-model="showClipButtonInNoteFooter">{{ i18n.ts.showClipButtonInNoteFooter }}</MkSwitch>
|
||||||
<MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch>
|
<MkSwitch v-model="collapseRenotes">{{ i18n.ts.collapseRenotes }}</MkSwitch>
|
||||||
<MkSwitch v-model="showVisibilityColor">{{ i18n.ts.showVisibilityColor}}</MkSwitch>
|
<MkSwitch v-model="showVisibilityColor">{{ i18n.ts.showVisibilityColor }}</MkSwitch>
|
||||||
<MkColorInput v-if="showVisibilityColor" v-model="homeColor">
|
<MkColorInput v-if="showVisibilityColor" v-model="homeColor">
|
||||||
<template #label>{{ i18n.ts._visibility.home }}</template>
|
<template #label>{{ i18n.ts._visibility.home }}</template>
|
||||||
</MkColorInput>
|
</MkColorInput>
|
||||||
|
@ -97,10 +96,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<option value="2_3">{{ i18n.t('limitTo', { x: '2:3' }) }}</option>
|
<option value="2_3">{{ i18n.t('limitTo', { x: '2:3' }) }}</option>
|
||||||
</MkRadios>
|
</MkRadios>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
</MkFoldableSection>
|
||||||
|
<MkFoldableSection :defaultOpen="false" class="item">
|
||||||
<FormSection>
|
<template #header>{{ i18n.ts.notificationDisplay }}</template>
|
||||||
<template #label>{{ i18n.ts.notificationDisplay }}</template>
|
|
||||||
|
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<MkSwitch v-model="useGroupedNotifications">{{ i18n.ts.useGroupedNotifications }}</MkSwitch>
|
<MkSwitch v-model="useGroupedNotifications">{{ i18n.ts.useGroupedNotifications }}</MkSwitch>
|
||||||
|
@ -121,11 +119,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<MkButton @click="testNotification">{{ i18n.ts._notification.checkNotificationBehavior }}</MkButton>
|
<MkButton @click="testNotification">{{ i18n.ts._notification.checkNotificationBehavior }}</MkButton>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
</MkFoldableSection>
|
||||||
|
<MkFoldableSection :defaultOpen="false" class="item">
|
||||||
<FormSection>
|
<template #header>{{ i18n.ts.appearance }}</template>
|
||||||
<template #label>{{ i18n.ts.appearance }}</template>
|
|
||||||
|
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<div class="_gaps_s">
|
<div class="_gaps_s">
|
||||||
<MkSwitch v-model="reduceAnimation">{{ i18n.ts.reduceUiAnimation }}</MkSwitch>
|
<MkSwitch v-model="reduceAnimation">{{ i18n.ts.reduceUiAnimation }}</MkSwitch>
|
||||||
|
@ -139,7 +135,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="disableDrawer">{{ i18n.ts.disableDrawer }}</MkSwitch>
|
<MkSwitch v-model="disableDrawer">{{ i18n.ts.disableDrawer }}</MkSwitch>
|
||||||
<MkSwitch v-model="forceShowAds">{{ i18n.ts.forceShowAds }}</MkSwitch>
|
<MkSwitch v-model="forceShowAds">{{ i18n.ts.forceShowAds }}</MkSwitch>
|
||||||
<MkSwitch v-model="enableGamingMode">{{ i18n.ts.gamingMode }} <template #caption>{{ i18n.ts.gamingModeInfo }} </template></MkSwitch>
|
<MkSwitch v-model="enableGamingMode">{{ i18n.ts.gamingMode }} <template #caption>{{ i18n.ts.gamingModeInfo }} </template></MkSwitch>
|
||||||
<MkSwitch v-model="enableonlyAndWithSave">{{ i18n.ts.onlyAndWithSave}}<template #caption>{{ i18n.ts.onlyAndWithSaveInfo }} </template></MkSwitch>
|
<MkSwitch v-model="enableonlyAndWithSave">{{ i18n.ts.onlyAndWithSave }}<template #caption>{{ i18n.ts.onlyAndWithSaveInfo }} </template></MkSwitch>
|
||||||
<MkSwitch v-model="enablehanntenn">{{ i18n.ts.hanntenn }}<template #caption>{{ i18n.ts.hanntennInfo }} </template></MkSwitch>
|
<MkSwitch v-model="enablehanntenn">{{ i18n.ts.hanntenn }}<template #caption>{{ i18n.ts.hanntennInfo }} </template></MkSwitch>
|
||||||
<MkSwitch v-model="enableSeasonalScreenEffect">{{ i18n.ts.seasonalScreenEffect }}</MkSwitch>
|
<MkSwitch v-model="enableSeasonalScreenEffect">{{ i18n.ts.seasonalScreenEffect }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
|
@ -161,10 +157,9 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<option value="3"><span style="font-size: 17px;">Aa</span></option>
|
<option value="3"><span style="font-size: 17px;">Aa</span></option>
|
||||||
</MkRadios>
|
</MkRadios>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
</MkFoldableSection>
|
||||||
|
<MkFoldableSection :defaultOpen="false" class="item">
|
||||||
<FormSection>
|
<template #header>{{ i18n.ts.behavior }}</template>
|
||||||
<template #label>{{ i18n.ts.behavior }}</template>
|
|
||||||
|
|
||||||
<div class="_gaps_m">
|
<div class="_gaps_m">
|
||||||
<div class="_gaps_s">
|
<div class="_gaps_s">
|
||||||
|
@ -219,7 +214,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</MkFolder>
|
</MkFolder>
|
||||||
</div>
|
</div>
|
||||||
</FormSection>
|
</MkFoldableSection>
|
||||||
|
|
||||||
<FormSection>
|
<FormSection>
|
||||||
<template #label>{{ i18n.ts.other }}</template>
|
<template #label>{{ i18n.ts.other }}</template>
|
||||||
|
@ -261,7 +256,8 @@ import { definePageMetadata } from '@/scripts/page-metadata.js';
|
||||||
import { miLocalStorage } from '@/local-storage.js';
|
import { miLocalStorage } from '@/local-storage.js';
|
||||||
import { globalEvents } from '@/events.js';
|
import { globalEvents } from '@/events.js';
|
||||||
import { claimAchievement } from '@/scripts/achievements.js';
|
import { claimAchievement } from '@/scripts/achievements.js';
|
||||||
import MkColorInput from "@/components/MkColorInput.vue";
|
import MkColorInput from '@/components/MkColorInput.vue';
|
||||||
|
import MkFoldableSection from '@/components/MkFoldableSection.vue';
|
||||||
|
|
||||||
const lang = ref(miLocalStorage.getItem('lang'));
|
const lang = ref(miLocalStorage.getItem('lang'));
|
||||||
const fontSize = ref(miLocalStorage.getItem('fontSize'));
|
const fontSize = ref(miLocalStorage.getItem('fontSize'));
|
||||||
|
@ -323,7 +319,7 @@ const enableonlyAndWithSave = computed(defaultStore.makeGetterSetter('onlyAndWit
|
||||||
const enablehanntenn = computed(defaultStore.makeGetterSetter('enablehanntenn'));
|
const enablehanntenn = computed(defaultStore.makeGetterSetter('enablehanntenn'));
|
||||||
const showMediaTimeline = computed(defaultStore.makeGetterSetter('showMediaTimeline'));
|
const showMediaTimeline = computed(defaultStore.makeGetterSetter('showMediaTimeline'));
|
||||||
const showGlobalTimeline = computed(defaultStore.makeGetterSetter('showGlobalTimeline'));
|
const showGlobalTimeline = computed(defaultStore.makeGetterSetter('showGlobalTimeline'));
|
||||||
const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibilityColor'))
|
const showVisibilityColor = computed(defaultStore.makeGetterSetter('showVisibilityColor'));
|
||||||
const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline'));
|
const disableStreamingTimeline = computed(defaultStore.makeGetterSetter('disableStreamingTimeline'));
|
||||||
const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications'));
|
const useGroupedNotifications = computed(defaultStore.makeGetterSetter('useGroupedNotifications'));
|
||||||
const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect'));
|
const enableSeasonalScreenEffect = computed(defaultStore.makeGetterSetter('enableSeasonalScreenEffect'));
|
||||||
|
@ -333,7 +329,8 @@ watch(lang, () => {
|
||||||
miLocalStorage.removeItem('localeVersion');
|
miLocalStorage.removeItem('localeVersion');
|
||||||
});
|
});
|
||||||
|
|
||||||
document.documentElement.style.setProperty('--gamingspeed', numberOfGamingSpeed.value+'s');
|
document.documentElement.style.setProperty('--gamingspeed', numberOfGamingSpeed.value + 's');
|
||||||
|
|
||||||
function hexToRgb(hex) {
|
function hexToRgb(hex) {
|
||||||
// 16進数のカラーコードから "#" を除去
|
// 16進数のカラーコードから "#" を除去
|
||||||
hex = hex.replace(/^#/, '');
|
hex = hex.replace(/^#/, '');
|
||||||
|
@ -345,17 +342,18 @@ function hexToRgb(hex) {
|
||||||
|
|
||||||
return `${r},${g},${b}`;
|
return `${r},${g},${b}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
document.documentElement.style.setProperty('--homeColor', hexToRgb(homeColor.value));
|
document.documentElement.style.setProperty('--homeColor', hexToRgb(homeColor.value));
|
||||||
document.documentElement.style.setProperty("--followerColor",hexToRgb(followerColor.value));
|
document.documentElement.style.setProperty('--followerColor', hexToRgb(followerColor.value));
|
||||||
document.documentElement.style.setProperty("--specifiedColor",hexToRgb(specifiedColor.value))
|
document.documentElement.style.setProperty('--specifiedColor', hexToRgb(specifiedColor.value));
|
||||||
watch([homeColor,specifiedColor,followerColor], ()=>{
|
watch([homeColor, specifiedColor, followerColor], () => {
|
||||||
document.documentElement.style.setProperty('--homeColor', hexToRgb(homeColor.value));
|
document.documentElement.style.setProperty('--homeColor', hexToRgb(homeColor.value));
|
||||||
document.documentElement.style.setProperty("--followerColor",hexToRgb(followerColor.value));
|
document.documentElement.style.setProperty('--followerColor', hexToRgb(followerColor.value));
|
||||||
document.documentElement.style.setProperty("--specifiedColor",hexToRgb(specifiedColor.value))
|
document.documentElement.style.setProperty('--specifiedColor', hexToRgb(specifiedColor.value));
|
||||||
})
|
});
|
||||||
watch(numberOfGamingSpeed, () =>{
|
watch(numberOfGamingSpeed, () => {
|
||||||
document.documentElement.style.setProperty('--gamingspeed', numberOfGamingSpeed.value+'s');
|
document.documentElement.style.setProperty('--gamingspeed', numberOfGamingSpeed.value + 's');
|
||||||
})
|
});
|
||||||
watch(fontSize, () => {
|
watch(fontSize, () => {
|
||||||
if (fontSize.value == null) {
|
if (fontSize.value == null) {
|
||||||
miLocalStorage.removeItem('fontSize');
|
miLocalStorage.removeItem('fontSize');
|
||||||
|
|
|
@ -5431,6 +5431,7 @@ export type operations = {
|
||||||
updatedAt: string | null;
|
updatedAt: string | null;
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
|
category: string;
|
||||||
url: string;
|
url: string;
|
||||||
roleIdsThatCanBeUsedThisDecoration: string[];
|
roleIdsThatCanBeUsedThisDecoration: string[];
|
||||||
})[];
|
})[];
|
||||||
|
@ -14879,6 +14880,7 @@ export type operations = {
|
||||||
name: string;
|
name: string;
|
||||||
description: string;
|
description: string;
|
||||||
url: string;
|
url: string;
|
||||||
|
category: string;
|
||||||
roleIdsThatCanBeUsedThisDecoration: string[];
|
roleIdsThatCanBeUsedThisDecoration: string[];
|
||||||
}[];
|
}[];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue