なんかもう色々変えた
This commit is contained in:
parent
984c8b73cc
commit
62b70f85f0
|
@ -1029,6 +1029,9 @@ noteIdOrUrl: "Note ID or URL"
|
||||||
video: "Video"
|
video: "Video"
|
||||||
videos: "Videos"
|
videos: "Videos"
|
||||||
dataSaver: "Data Saver"
|
dataSaver: "Data Saver"
|
||||||
|
cellularWithDataSaver: "Turn on Data Saver in Mobile Data Communications"
|
||||||
|
UltimatedataSaver: "Ultimate Data Saver"
|
||||||
|
cellularWithUltimateDataSaver: "Turn on Ultimate Data Saver in Mobile Data Communications"
|
||||||
accountMigration: "Account Migration"
|
accountMigration: "Account Migration"
|
||||||
accountMoved: "This user has moved to a new account:"
|
accountMoved: "This user has moved to a new account:"
|
||||||
accountMovedShort: "This account has been migrated."
|
accountMovedShort: "This account has been migrated."
|
||||||
|
|
|
@ -1033,6 +1033,8 @@ export interface Locale {
|
||||||
"videos": string;
|
"videos": string;
|
||||||
"dataSaver": string;
|
"dataSaver": string;
|
||||||
"cellularWithDataSaver": string;
|
"cellularWithDataSaver": string;
|
||||||
|
"UltimateDataSaver": string;
|
||||||
|
"cellularWithUltimateDataSaver": string;
|
||||||
"accountMigration": string;
|
"accountMigration": string;
|
||||||
"accountMoved": string;
|
"accountMoved": string;
|
||||||
"accountMovedShort": string;
|
"accountMovedShort": string;
|
||||||
|
|
|
@ -1030,6 +1030,8 @@ video: "動画"
|
||||||
videos: "動画"
|
videos: "動画"
|
||||||
dataSaver: "データセーバー"
|
dataSaver: "データセーバー"
|
||||||
cellularWithDataSaver: "モバイルデータ通信でデータセーバーをオンにする"
|
cellularWithDataSaver: "モバイルデータ通信でデータセーバーをオンにする"
|
||||||
|
UltimateDataSaver: "究極のデータセーバー"
|
||||||
|
cellularWithUltimateDataSaver: "モバイルデータ通信で究極のデータセーバーをオンにする"
|
||||||
accountMigration: "アカウントの移行"
|
accountMigration: "アカウントの移行"
|
||||||
accountMoved: "このユーザーは新しいアカウントに移行しました:"
|
accountMoved: "このユーザーは新しいアカウントに移行しました:"
|
||||||
accountMovedShort: "このアカウントは移行されています"
|
accountMovedShort: "このアカウントは移行されています"
|
||||||
|
|
|
@ -341,7 +341,7 @@ export class FileServerService {
|
||||||
} else {
|
} else {
|
||||||
const data = (await sharpBmp(file.path, file.mime, { animated: !('static' in request.query) }))
|
const data = (await sharpBmp(file.path, file.mime, { animated: !('static' in request.query) }))
|
||||||
.resize({
|
.resize({
|
||||||
height: 64,
|
height: 32,
|
||||||
withoutEnlargement: true,
|
withoutEnlargement: true,
|
||||||
})
|
})
|
||||||
.webp(webpDefault);
|
.webp(webpDefault);
|
||||||
|
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="$style.root" :style="bg">
|
<div :class="$style.root" :style="bg">
|
||||||
<img v-if="faviconUrl && !defaultStore.state.enableDataSaverMode" :class="$style.icon" :src="faviconUrl"/>
|
<img v-if="faviconUrl && !defaultStore.state.enableUltimateDataSaverMode" :class="$style.icon" :src="faviconUrl"/>
|
||||||
<div :class="$style.name">{{ instance.name }}</div>
|
<div :class="$style.name">{{ instance.name }}</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -5,7 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<component :is="link ? MkA : 'span'" v-user-preview="preview ? user.id : undefined" v-bind="bound" class="_noSelect" :class="[$style.root, { [$style.animation]: animation, [$style.cat]: user.isCat, [$style.square]: squareAvatars }]" :style="{ color }" :title="acct(user)" @click="onClick">
|
<component :is="link ? MkA : 'span'" v-user-preview="preview ? user.id : undefined" v-bind="bound" class="_noSelect" :class="[$style.root, { [$style.animation]: animation, [$style.cat]: user.isCat, [$style.square]: squareAvatars }]" :style="{ color }" :title="acct(user)" @click="onClick">
|
||||||
<MkImgWithBlurhash :class="$style.inner" :src="defaultStore.state.enableDataSaverMode ? undefined : url" :hash="user?.avatarBlurhash" :cover="true" :onlyAvgColor="true"/>
|
<MkImgWithBlurhash :class="$style.inner" :src="defaultStore.state.enableUltimateDataSaverMode ? undefined : url" :hash="user?.avatarBlurhash" :cover="true" :onlyAvgColor="true"/>
|
||||||
<MkUserOnlineIndicator v-if="indicator" :class="$style.indicator" :user="user"/>
|
<MkUserOnlineIndicator v-if="indicator" :class="$style.indicator" :user="user"/>
|
||||||
<div v-if="user.isCat" :class="[$style.ears]">
|
<div v-if="user.isCat" :class="[$style.ears]">
|
||||||
<div :class="$style.earLeft">
|
<div :class="$style.earLeft">
|
||||||
|
|
|
@ -39,7 +39,7 @@ const rawUrl = computed(() => {
|
||||||
const url = computed(() => {
|
const url = computed(() => {
|
||||||
if (rawUrl.value == null) return null;
|
if (rawUrl.value == null) return null;
|
||||||
const useOriginalSize = props.useOriginalSize;
|
const useOriginalSize = props.useOriginalSize;
|
||||||
const enableDataSaverMode = defaultStore.state.enableDataSaverMode;
|
const enableDataSaverMode = defaultStore.state.enableUltimateDataSaverMode;
|
||||||
let datasaver_result ;
|
let datasaver_result ;
|
||||||
if (enableDataSaverMode) {
|
if (enableDataSaverMode) {
|
||||||
datasaver_result = useOriginalSize ? undefined : 'datasaver';
|
datasaver_result = useOriginalSize ? undefined : 'datasaver';
|
||||||
|
|
|
@ -113,8 +113,10 @@ SPDX-License-Identifier: AGPL-3.0-only
|
||||||
<MkSwitch v-model="useSystemFont">{{ i18n.ts.useSystemFont }}</MkSwitch>
|
<MkSwitch v-model="useSystemFont">{{ i18n.ts.useSystemFont }}</MkSwitch>
|
||||||
<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="enableDataSaverMode">{{ i18n.ts.dataSaver }}</MkSwitch>
|
<MkSwitch :disabled="enableUltimateDataSaverMode || enableCellularWithUltimateDataSaver" v-model="enableDataSaverMode">{{ i18n.ts.dataSaver }}</MkSwitch>
|
||||||
<MkSwitch v-model="enableCellularWithDataSaver">{{ i18n.ts.cellularWithDataSaver }}</MkSwitch>
|
<MkSwitch :disabled="enableUltimateDataSaverMode || enableCellularWithUltimateDataSaver" v-model="enableCellularWithDataSaver">{{ i18n.ts.cellularWithDataSaver }}</MkSwitch>
|
||||||
|
<MkSwitch v-model="enableUltimateDataSaverMode">{{ i18n.ts.UltimateDataSaver }}</MkSwitch>
|
||||||
|
<MkSwitch v-model="enableCellularWithUltimateDataSaver">{{ i18n.ts.cellularWithUltimateDataSaver }}</MkSwitch>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<MkRadios v-model="emojiStyle">
|
<MkRadios v-model="emojiStyle">
|
||||||
|
@ -230,6 +232,8 @@ const forceShowAds = computed(defaultStore.makeGetterSetter('forceShowAds'));
|
||||||
const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages'));
|
const loadRawImages = computed(defaultStore.makeGetterSetter('loadRawImages'));
|
||||||
const enableDataSaverMode = computed(defaultStore.makeGetterSetter('enableDataSaverMode')) ;
|
const enableDataSaverMode = computed(defaultStore.makeGetterSetter('enableDataSaverMode')) ;
|
||||||
const enableCellularWithDataSaver = computed(defaultStore.makeGetterSetter('enableCellularWithDataSaver'));
|
const enableCellularWithDataSaver = computed(defaultStore.makeGetterSetter('enableCellularWithDataSaver'));
|
||||||
|
const enableUltimateDataSaverMode = computed(defaultStore.makeGetterSetter('enableUltimateDataSaverMode'))
|
||||||
|
const enableCellularWithUltimateDataSaver = computed(defaultStore.makeGetterSetter('enableCellularWithUltimateDataSaver'));
|
||||||
const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab'));
|
const imageNewTab = computed(defaultStore.makeGetterSetter('imageNewTab'));
|
||||||
const nsfw = computed(defaultStore.makeGetterSetter('nsfw'));
|
const nsfw = computed(defaultStore.makeGetterSetter('nsfw'));
|
||||||
const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm'));
|
const showFixedPostForm = computed(defaultStore.makeGetterSetter('showFixedPostForm'));
|
||||||
|
@ -244,6 +248,8 @@ const notificationPosition = computed(defaultStore.makeGetterSetter('notificatio
|
||||||
const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis'));
|
const notificationStackAxis = computed(defaultStore.makeGetterSetter('notificationStackAxis'));
|
||||||
const showTimelineReplies = computed(defaultStore.makeGetterSetter('showTimelineReplies'));
|
const showTimelineReplies = computed(defaultStore.makeGetterSetter('showTimelineReplies'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
watch(lang, () => {
|
watch(lang, () => {
|
||||||
miLocalStorage.setItem('lang', lang.value as string);
|
miLocalStorage.setItem('lang', lang.value as string);
|
||||||
miLocalStorage.removeItem('locale');
|
miLocalStorage.removeItem('locale');
|
||||||
|
|
|
@ -204,10 +204,18 @@ export const defaultStore = markRaw(new Storage('base', {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
enableUltimateDataSaverMode: {
|
||||||
|
where: 'device',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
enableCellularWithDataSaver: {
|
enableCellularWithDataSaver: {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
enableCellularWithUltimateDataSaver: {
|
||||||
|
where: 'device',
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
disableShowingAnimatedImages: {
|
disableShowingAnimatedImages: {
|
||||||
where: 'device',
|
where: 'device',
|
||||||
default: window.matchMedia('(prefers-reduced-motion)').matches,
|
default: window.matchMedia('(prefers-reduced-motion)').matches,
|
||||||
|
|
|
@ -130,6 +130,18 @@ const DESKTOP_THRESHOLD = 1100;
|
||||||
const MOBILE_THRESHOLD = 500;
|
const MOBILE_THRESHOLD = 500;
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
if (
|
||||||
|
window.navigator.connection.type === "cellular" &&
|
||||||
|
!defaultStore.state.enableUltimateDataSaverMode &&
|
||||||
|
defaultStore.state.enableCellularWithUltimateDataSaver
|
||||||
|
) {
|
||||||
|
defaultStore.state.enableDataSaverMode = true;
|
||||||
|
defaultStore.state.enableUltimateDataSaverMode = true;
|
||||||
|
} else if (window.navigator.connection.type !== "cellular" && window.navigator.connection.type !== "undefined" && defaultStore.state.enableDataSaverMode && defaultStore.state.enableCellularWithDataSaver) {
|
||||||
|
defaultStore.state.enableDataSaverMode = false;
|
||||||
|
defaultStore.state.enableUltimateDataSaverMode = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
window.navigator.connection.type === "cellular" &&
|
window.navigator.connection.type === "cellular" &&
|
||||||
!defaultStore.state.enableDataSaverMode &&
|
!defaultStore.state.enableDataSaverMode &&
|
||||||
|
@ -140,6 +152,9 @@ onMounted(() => {
|
||||||
} else if (window.navigator.connection.type !== "cellular" && window.navigator.connection.type !== "undefined" && defaultStore.state.enableDataSaverMode && defaultStore.state.enableCellularWithDataSaver) {
|
} else if (window.navigator.connection.type !== "cellular" && window.navigator.connection.type !== "undefined" && defaultStore.state.enableDataSaverMode && defaultStore.state.enableCellularWithDataSaver) {
|
||||||
defaultStore.state.enableDataSaverMode = false;
|
defaultStore.state.enableDataSaverMode = false;
|
||||||
}
|
}
|
||||||
|
if (defaultStore.state.enableUltimateDataSaverMode) {
|
||||||
|
defaultStore.state.enableDataSaverMode = true;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
// デスクトップでウィンドウを狭くしたときモバイルUIが表示されて欲しいことはあるので deviceKind === 'desktop' の判定は行わない
|
||||||
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
const isDesktop = ref(window.innerWidth >= DESKTOP_THRESHOLD);
|
||||||
|
|
|
@ -50,7 +50,7 @@ export function getConfig(): UserConfig {
|
||||||
},
|
},
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
compression(),
|
compression({ algorithm: 'brotliCompress'}),
|
||||||
pluginVue({
|
pluginVue({
|
||||||
reactivityTransform: true,
|
reactivityTransform: true,
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in New Issue