Merge branch 'customizable-post-actions' into shigusegubu-themes3

This commit is contained in:
Henry Jameson 2025-01-21 10:53:19 +02:00
commit 90bc03d394
25 changed files with 813 additions and 505 deletions

View file

@ -1,7 +1,7 @@
# This file is a template, and might need editing before it works on your project. # This file is a template, and might need editing before it works on your project.
# Official framework image. Look for the different tagged releases at: # Official framework image. Look for the different tagged releases at:
# https://hub.docker.com/r/library/node/tags/ # https://hub.docker.com/r/library/node/tags/
image: node:16 image: node:18
stages: stages:
- check-changelog - check-changelog

View file

@ -18,10 +18,10 @@
"dependencies": { "dependencies": {
"@babel/runtime": "7.26.0", "@babel/runtime": "7.26.0",
"@chenfengyuan/vue-qrcode": "2.0.0", "@chenfengyuan/vue-qrcode": "2.0.0",
"@fortawesome/fontawesome-svg-core": "6.4.0", "@fortawesome/fontawesome-svg-core": "6.7.2",
"@fortawesome/free-regular-svg-icons": "6.4.0", "@fortawesome/free-regular-svg-icons": "6.7.2",
"@fortawesome/free-solid-svg-icons": "6.4.0", "@fortawesome/free-solid-svg-icons": "6.7.2",
"@fortawesome/vue-fontawesome": "3.0.3", "@fortawesome/vue-fontawesome": "3.0.8",
"@kazvmoe-infra/pinch-zoom-element": "1.2.0", "@kazvmoe-infra/pinch-zoom-element": "1.2.0",
"@kazvmoe-infra/unicode-emoji-json": "0.4.0", "@kazvmoe-infra/unicode-emoji-json": "0.4.0",
"@ruffle-rs/ruffle": "0.1.0-nightly.2025.1.13", "@ruffle-rs/ruffle": "0.1.0-nightly.2025.1.13",
@ -74,9 +74,9 @@
"css-minimizer-webpack-plugin": "4.2.2", "css-minimizer-webpack-plugin": "4.2.2",
"custom-event-polyfill": "1.0.7", "custom-event-polyfill": "1.0.7",
"eslint": "8.57.1", "eslint": "8.57.1",
"eslint-config-standard": "17.0.0", "eslint-config-standard": "17.1.0",
"eslint-formatter-friendly": "7.0.0", "eslint-formatter-friendly": "7.0.0",
"eslint-plugin-import": "2.27.5", "eslint-plugin-import": "2.31.0",
"eslint-plugin-n": "15.6.1", "eslint-plugin-n": "15.6.1",
"eslint-plugin-promise": "6.1.1", "eslint-plugin-promise": "6.1.1",
"eslint-plugin-vue": "9.9.0", "eslint-plugin-vue": "9.9.0",
@ -96,7 +96,7 @@
"karma-sinon-chai": "2.0.2", "karma-sinon-chai": "2.0.2",
"karma-sourcemap-loader": "0.3.8", "karma-sourcemap-loader": "0.3.8",
"karma-spec-reporter": "0.0.36", "karma-spec-reporter": "0.0.36",
"karma-webpack": "5.0.0", "karma-webpack": "5.0.1",
"lodash": "4.17.21", "lodash": "4.17.21",
"mini-css-extract-plugin": "2.7.6", "mini-css-extract-plugin": "2.7.6",
"mocha": "10.2.0", "mocha": "10.2.0",

View file

@ -18,7 +18,10 @@
<span v-text="user.screen_name_ui" /> <span v-text="user.screen_name_ui" />
</template> </template>
</i18n-t> </i18n-t>
<div class="mute-expiry" v-if="type !== 'domain'"> <div
v-if="type !== 'domain'"
class="mute-expiry"
>
<p> <p>
<label> <label>
{{ $t('user_card.mute_duration_prompt') }} {{ $t('user_card.mute_duration_prompt') }}

View file

@ -34,7 +34,10 @@
</i> </i>
</p> </p>
<p v-if="draft.status">{{ draft.status }}</p> <p v-if="draft.status">{{ draft.status }}</p>
<p v-else class="faint">{{ $t('drafts.empty') }}</p> <p
v-else
class="faint"
>{{ $t('drafts.empty') }}</p>
</span> </span>
<gallery <gallery
v-if="draft.files?.length !== 0" v-if="draft.files?.length !== 0"

View file

@ -10,8 +10,8 @@
{{ ' ' }} {{ ' ' }}
<Checkbox <Checkbox
v-if="typeof fallback !== 'undefined'" v-if="typeof fallback !== 'undefined'"
class="font-checkbox"
:id="name + '-o'" :id="name + '-o'"
class="font-checkbox"
:model-value="present" :model-value="present"
@change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)" @change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
> >

View file

@ -80,7 +80,7 @@ const mediaUpload = {
canvas.toBlob((blob) => { canvas.toBlob((blob) => {
resolve(new File([blob], newFileName, { resolve(new File([blob], newFileName, {
type: type, type,
lastModified: Date.now() lastModified: Date.now()
})) }))
}, type, 0.85) }, type, 0.85)

View file

@ -29,9 +29,9 @@
<button <button
v-if="apply" v-if="apply"
class="btn button-default palette-apply-button" class="btn button-default palette-apply-button"
@click="applyPalette"
:disabled="disabled" :disabled="disabled"
:class="{ disabled }" :class="{ disabled }"
@click="applyPalette"
> >
{{ $t('settings.style.themes3.palette.apply') }} {{ $t('settings.style.themes3.palette.apply') }}
</button> </button>

View file

@ -335,8 +335,8 @@
role="menu" role="menu"
> >
<button <button
class="menu-item dropdown-item"
v-if="!hideDraft || !disableDraft" v-if="!hideDraft || !disableDraft"
class="menu-item dropdown-item"
role="menu" role="menu"
:disabled="!safeToSaveDraft && saveable" :disabled="!safeToSaveDraft && saveable"
:class="{ disabled: !safeToSaveDraft }" :class="{ disabled: !safeToSaveDraft }"

View file

@ -132,16 +132,22 @@
role="menuitem" role="menuitem"
@click="openTab('filtering')" @click="openTab('filtering')"
> >
<FAIcon fixed-width icon="font" />{{ $t('settings.word_filter_and_more') }} <FAIcon
fixed-width
icon="font"
/>{{ $t('settings.word_filter_and_more') }}
</button> </button>
</div> </div>
</div> </div>
</template> </template>
<template #trigger> <template #trigger>
<div :class="mobileLayout ? 'main-button' : ''"> <div :class="mobileLayout ? 'main-button' : ''">
<FAIcon icon="filter" :fixed-width="nested"/> <FAIcon
icon="filter"
:fixed-width="nested"
/>
<template v-if="nested"> <template v-if="nested">
{{$t('timeline.filter_settings')}} {{ $t('timeline.filter_settings') }}
</template> </template>
<FAIcon <FAIcon
v-if="nested" v-if="nested"

View file

@ -182,9 +182,9 @@
<template #content="{close}"> <template #content="{close}">
<div class="dropdown-menu"> <div class="dropdown-menu">
<div <div
class="menu-item dropdown-item"
v-for="ref in frontend.installedRefs || frontend.refs" v-for="ref in frontend.installedRefs || frontend.refs"
:key="ref" :key="ref"
class="menu-item dropdown-item"
> >
<button <button
class="main-button" class="main-button"

View file

@ -12,9 +12,9 @@
<button <button
class="button-default theme-preview" class="button-default theme-preview"
data-theme-key="stock" data-theme-key="stock"
@click="resetTheming"
:class="{ toggled: isStyleActive('stock'), disabled: switchInProgress }" :class="{ toggled: isStyleActive('stock'), disabled: switchInProgress }"
:disabled="switchInProgress" :disabled="switchInProgress"
@click="resetTheming"
> >
<!-- eslint-disable vue/no-v-text-v-html-on-component --> <!-- eslint-disable vue/no-v-text-v-html-on-component -->
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->
@ -58,8 +58,8 @@
:data-theme-key="style.key" :data-theme-key="style.key"
class="button-default theme-preview" class="button-default theme-preview"
:class="{ toggled: isThemeActive(style.key), disabled: switchInProgress }" :class="{ toggled: isThemeActive(style.key), disabled: switchInProgress }"
@click="style.version === 'v2' ? setTheme(style.key) : setStyle(style.key)"
:disabled="switchInProgress" :disabled="switchInProgress"
@click="style.version === 'v2' ? setTheme(style.key) : setStyle(style.key)"
> >
<!-- eslint-disable vue/no-v-text-v-html-on-component --> <!-- eslint-disable vue/no-v-text-v-html-on-component -->
<!-- eslint-disable vue/no-v-html --> <!-- eslint-disable vue/no-v-html -->
@ -81,9 +81,9 @@
<div class="import-file-container"> <div class="import-file-container">
<button <button
class="btn button-default" class="btn button-default"
@click="importFile"
:class="{ disabled: switchInProgress }" :class="{ disabled: switchInProgress }"
:disabled="switchInProgress" :disabled="switchInProgress"
@click="importFile"
> >
<FAIcon icon="folder-open" /> <FAIcon icon="folder-open" />
{{ $t('settings.style.themes3.editor.load_style') }} {{ $t('settings.style.themes3.editor.load_style') }}
@ -157,8 +157,8 @@
class="userPalette" class="userPalette"
:compact="true" :compact="true"
:apply="true" :apply="true"
@applyPalette="data => setPaletteCustom(data)"
:disabled="switchInProgress" :disabled="switchInProgress"
@applyPalette="data => setPaletteCustom(data)"
/> />
</template> </template>
<template v-else-if="customThemeVersion === 'v2'"> <template v-else-if="customThemeVersion === 'v2'">

View file

@ -558,12 +558,6 @@
<div class="deleted-text"> <div class="deleted-text">
{{ $t('status.status_deleted') }} {{ $t('status.status_deleted') }}
</div> </div>
<reply-button
v-if="replying"
:replying="replying"
:status="status"
@toggle="toggleReplying"
/>
</div> </div>
</div> </div>
<div <div

View file

@ -102,6 +102,9 @@ export default {
disabled: this.button.interactive ? !this.button.interactive(this.funcArg) : false disabled: this.button.interactive ? !this.button.interactive(this.funcArg) : false
} }
] ]
},
remoteInteractionLink () {
return this.$store.getters.remoteInteractionLink({ statusId: this.status.id })
} }
}, },
methods: { methods: {

View file

@ -12,15 +12,15 @@
target="_blank" target="_blank"
:tabindex="0" :tabindex="0"
:disabled="buttonClass.disabled" :disabled="buttonClass.disabled"
:href="getComponent(button) == 'a' ? button.link?.(funcArg) || getRemoteInteractionLink : undefined" :href="getComponent(button) == 'a' ? button.link?.(funcArg) || remoteInteractionLink : undefined"
@click="doActionWrap(button, close)" @click="doActionWrap(button, close)"
> >
<FALayers> <FALayers>
<FAIcon <FAIcon
class="fa-scale-110" class="fa-scale-110"
:icon="button.icon(funcArg)" :icon="button.icon(funcArg)"
:spin="!extra && button.animated?.() && animationState" :spin="!extra && getComponent(button) == 'button' && button.animated?.() && animationState"
style="--fa-animation-duration: 750ms;" :style="{ '--fa-animation-duration': '750ms' }"
fixed-width fixed-width
/> />
<template v-if="!buttonClass.disabled && button.toggleable?.(funcArg) && button.active"> <template v-if="!buttonClass.disabled && button.toggleable?.(funcArg) && button.active">
@ -67,13 +67,13 @@
<span <span
v-if="!extra && button.name === 'bookmark'" v-if="!extra && button.name === 'bookmark'"
class="separator" class="separator"
> />
</span>
<Popover <Popover
v-if="button.name === 'bookmark'"
trigger="hover" trigger="hover"
:placement="extra ? 'right' : 'top'" :placement="extra ? 'right' : 'top'"
:offset="{ y: 5 }"
:trigger-attrs="{ class: 'extra-button' }" :trigger-attrs="{ class: 'extra-button' }"
v-if="button.name === 'bookmark'"
> >
<template #trigger> <template #trigger>
<FAIcon <FAIcon
@ -84,13 +84,16 @@
/> />
</template> </template>
<template #content> <template #content>
<StatusBookmarkFolderMenu v-if="button.name === 'bookmark'" :status="status" /> <StatusBookmarkFolderMenu
v-if="button.name === 'bookmark'"
:status="status"
/>
</template> </template>
</Popover> </Popover>
<EmojiPicker <EmojiPicker
ref="picker"
v-if="button.name === 'emoji'" v-if="button.name === 'emoji'"
ref="picker"
:enable-sticker-picker="false" :enable-sticker-picker="false"
:hide-custom-emoji="hideCustomEmoji" :hide-custom-emoji="hideCustomEmoji"
class="emoji-picker-panel" class="emoji-picker-panel"
@ -99,6 +102,6 @@
</div> </div>
</template> </template>
<script src="./action_button.js"/> <script src="./action_button.js" />
<style lang="scss" src="./action_button.scss"/> <style lang="scss" src="./action_button.scss" />

View file

@ -1,9 +1,10 @@
<template> <template>
<div> <div>
<Popover <Popover
trigger="hover"
:placement="$attrs.extra ? 'right' : 'top'"
v-if="button.dropdown?.()" v-if="button.dropdown?.()"
trigger="hover"
:offset="{ y: 5 }"
:placement="$attrs.extra ? 'right' : 'top'"
> >
<template #trigger> <template #trigger>
<ActionButton <ActionButton
@ -15,8 +16,8 @@
<template #content> <template #content>
<div <div
v-if="button.name === 'mute'" v-if="button.name === 'mute'"
class="dropdown-menu"
:id="`popup-menu-${randomSeed}`" :id="`popup-menu-${randomSeed}`"
class="dropdown-menu"
role="menu" role="menu"
> >
<div class="menu-item dropdown-item extra-action -icon"> <div class="menu-item dropdown-item extra-action -icon">
@ -24,7 +25,10 @@
class="main-button" class="main-button"
@click="toggleUserMute" @click="toggleUserMute"
> >
<FAIcon icon="user" fixed-width /> <FAIcon
icon="user"
fixed-width
/>
<template v-if="userIsMuted"> <template v-if="userIsMuted">
{{ $t('status.unmute_user') }} {{ $t('status.unmute_user') }}
</template> </template>
@ -38,7 +42,10 @@
class="main-button" class="main-button"
@click="toggleUserMute" @click="toggleUserMute"
> >
<FAIcon icon="folder-tree" fixed-width /> <FAIcon
icon="folder-tree"
fixed-width
/>
<template v-if="threadIsMuted"> <template v-if="threadIsMuted">
{{ $t('status.unmute_conversation') }} {{ $t('status.unmute_conversation') }}
</template> </template>
@ -52,7 +59,10 @@
class="main-button" class="main-button"
@click="toggleDomainMute" @click="toggleDomainMute"
> >
<FAIcon icon="globe" fixed-width /> <FAIcon
icon="globe"
fixed-width
/>
<template v-if="domainIsMuted"> <template v-if="domainIsMuted">
{{ $t('status.unmute_domain') }} {{ $t('status.unmute_domain') }}
</template> </template>
@ -72,22 +82,22 @@
/> />
<teleport to="#modal"> <teleport to="#modal">
<mute-confirm <mute-confirm
type="conversation"
:status="this.status"
ref="confirmConversation" ref="confirmConversation"
type="conversation"
:status="status"
/> />
<mute-confirm <mute-confirm
type="domain"
:user="this.user"
ref="confirmDomain" ref="confirmDomain"
type="domain"
:user="user"
/> />
<mute-confirm <mute-confirm
type="user"
:user="this.user"
ref="confirmUser" ref="confirmUser"
type="user"
:user="user"
/> />
</teleport> </teleport>
</div> </div>
</template> </template>
<script src="./action_button_container.js"/> <script src="./action_button_container.js" />

View file

@ -129,9 +129,6 @@ const StatusActionButtons = {
'-dropdown': button.dropdown?.(), '-dropdown': button.dropdown?.(),
'-active': button.active?.(this.funcArg) '-active': button.active?.(this.funcArg)
} }
},
getRemoteInteractionLink () {
return this.$store.getters.remoteInteractionLink({ statusId: this.status.id })
} }
} }
} }

