enhance(frontend): 画面幅が広いときはメディアを横並びで表示できるようにするオプションを追加 (#16946)
* enhance(frontend): 画面幅が広いときはメディアを横並びで表示できるようにするオプションを追加 * Update Changelog * Update CHANGELOG.md
This commit is contained in:
parent
4a0edf348a
commit
bc5aef846b
|
|
@ -13,6 +13,7 @@
|
||||||
- Enhance: ドライブのファイル一覧で自動でもっと見るを利用可能に
|
- Enhance: ドライブのファイル一覧で自動でもっと見るを利用可能に
|
||||||
- Enhance: ウィジェットの表示設定をプレビューを見ながら行えるように
|
- Enhance: ウィジェットの表示設定をプレビューを見ながら行えるように
|
||||||
- Enhance: ウィジェットの設定項目のラベルの多言語対応
|
- Enhance: ウィジェットの設定項目のラベルの多言語対応
|
||||||
|
- Enhance: 画面幅が広いときにメディアを横並びで表示できるようにするオプションを追加
|
||||||
- Enhance: パフォーマンスの向上
|
- Enhance: パフォーマンスの向上
|
||||||
- Fix: ドライブクリーナーでファイルを削除しても画面に反映されない問題を修正 #16061
|
- Fix: ドライブクリーナーでファイルを削除しても画面に反映されない問題を修正 #16061
|
||||||
- Fix: 非ログイン時にログインを求めるダイアログが表示された後にダイアログのぼかしが解除されず操作不能になることがある問題を修正
|
- Fix: 非ログイン時にログインを求めるダイアログが表示された後にダイアログのぼかしが解除されず操作不能になることがある問題を修正
|
||||||
|
|
|
||||||
|
|
@ -543,6 +543,7 @@ regenerate: "再生成"
|
||||||
fontSize: "フォントサイズ"
|
fontSize: "フォントサイズ"
|
||||||
mediaListWithOneImageAppearance: "画像が1枚のみのメディアリストの高さ"
|
mediaListWithOneImageAppearance: "画像が1枚のみのメディアリストの高さ"
|
||||||
limitTo: "{x}を上限に"
|
limitTo: "{x}を上限に"
|
||||||
|
showMediaListByGridInWideArea: "画面幅が広いときはメディアリストを横並びで表示する"
|
||||||
noFollowRequests: "フォロー申請はありません"
|
noFollowRequests: "フォロー申請はありません"
|
||||||
openImageInNewTab: "画像を新しいタブで開く"
|
openImageInNewTab: "画像を新しいタブで開く"
|
||||||
dashboard: "ダッシュボード"
|
dashboard: "ダッシュボード"
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div :class="$style.root">
|
||||||
<XBanner v-for="media in mediaList.filter(media => !previewable(media))" :key="media.id" :media="media"/>
|
<XBanner v-for="media in mediaList.filter(media => !previewable(media))" :key="media.id" :media="media"/>
|
||||||
<div v-if="mediaList.filter(media => previewable(media)).length > 0" :class="$style.container">
|
<div v-if="mediaList.filter(media => previewable(media)).length > 0" :class="$style.container">
|
||||||
<div
|
<div
|
||||||
ref="gallery"
|
ref="gallery"
|
||||||
:class="[
|
:class="[
|
||||||
$style.medias,
|
$style.medias,
|
||||||
|
...(prefer.s.showMediaListByGridInWideArea ? [$style.gridInWideArea] : []),
|
||||||
count === 1 ? [$style.n1, {
|
count === 1 ? [$style.n1, {
|
||||||
[$style.n116_9]: prefer.s.mediaListWithOneImageAppearance === '16_9',
|
[$style.n116_9]: prefer.s.mediaListWithOneImageAppearance === '16_9',
|
||||||
[$style.n11_1]: prefer.s.mediaListWithOneImageAppearance === '1_1',
|
[$style.n11_1]: prefer.s.mediaListWithOneImageAppearance === '1_1',
|
||||||
|
|
@ -230,6 +231,10 @@ defineExpose({
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" module>
|
<style lang="scss" module>
|
||||||
|
.root {
|
||||||
|
container-type: inline-size;
|
||||||
|
}
|
||||||
|
|
||||||
.container {
|
.container {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
@ -313,6 +318,20 @@ defineExpose({
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@container (min-width: 500px) {
|
||||||
|
.medias.gridInWideArea {
|
||||||
|
display: grid;
|
||||||
|
aspect-ratio: auto;
|
||||||
|
grid-template-columns: repeat(4, 1fr);
|
||||||
|
grid-template-rows: auto;
|
||||||
|
grid-gap: 8px;
|
||||||
|
|
||||||
|
> .media {
|
||||||
|
aspect-ratio: 1 / 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:global(.pswp) {
|
:global(.pswp) {
|
||||||
--pswp-root-z-index: var(--mk-pswp-root-z-index, 2000700) !important;
|
--pswp-root-z-index: var(--mk-pswp-root-z-index, 2000700) !important;
|
||||||
--pswp-bg: var(--MI_THEME-modalBg) !important;
|
--pswp-bg: var(--MI_THEME-modalBg) !important;
|
||||||
|
|
|
||||||
|
|
@ -705,7 +705,7 @@ onDeactivated(() => {
|
||||||
.controlButton {
|
.controlButton {
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
border-radius: calc(var(--MI-radius) / 2);
|
border-radius: calc(var(--MI-radius) / 2);
|
||||||
transition: background-color .2s ease-in-out;
|
transition: background-color .15s ease;
|
||||||
font-size: 1.05rem;
|
font-size: 1.05rem;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
@ -760,4 +760,21 @@ onDeactivated(() => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@container (max-width: 300px) {
|
||||||
|
.videoControls {
|
||||||
|
grid-template-areas:
|
||||||
|
"left . right"
|
||||||
|
"seekbar seekbar seekbar";
|
||||||
|
grid-template-columns: auto 1fr auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controlsTime {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.controlsVolume {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -269,6 +269,14 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
</MkPreferenceContainer>
|
</MkPreferenceContainer>
|
||||||
</SearchMarker>
|
</SearchMarker>
|
||||||
|
|
||||||
|
<SearchMarker :keywords="['attachment', 'image', 'photo', 'picture', 'media', 'thumbnail', 'grid', 'wide', 'area']">
|
||||||
|
<MkPreferenceContainer k="showMediaListByGridInWideArea">
|
||||||
|
<MkSwitch v-model="showMediaListByGridInWideArea">
|
||||||
|
<template #label><SearchLabel>{{ i18n.ts.showMediaListByGridInWideArea }}</SearchLabel></template>
|
||||||
|
</MkSwitch>
|
||||||
|
</MkPreferenceContainer>
|
||||||
|
</SearchMarker>
|
||||||
|
|
||||||
<SearchMarker :keywords="['ticker', 'information', 'label', 'instance', 'server', 'host', 'federation']">
|
<SearchMarker :keywords="['ticker', 'information', 'label', 'instance', 'server', 'host', 'federation']">
|
||||||
<MkPreferenceContainer k="instanceTicker">
|
<MkPreferenceContainer k="instanceTicker">
|
||||||
<MkSelect
|
<MkSelect
|
||||||
|
|
@ -890,6 +898,7 @@ const notificationStackAxis = prefer.model('notificationStackAxis');
|
||||||
const instanceTicker = prefer.model('instanceTicker');
|
const instanceTicker = prefer.model('instanceTicker');
|
||||||
const highlightSensitiveMedia = prefer.model('highlightSensitiveMedia');
|
const highlightSensitiveMedia = prefer.model('highlightSensitiveMedia');
|
||||||
const mediaListWithOneImageAppearance = prefer.model('mediaListWithOneImageAppearance');
|
const mediaListWithOneImageAppearance = prefer.model('mediaListWithOneImageAppearance');
|
||||||
|
const showMediaListByGridInWideArea = prefer.model('showMediaListByGridInWideArea');
|
||||||
const reactionsDisplaySize = prefer.model('reactionsDisplaySize');
|
const reactionsDisplaySize = prefer.model('reactionsDisplaySize');
|
||||||
const limitWidthOfReaction = prefer.model('limitWidthOfReaction');
|
const limitWidthOfReaction = prefer.model('limitWidthOfReaction');
|
||||||
const squareAvatars = prefer.model('squareAvatars');
|
const squareAvatars = prefer.model('squareAvatars');
|
||||||
|
|
|
||||||
|
|
@ -320,6 +320,9 @@ export const PREF_DEF = definePreferences({
|
||||||
mediaListWithOneImageAppearance: {
|
mediaListWithOneImageAppearance: {
|
||||||
default: 'expand' as 'expand' | '16_9' | '1_1' | '2_3',
|
default: 'expand' as 'expand' | '16_9' | '1_1' | '2_3',
|
||||||
},
|
},
|
||||||
|
showMediaListByGridInWideArea: {
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
notificationPosition: {
|
notificationPosition: {
|
||||||
default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom',
|
default: 'rightBottom' as 'leftTop' | 'leftBottom' | 'rightTop' | 'rightBottom',
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -2184,6 +2184,10 @@ export interface Locale extends ILocale {
|
||||||
* {x}を上限に
|
* {x}を上限に
|
||||||
*/
|
*/
|
||||||
"limitTo": ParameterizedString<"x">;
|
"limitTo": ParameterizedString<"x">;
|
||||||
|
/**
|
||||||
|
* 画面幅が広いときはメディアリストを横並びで表示する
|
||||||
|
*/
|
||||||
|
"showMediaListByGridInWideArea": string;
|
||||||
/**
|
/**
|
||||||
* フォロー申請はありません
|
* フォロー申請はありません
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue