mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 02:13:08 +02:00
merge: another batch of small ui tweaks (#255)
This commit is contained in:
commit
2201cd6d0c
16 changed files with 40 additions and 27 deletions
|
@ -198,7 +198,7 @@ const bannerStyle = computed(() => {
|
||||||
transform: translate(25%, -25%);
|
transform: translate(25%, -25%);
|
||||||
background-color: var(--accent);
|
background-color: var(--accent);
|
||||||
border: solid var(--bg) 4px;
|
border: solid var(--bg) 4px;
|
||||||
border-radius: 100%;
|
border-radius: var(--radius-full);
|
||||||
width: 1.5rem;
|
width: 1.5rem;
|
||||||
height: 1.5rem;
|
height: 1.5rem;
|
||||||
aspect-ratio: 1 / 1;
|
aspect-ratio: 1 / 1;
|
||||||
|
|
|
@ -62,7 +62,7 @@ watch(() => props.lang, (to) => {
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
|
|
||||||
& pre,
|
& pre,
|
||||||
& code {
|
& code {
|
||||||
|
|
|
@ -56,7 +56,7 @@ const XCode = defineAsyncComponent(() => import('@/components/MkCode.core.vue'))
|
||||||
padding: 1em;
|
padding: 1em;
|
||||||
margin: .5em 0;
|
margin: .5em 0;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
}
|
}
|
||||||
|
|
||||||
.codeBlockFallbackCode {
|
.codeBlockFallbackCode {
|
||||||
|
@ -74,7 +74,7 @@ const XCode = defineAsyncComponent(() => import('@/components/MkCode.core.vue'))
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
padding: 24px;
|
padding: 24px;
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
color: #D4D4D4;
|
color: #D4D4D4;
|
||||||
|
|
|
@ -161,7 +161,7 @@ watch(v, newValue => {
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
padding: 0;
|
padding: 0;
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
border: solid 1px var(--panel);
|
border: solid 1px var(--panel);
|
||||||
|
@ -202,7 +202,7 @@ watch(v, newValue => {
|
||||||
caret-color: rgb(225, 228, 232);
|
caret-color: rgb(225, 228, 232);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 0;
|
border: 0;
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
outline: 0;
|
outline: 0;
|
||||||
min-width: calc(100% - 24px);
|
min-width: calc(100% - 24px);
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
|
@ -6,7 +6,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<template>
|
<template>
|
||||||
<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
|
<!-- このコンポーネントの要素のclassは親から利用されるのでむやみに弄らないこと -->
|
||||||
<!-- フォルダの中にはカスタム絵文字だけ(Unicode絵文字もこっち) -->
|
<!-- フォルダの中にはカスタム絵文字だけ(Unicode絵文字もこっち) -->
|
||||||
<section v-if="!hasChildSection" v-panel style="border-radius: 6px; border-bottom: 0.5px solid var(--divider);">
|
<section v-if="!hasChildSection" v-panel style="border-radius: var(--radius-sm); border-bottom: 0.5px solid var(--divider);">
|
||||||
<header class="_acrylic" @click="shown = !shown">
|
<header class="_acrylic" @click="shown = !shown">
|
||||||
<i class="toggle ti-fw" :class="shown ? 'ph-caret-down ph-bold ph-lg' : 'ph-caret-up ph-bold ph-lg'"></i> <slot></slot> (<i class="ph-bold ph-lg"></i>:{{ emojis.length }})
|
<i class="toggle ti-fw" :class="shown ? 'ph-caret-down ph-bold ph-lg' : 'ph-caret-up ph-bold ph-lg'"></i> <slot></slot> (<i class="ph-bold ph-lg"></i>:{{ emojis.length }})
|
||||||
</header>
|
</header>
|
||||||
|
@ -25,7 +25,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
<!-- フォルダの中にはカスタム絵文字やフォルダがある -->
|
<!-- フォルダの中にはカスタム絵文字やフォルダがある -->
|
||||||
<section v-else v-panel style="border-radius: 6px; border-bottom: 0.5px solid var(--divider);">
|
<section v-else v-panel style="border-radius: var(--radius-sm); border-bottom: 0.5px solid var(--divider);">
|
||||||
<header class="_acrylic" @click="shown = !shown">
|
<header class="_acrylic" @click="shown = !shown">
|
||||||
<i class="toggle ti-fw" :class="shown ? 'ph-caret-down ph-bold ph-lg' : 'ph-caret-up ph-bold ph-lg'"></i> <slot></slot> (<i class="ph-folder ph-bold ph-lg"></i>:{{ customEmojiTree.length }} <i class="ti ti-icons ti-fw"></i>:{{ emojis.length }})
|
<i class="toggle ti-fw" :class="shown ? 'ph-caret-down ph-bold ph-lg' : 'ph-caret-up ph-bold ph-lg'"></i> <slot></slot> (<i class="ph-folder ph-bold ph-lg"></i>:{{ customEmojiTree.length }} <i class="ti ti-icons ti-fw"></i>:{{ emojis.length }})
|
||||||
</header>
|
</header>
|
||||||
|
|
|
@ -14,7 +14,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<audio
|
<audio
|
||||||
ref="audioEl"
|
ref="audioEl"
|
||||||
:src="media.url"
|
:src="media.url"
|
||||||
:title="media.name"
|
:title="media.comment ?? undefined"
|
||||||
controls
|
controls
|
||||||
preload="metadata"
|
preload="metadata"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -8,10 +8,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<component
|
<component
|
||||||
:is="disableImageLink ? 'div' : 'a'"
|
:is="disableImageLink ? 'div' : 'a'"
|
||||||
v-bind="disableImageLink ? {
|
v-bind="disableImageLink ? {
|
||||||
title: image.name,
|
title: image.comment,
|
||||||
class: $style.imageContainer,
|
class: $style.imageContainer,
|
||||||
} : {
|
} : {
|
||||||
title: image.name,
|
title: image.comment,
|
||||||
class: $style.imageContainer,
|
class: $style.imageContainer,
|
||||||
href: image.url,
|
href: image.url,
|
||||||
style: 'cursor: zoom-in;'
|
style: 'cursor: zoom-in;'
|
||||||
|
@ -22,8 +22,8 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
:src="(defaultStore.state.dataSaver.media && hide) ? null : url"
|
:src="(defaultStore.state.dataSaver.media && hide) ? null : url"
|
||||||
:forceBlurhash="hide"
|
:forceBlurhash="hide"
|
||||||
:cover="hide || cover"
|
:cover="hide || cover"
|
||||||
:alt="image.comment || image.name"
|
:alt="image.comment"
|
||||||
:title="image.comment || image.name"
|
:title="image.comment"
|
||||||
:width="image.properties.width"
|
:width="image.properties.width"
|
||||||
:height="image.properties.height"
|
:height="image.properties.height"
|
||||||
:style="hide ? 'filter: brightness(0.7);' : null"
|
:style="hide ? 'filter: brightness(0.7);' : null"
|
||||||
|
|
|
@ -156,8 +156,8 @@ onMounted(() => {
|
||||||
[itemData.w, itemData.h] = [itemData.h, itemData.w];
|
[itemData.w, itemData.h] = [itemData.h, itemData.w];
|
||||||
}
|
}
|
||||||
itemData.msrc = file.thumbnailUrl;
|
itemData.msrc = file.thumbnailUrl;
|
||||||
itemData.alt = file.comment ?? file.name;
|
itemData.alt = file.comment ?? undefined;
|
||||||
itemData.comment = file.comment ?? file.name;
|
itemData.comment = file.comment;
|
||||||
itemData.thumbCropped = true;
|
itemData.thumbCropped = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -172,6 +172,12 @@ onMounted(() => {
|
||||||
el.appendChild(textBox);
|
el.appendChild(textBox);
|
||||||
|
|
||||||
pwsp.on('change', (a) => {
|
pwsp.on('change', (a) => {
|
||||||
|
if (pwsp.currSlide?.data.comment) {
|
||||||
|
textBox.style.display = '';
|
||||||
|
} else {
|
||||||
|
textBox.style.display = 'none';
|
||||||
|
}
|
||||||
|
|
||||||
textBox.textContent = pwsp.currSlide.data.comment;
|
textBox.textContent = pwsp.currSlide.data.comment;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,7 +17,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
ref="videoEl"
|
ref="videoEl"
|
||||||
:class="$style.video"
|
:class="$style.video"
|
||||||
:poster="video.thumbnailUrl"
|
:poster="video.thumbnailUrl"
|
||||||
:title="video.comment"
|
:title="video.comment ?? undefined"
|
||||||
:alt="video.comment"
|
:alt="video.comment"
|
||||||
preload="none"
|
preload="none"
|
||||||
controls
|
controls
|
||||||
|
|
|
@ -923,12 +923,19 @@ onMounted(() => {
|
||||||
if (!props.instant && !props.mention && !props.specified && !props.mock) {
|
if (!props.instant && !props.mention && !props.specified && !props.mock) {
|
||||||
const draft = JSON.parse(miLocalStorage.getItem('drafts') ?? '{}')[draftKey.value];
|
const draft = JSON.parse(miLocalStorage.getItem('drafts') ?? '{}')[draftKey.value];
|
||||||
if (draft) {
|
if (draft) {
|
||||||
|
if (typeof draft.data.text === 'string' && draft.data.text.trim()) {
|
||||||
text.value = draft.data.text;
|
text.value = draft.data.text;
|
||||||
useCw.value = draft.data.useCw;
|
}
|
||||||
|
|
||||||
|
if (typeof draft.data.cw === 'string' && draft.data.cw.trim()) {
|
||||||
cw.value = draft.data.cw;
|
cw.value = draft.data.cw;
|
||||||
|
}
|
||||||
|
|
||||||
|
useCw.value = draft.data.useCw;
|
||||||
visibility.value = draft.data.visibility;
|
visibility.value = draft.data.visibility;
|
||||||
localOnly.value = draft.data.localOnly;
|
localOnly.value = draft.data.localOnly;
|
||||||
files.value = (draft.data.files || []).filter(draftFile => draftFile);
|
files.value = (draft.data.files || []).filter(draftFile => draftFile);
|
||||||
|
|
||||||
if (draft.data.poll) {
|
if (draft.data.poll) {
|
||||||
poll.value = draft.data.poll;
|
poll.value = draft.data.poll;
|
||||||
}
|
}
|
||||||
|
@ -1052,7 +1059,7 @@ defineExpose({
|
||||||
left: 12px;
|
left: 12px;
|
||||||
width: 5px;
|
width: 5px;
|
||||||
height: 100% ;
|
height: 100% ;
|
||||||
border-radius: 999px;
|
border-radius: var(--radius-ellipse);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -132,7 +132,7 @@ const isRenote = (
|
||||||
);
|
);
|
||||||
|
|
||||||
const el = shallowRef<HTMLElement>();
|
const el = shallowRef<HTMLElement>();
|
||||||
let appearNote = computed(() => isRenote ? note.value.renote as Misskey.entities.Note : note);
|
let appearNote = computed(() => isRenote ? note.value.renote as Misskey.entities.Note : note.value);
|
||||||
const renoteUrl = appearNote.value.renote ? appearNote.value.renote.url : null;
|
const renoteUrl = appearNote.value.renote ? appearNote.value.renote.url : null;
|
||||||
const renoteUri = appearNote.value.renote ? appearNote.value.renote.uri : null;
|
const renoteUri = appearNote.value.renote ? appearNote.value.renote.uri : null;
|
||||||
|
|
||||||
|
|
|
@ -277,7 +277,7 @@ export default function(props: MfmProps) {
|
||||||
const child = token.children[0];
|
const child = token.children[0];
|
||||||
const unixtime = parseInt(child.type === 'text' ? child.props.text : '');
|
const unixtime = parseInt(child.type === 'text' ? child.props.text : '');
|
||||||
return h('span', {
|
return h('span', {
|
||||||
style: 'display: inline-block; font-size: 90%; border: solid 1px var(--divider); border-radius: 999px; padding: 4px 10px 4px 6px;',
|
style: 'display: inline-block; font-size: 90%; border: solid 1px var(--divider); border-radius: var(--radius-ellipse); padding: 4px 10px 4px 6px;',
|
||||||
}, [
|
}, [
|
||||||
h('i', {
|
h('i', {
|
||||||
class: 'ph-clock ph-bold ph-lg',
|
class: 'ph-clock ph-bold ph-lg',
|
||||||
|
|
|
@ -42,7 +42,7 @@ const emit = defineEmits<{
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 16px 16px 28px 16px;
|
padding: 16px 16px 28px 16px;
|
||||||
border: solid 2px var(--divider);
|
border: solid 2px var(--divider);
|
||||||
border-radius: 8px;
|
border-radius: var(--radius-sm);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 90%;
|
font-size: 90%;
|
||||||
overflow: clip;
|
overflow: clip;
|
||||||
|
|
|
@ -12,7 +12,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div>
|
<div>
|
||||||
<div v-panel style="border-radius: 6px;">
|
<div v-panel style="border-radius: var(--radius-sm);">
|
||||||
<Sortable
|
<Sortable
|
||||||
v-model="pinnedEmojisForReaction"
|
v-model="pinnedEmojisForReaction"
|
||||||
:class="$style.emojis"
|
:class="$style.emojis"
|
||||||
|
@ -52,7 +52,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<div class="_gaps">
|
<div class="_gaps">
|
||||||
<div>
|
<div>
|
||||||
<div v-panel style="border-radius: 6px;">
|
<div v-panel style="border-radius: var(--radius-sm);">
|
||||||
<Sortable
|
<Sortable
|
||||||
v-model="pinnedEmojis"
|
v-model="pinnedEmojis"
|
||||||
:class="$style.emojis"
|
:class="$style.emojis"
|
||||||
|
|
|
@ -107,7 +107,7 @@ const suspended = computed(() => props.user.isSuspended ?? false);
|
||||||
> .moderator {
|
> .moderator {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border: solid 1px;
|
border: solid 1px;
|
||||||
border-radius: 6px;
|
border-radius: var(--radius-sm);
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
font-size: 85%;
|
font-size: 85%;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}"
|
v-on="navbarItemDef[item].action ? { click: navbarItemDef[item].action } : {}"
|
||||||
>
|
>
|
||||||
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span>
|
<i class="ti-fw" :class="[$style.itemIcon, navbarItemDef[item].icon]"></i><span :class="$style.itemText">{{ navbarItemDef[item].title }}</span>
|
||||||
<span v-if="navbarItemDef[item].indicated" :class="[$style.itemIndicator, { [$style.hasItemIndicateValueIcon]: navbarItemDef[item].indicateValue }]">
|
<span v-if="navbarItemDef[item].indicated" :class="$style.itemIndicator">
|
||||||
<span v-if="navbarItemDef[item].indicateValue" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
<span v-if="navbarItemDef[item].indicateValue" class="_indicateCounter" :class="$style.itemIndicateValueIcon">{{ navbarItemDef[item].indicateValue }}</span>
|
||||||
<i v-else class="_indicatorCircle"></i>
|
<i v-else class="_indicatorCircle"></i>
|
||||||
</span>
|
</span>
|
||||||
|
@ -315,7 +315,7 @@ function more(ev: MouseEvent) {
|
||||||
font-size: 8px;
|
font-size: 8px;
|
||||||
animation: blink 1s infinite;
|
animation: blink 1s infinite;
|
||||||
|
|
||||||
&.hasItemIndicateValueIcon {
|
&:has(.itemIndicateValueIcon) {
|
||||||
animation: none;
|
animation: none;
|
||||||
left: auto;
|
left: auto;
|
||||||
right: 40px;
|
right: 40px;
|
||||||
|
|
Loading…
Reference in a new issue