View file

@ -2,17 +2,17 @@
<div class="StatusActionButtons"> <div class="StatusActionButtons">
<span class="quick-action-buttons"> <span class="quick-action-buttons">
<span <span
class="quick-action"
:class="{ '-pin': showPin, '-toggle': button.dropdown?.() }"
v-for="button in quickButtons" v-for="button in quickButtons"
:key="button.name" :key="button.name"
class="quick-action"
:class="{ '-pin': showPin, '-toggle': button.dropdown?.() }"
> >
<ActionButtonContainer <ActionButtonContainer
:class="{ '-pin': showPin }" :class="{ '-pin': showPin }"
:button="button" :button="button"
:status="status" :status="status"
:extra="false" :extra="false"
:funcArg="funcArg" :func-arg="funcArg"
:get-class="getClass" :get-class="getClass"
:get-component="getComponent" :get-component="getComponent"
:close="() => {}" :close="() => {}"
@ -55,7 +55,10 @@
class="dropdown-menu extra-action-buttons" class="dropdown-menu extra-action-buttons"
role="menu" role="menu"
> >
<div class="menu-item dropdown-item extra-action -icon"> <div
v-if="currentUser"
class="menu-item dropdown-item extra-action -icon"
>
<button <button
class="main-button" class="main-button"
role="menuitem" role="menuitem"
@ -80,7 +83,7 @@
:button="button" :button="button"
:status="status" :status="status"
:extra="true" :extra="true"
:funcArg="funcArg" :func-arg="funcArg"
:get-class="getClass" :get-class="getClass"
:get-component="getComponent" :get-component="getComponent"
:close="close" :close="close"

