Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG-nightly.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.1.26.1000

- Added setting to resize GIFs in chat (Site Layout -> Chat)

## 3.1.25.1000

- Fixed Kick Emote Menu position
Expand Down
4 changes: 4 additions & 0 deletions locale/en_US.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,3 +171,7 @@ settings:
chat_alternating_background:
label: Alternating Background
hint: Display chat lines with alternating background colors
chat_gif_scale:
label: GIF Scale
hint: Change how large GIFs are displayed in chat messages

5 changes: 4 additions & 1 deletion src/app/chat/MessageTokenGif.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
class="seventv-chat-gif"
:src="token.content.url"
:alt="token.content.title || 'GIF'"
:style="{ maxHeight: `${24 * (gifScale ?? 1)}rem` }"
decoding="async"
draggable="false"
/>
Expand All @@ -22,12 +23,14 @@
<script setup lang="ts">
import { ref } from "vue";
import type { GifToken } from "@/common/chat/ChatMessage";
import { useConfig } from "@/composable/useSettings";
import ReportIcon from "@/assets/svg/icons/ReportIcon.vue";

const props = defineProps<{
token: GifToken;
}>();

const gifScale = useConfig<number>("chat.gif_scale");
const showReport = ref(!!props.token.content.report);

function checkReport() {
Expand Down Expand Up @@ -90,7 +93,7 @@ function openReport() {
.seventv-chat-gif {
display: block;
max-width: 100%;
max-height: 24rem;
max-height: calc(24rem * var(--seventv-gif-scale, 1));
border-radius: 0.4rem;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,21 @@ export const config = [
hint: "If checked, the list of recent hype chats will be hidden",
defaultValue: false,
}),
declareConfig<number>("chat.gif_scale", "SLIDER", {
path: ["Site Layout", "Chat"],
label: "GIF Scale",
hint: "Change how large GIFs should be displayed in chat messages",
options: {
min: 0.1,
max: 1,
step: 0.05,
unit: "x",
},
defaultValue: 1,
effect(v) {
document.documentElement.style.setProperty("--seventv-gif-scale", `${v}`);
},
}),
declareConfig("chat.hide_timestamps_vods", "TOGGLE", {
label: "Hide VOD Timestamps",
path: ["Chat", "VODs"],
Expand Down
Loading