Merge branch 'fixes-roundup5' into shigusegubu-themes3

This commit is contained in:
Henry Jameson 2025-03-05 02:51:15 +02:00
commit 8ad1c4a3ff
13 changed files with 77 additions and 9 deletions

View file

@ -1 +1 @@
18.20.6
18.20.7

View file

@ -34,7 +34,7 @@
"click-outside-vue3": "4.0.1",
"cropperjs": "1.6.2",
"escape-html": "1.0.3",
"globals": "^15.14.0",
"globals": "^16.0.0",
"hash-sum": "^2.0.0",
"js-cookie": "3.0.5",
"localforage": "1.10.0",

View file

@ -129,6 +129,21 @@ PanelHeader {
background: --fg
}
PanelHeader ButtonUnstyled Icon {
textColor: --text;
textAuto: 'no-preserve'
}
PanelHeader Button Icon {
textColor: --text;
textAuto: 'no-preserve'
}
PanelHeader Button Text {
textColor: --text;
textAuto: 'no-preserve'
}
Tab:hover {
background: --bg;
shadow: --buttonDefaultBevel
@ -172,6 +187,14 @@ MenuItem:hover {
background: --fg
}
MenuItem:active {
background: --fg
}
MenuItem:active:hover {
background: --fg
}
Popover {
shadow: --buttonDefaultBevel, 5 5 0 0 #000000 / 0.2;
roundness: 0

View file

@ -540,6 +540,7 @@
:status="status"
:replying="replying"
@toggle-replying="toggleReplying"
@interacted="e => $emit('interacted')"
/>
</div>
</div>

View file

@ -67,6 +67,9 @@ export default {
'doAction',
'outerClose'
],
emits: [
'interacted'
],
components: {
StatusBookmarkFolderMenu,
EmojiPicker,
@ -120,7 +123,8 @@ export default {
this.$store.dispatch('reactWithEmoji', { id: this.status.id, emoji })
}
},
doActionWrap (button, close) {
doActionWrap (button, close = () => {}) {
this.$emit('interacted')
if (button.name === 'emoji') {
this.$refs.picker.showPicker()
} else {

View file

@ -22,6 +22,7 @@ export default {
MuteConfirm
},
props: ['button', 'status'],
emits: ['interacted'],
mounted () {
if (this.button.name === 'mute') {
this.$store.dispatch('fetchDomainMutes')

View file

@ -79,6 +79,7 @@
:button="button"
:status="status"
v-bind="$attrs"
@interacted="e => $emit('interacted')"
/>
<teleport to="#modal">
<MuteConfirm

View file

@ -1,4 +1,7 @@
import { useEditStatusStore } from 'src/stores/editStatus.js'
import { useReportsStore } from 'src/stores/reports.js'
import { useStatusHistoryStore } from 'src/stores/statusHistory.js'
const PRIVATE_SCOPES = new Set(['private', 'direct'])
const PUBLIC_SCOPES = new Set(['public', 'unlisted'])
export const BUTTONS = [{
@ -138,6 +141,34 @@ export const BUTTONS = [{
return dispatch('bookmark', { id: status.id })
}
}
}, {
// =========
// EDIT HISTORY
// =========
name: 'editHistory',
icon: 'history',
label: 'status.status_history',
if ({ status, state }) {
return state.instance.editingAvailable &&
status.edited_at !== null
},
action ({ status }) {
const originalStatus = { ...status }
const stripFieldsList = [
'attachments',
'created_at',
'emojis',
'text',
'raw_html',
'nsfw',
'poll',
'summary',
'summary_raw_html'
]
stripFieldsList.forEach(p => delete originalStatus[p])
useStatusHistoryStore().openStatusHistoryModal(originalStatus)
return Promise.resolve()
}
}, {
// =========
// EDIT
@ -216,8 +247,8 @@ export const BUTTONS = [{
icon: 'flag',
label: 'user_card.report',
if: ({ loggedIn }) => loggedIn,
action ({ dispatch, status }) {
dispatch('openUserReportingModal', { userId: status.user.id, statusIds: [status.id] })
action ({ status }) {
return useReportsStore().openUserReportingModal({ userId: status.user.id, statusIds: [status.id] })
}
}].map(button => {
return Object.fromEntries(

View file

@ -18,7 +18,7 @@ library.add(
const StatusActionButtons = {
props: ['status', 'replying'],
emits: ['toggleReplying'],
emits: ['toggleReplying', 'interacted'],
data () {
return {
showPin: false,

View file

@ -17,6 +17,7 @@
:get-component="getComponent"
:close="() => {}"
:do-action="doAction"
@interacted="e => $emit('interacted')"
/>
<button
v-if="showPin && currentUser"
@ -88,6 +89,7 @@
:get-component="getComponent"
:outerClose="close"
:do-action="doAction"
@interacted="e => $emit('interacted')"
/>
<button
v-if="showPin && currentUser"

View file

@ -32,7 +32,7 @@ export const useReportsStore = defineStore('reports', {
this.reportModal.activated = false
},
setReportState ({ id, state }) {
const oldState = window.vuex.state.reports.reports[id].state
const oldState = this.reports[id].state
this.reports[id].state = state
window.vuex.state.api.backendInteractor.setReportState({ id, state }).catch(e => {
console.error('Failed to set report state', e)

View file

@ -9,7 +9,7 @@
*/
// Existing emojis we have
const oldEmojiFilename = '../static/emoji.json'
const oldEmojiFilename = '../src/assets/emoji.json'
// The file downloaded from https://gist.github.com/oliveratgithub/0bf11a9aff0d6da7b46f1490f86a71eb
const newEmojiFilename = 'emojis.json'

View file

@ -4440,11 +4440,16 @@ globals@^14.0.0:
resolved "https://registry.yarnpkg.com/globals/-/globals-14.0.0.tgz#898d7413c29babcf6bafe56fcadded858ada724e"
integrity sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==
globals@^15.11.0, globals@^15.14.0:
globals@^15.11.0:
version "15.15.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-15.15.0.tgz#7c4761299d41c32b075715a4ce1ede7897ff72a8"
integrity sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==
globals@^16.0.0:
version "16.0.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-16.0.0.tgz#3d7684652c5c4fbd086ec82f9448214da49382d8"
integrity sha512-iInW14XItCXET01CQFqudPOWP2jYMl7T+QRQT+UNcR/iQncN/F0UNpgd76iFkBPgNQb4+X3LV9tLJYzwh+Gl3A==
globalthis@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.4.tgz#7430ed3a975d97bfb59bcce41f5cabbafa651236"