View file

@ -76,8 +76,8 @@
</div> </div>
</template> </template>
<QuickFilterSettings <QuickFilterSettings
class="rightside-button"
v-if="!mobileLayout" v-if="!mobileLayout"
class="rightside-button"
/> />
<QuickViewSettings <QuickViewSettings
class="rightside-button" class="rightside-button"

View file

@ -312,9 +312,9 @@
</div> </div>
<teleport to="#modal"> <teleport to="#modal">
<mute-confirm <mute-confirm
type="user"
:user="this.user"
ref="confirmation" ref="confirmation"
type="user"
:user="user"
/> />
</teleport> </teleport>
</div> </div>

View file

@ -1,4 +1,3 @@
const VideoAttachment = { const VideoAttachment = {
props: ['attachment', 'controls'], props: ['attachment', 'controls'],
data () { data () {

View file

@ -1,4 +1,3 @@
const DIRECTION_LEFT = [-1, 0] const DIRECTION_LEFT = [-1, 0]
const DIRECTION_RIGHT = [1, 0] const DIRECTION_RIGHT = [1, 0]
const DIRECTION_UP = [0, -1] const DIRECTION_UP = [0, -1]

View file

@ -1,4 +1,3 @@
// promiseInterval - replacement for setInterval for promises, starts counting // promiseInterval - replacement for setInterval for promises, starts counting
// the interval only after a promise is done instead of immediately. // the interval only after a promise is done instead of immediately.
// - promiseCall is a function that returns a promise, it's called the first // - promiseCall is a function that returns a promise, it's called the first

View file

@ -1,4 +1,3 @@
export const windowWidth = () => export const windowWidth = () =>
window.innerWidth || window.innerWidth ||
document.documentElement.clientWidth || document.documentElement.clientWidth ||

1162
yarn.lock

File diff suppressed because it is too large Load diff