Merge branch 'small-fixes-and-improvements' into shigusegubu-themes3

This commit is contained in:
Henry Jameson 2026-05-18 19:19:58 +03:00
commit 0b70a14dec
23 changed files with 110 additions and 95 deletions

View file

@ -36,7 +36,6 @@ export default function () {
const warning = warnings[i] const warning = warnings[i]
console.warn(' ' + warning) console.warn(' ' + warning)
} }
console.warn()
process.exit(1) process.exit(1)
} }
} }

View file

@ -28,10 +28,10 @@
> >
<user-panel /> <user-panel />
<template v-if="layoutType !== 'mobile'"> <template v-if="layoutType !== 'mobile'">
<nav-panel /> <NavPanel />
<instance-specific-panel v-if="showInstanceSpecificPanel" /> <InstanceSpecificPanel v-if="showInstanceSpecificPanel" />
<features-panel v-if="!currentUser && showFeaturesPanel" /> <FeaturesPanel v-if="!currentUser && showFeaturesPanel" />
<who-to-follow-panel v-if="currentUser && suggestionsEnabled" /> <WhoToFollowPanel v-if="currentUser && suggestionsEnabled" />
<div id="notifs-sidebar" /> <div id="notifs-sidebar" />
</template> </template>
</div> </div>

View file

@ -152,8 +152,10 @@ const getStaticConfig = async () => {
throw res throw res
} }
} catch (error) { } catch (error) {
console.warn('Failed to load static/config.json, continuing without it.') console.warn(
console.warn(error) 'Failed to load static/config.json, continuing without it.',
error,
)
return {} return {}
} }
} }
@ -442,8 +444,7 @@ const getNodeInfo = async ({ store }) => {
throw res throw res
} }
} catch (e) { } catch (e) {
console.warn('Could not load nodeinfo') console.warn('Could not load nodeinfo', e)
console.warn(e)
} }
} }

View file

@ -333,7 +333,6 @@ const EmojiInput = {
if (!this.pickerShown) { if (!this.pickerShown) {
this.scrollIntoView() this.scrollIntoView()
this.$refs.picker.showPicker() this.$refs.picker.showPicker()
this.$refs.picker.startEmojiLoad()
} else { } else {
this.$refs.picker.hidePicker() this.$refs.picker.hidePicker()
} }

View file

@ -11,3 +11,9 @@
</template> </template>
<script src="./instance_specific_panel.js"></script> <script src="./instance_specific_panel.js"></script>
<style lang="scss">
.instance-specific-panel .panel-body {
border-radius: var(--roundness);
}
</style>

View file

@ -42,7 +42,6 @@
</tab-switcher> </tab-switcher>
<Notifications <Notifications
ref="notifications" ref="notifications"
:no-heading="true"
:no-extra="true" :no-extra="true"
:minimal-mode="true" :minimal-mode="true"
:filter-mode="filterMode" :filter-mode="filterMode"

View file

@ -48,6 +48,7 @@
img { img {
width: 100%; width: 100%;
height: 100%; height: 100%;
max-height: 10em;
object-fit: cover; object-fit: cover;
border-radius: var(--roundness); border-radius: var(--roundness);
} }

View file

@ -17,7 +17,6 @@
type="text" type="text"
:placeholder="$t('polls.option')" :placeholder="$t('polls.option')"
:maxlength="maxLength" :maxlength="maxLength"
@change="updatePollToParent"
@keydown.enter.stop.prevent="nextOption(index)" @keydown.enter.stop.prevent="nextOption(index)"
> >
</div> </div>
@ -50,7 +49,6 @@
v-model="pollType" v-model="pollType"
class="poll-type-select" class="poll-type-select"
unstyled="true" unstyled="true"
@change="updatePollToParent"
> >
<option value="single"> <option value="single">
{{ $t('polls.single_choice') }} {{ $t('polls.single_choice') }}

View file

@ -133,6 +133,7 @@
&.suboptions { &.suboptions {
margin-left: 2em; margin-left: 2em;
border-top: 1px dotted var(--border); border-top: 1px dotted var(--border);
border-bottom: 1px dotted var(--border);
} }

View file

@ -50,6 +50,16 @@
</li> </li>
</ul> </ul>
</li> </li>
<li>
<BooleanSetting path="userCardHidePersonalMarks">
{{ $t('settings.user_card_hide_personal_marks') }}
</BooleanSetting>
</li>
<li v-if="shoutAvailable">
<BooleanSetting path="hideShoutbox">
{{ $t('settings.hide_shoutbox') }}
</BooleanSetting>
</li>
</ul> </ul>
<h3>{{ $t('settings.attachments') }}</h3> <h3>{{ $t('settings.attachments') }}</h3>
<ul class="setting-list"> <ul class="setting-list">
@ -77,16 +87,6 @@
{{ $t('settings.hide_attachments_in_convo') }} {{ $t('settings.hide_attachments_in_convo') }}
</BooleanSetting> </BooleanSetting>
</li> </li>
<li>
<BooleanSetting path="userCardHidePersonalMarks">
{{ $t('settings.user_card_hide_personal_marks') }}
</BooleanSetting>
</li>
<li v-if="shoutAvailable">
<BooleanSetting path="hideShoutbox">
{{ $t('settings.hide_shoutbox') }}
</BooleanSetting>
</li>
</ul> </ul>
</div> </div>
</div> </div>

View file

@ -117,7 +117,6 @@
:key="column" :key="column"
:local="true" :local="true"
:path="column + 'ColumnWidth'" :path="column + 'ColumnWidth'"
:units="horizontalUnits"
expert="1" expert="1"
> >
{{ $t('settings.column_sizes_' + column) }} {{ $t('settings.column_sizes_' + column) }}

View file

@ -3,6 +3,7 @@ import BooleanSetting from '../helpers/boolean_setting.vue'
import ChoiceSetting from '../helpers/choice_setting.vue' import ChoiceSetting from '../helpers/choice_setting.vue'
import IntegerSetting from '../helpers/integer_setting.vue' import IntegerSetting from '../helpers/integer_setting.vue'
import SharedComputedObject from '../helpers/shared_computed_object.js' import SharedComputedObject from '../helpers/shared_computed_object.js'
import UnitSetting from '../helpers/unit_setting.vue'
import { useLocalConfigStore } from 'src/stores/local_config.js' import { useLocalConfigStore } from 'src/stores/local_config.js'
import { useSyncConfigStore } from 'src/stores/sync_config.js' import { useSyncConfigStore } from 'src/stores/sync_config.js'
@ -62,6 +63,7 @@ const PostsTab = {
ChoiceSetting, ChoiceSetting,
IntegerSetting, IntegerSetting,
FontControl, FontControl,
UnitSetting,
}, },
computed: { computed: {
...SharedComputedObject(), ...SharedComputedObject(),

View file

@ -492,7 +492,7 @@ export default {
try { try {
return deserializeShadow(shadow) return deserializeShadow(shadow)
} catch (e) { } catch (e) {
console.warn(e) console.warn('Failed to deserialize shadow', e)
return shadow return shadow
} }
} }
@ -652,7 +652,7 @@ export default {
return rgb2hex(computedColor) return rgb2hex(computedColor)
} }
} catch (e) { } catch (e) {
console.warn(e) console.warn('failed to get computed color', e)
} }
return null return null
} }

View file

@ -125,7 +125,7 @@ export default {
if (computedColor) return rgb2hex(computedColor) if (computedColor) return rgb2hex(computedColor)
return null return null
} catch (e) { } catch (e) {
console.warn(e) console.warn('Failed to get fallback color', e)
return null return null
} }
} else { } else {

View file

@ -4,6 +4,7 @@ import StatusBookmarkFolderMenu from 'src/components/status_bookmark_folder_menu
import { useInstanceStore } from 'src/stores/instance.js' import { useInstanceStore } from 'src/stores/instance.js'
import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js' import { useInstanceCapabilitiesStore } from 'src/stores/instance_capabilities.js'
import { useMergedConfigStore } from 'src/stores/merged_config.js'
import { library } from '@fortawesome/fontawesome-svg-core' import { library } from '@fortawesome/fontawesome-svg-core'
import { import {
@ -96,6 +97,9 @@ export default {
return !useInstanceCapabilitiesStore() return !useInstanceCapabilitiesStore()
.pleromaCustomEmojiReactionsAvailable .pleromaCustomEmojiReactionsAvailable
}, },
hidePostStats() {
return useMergedConfigStore().mergedConfig.hidePostStats
},
buttonInnerClass() { buttonInnerClass() {
return [ return [
this.button.name + '-button', this.button.name + '-button',

View file

@ -59,7 +59,7 @@
/> />
</component> </component>
<span <span
v-if="button.counter?.(funcArg) > 0" v-if="!hidePostStats && button.counter?.(funcArg) > 0"
class="action-counter" class="action-counter"
> >
{{ button.counter?.(funcArg) }} {{ button.counter?.(funcArg) }}

View file

@ -403,6 +403,12 @@ export default {
allowNonSquareEmoji() { allowNonSquareEmoji() {
return this.mergedConfig.nonSquareEmoji return this.mergedConfig.nonSquareEmoji
}, },
hideUserStats() {
return this.mergedConfig.hideUserStats
},
hideRemarks() {
return this.mergedConfig.userCardHidePersonalMarks
},
...mapState(useMergedConfigStore, ['mergedConfig']), ...mapState(useMergedConfigStore, ['mergedConfig']),
}, },
methods: { methods: {

View file

@ -304,7 +304,7 @@
</div> </div>
</div> </div>
<div <div
v-if="!editable && loggedIn && isOtherUser && (hasNote || !hideBio) && !userCardHidePersonalMarks" v-if="!editable && loggedIn && isOtherUser && (hasNote || !hideBio) && !hideRemarks"
class="personal-marks" class="personal-marks"
> >
<UserNote <UserNote

View file

@ -10,4 +10,15 @@
.footer-left-checkbox { .footer-left-checkbox {
width: max-content; width: max-content;
} }
.expirationTime {
display: inline-flex;
white-space: nowrap;
padding: 0.5em;
}
.dialog-modal-content .checkbox {
vertical-align: middle;
padding: 0.5em;
}
} }

View file

@ -11,48 +11,50 @@
<p> <p>
{{ $t(isMute ? 'user_card.expire_mute_message' : 'user_card.expire_block_message', [user.screen_name]) }} {{ $t(isMute ? 'user_card.expire_mute_message' : 'user_card.expire_block_message', [user.screen_name]) }}
</p> </p>
<p> <div>
{{ $t('user_card.expire_in') }} {{ $t('user_card.expire_in') }}
<input <span class="expirationTime">
id="userFilterExpires" <input
v-model="expiration" id="userFilterExpires"
class="input input-expire-in" v-model="expiration"
:class="{ disabled: forever }" class="input input-expire-in"
:disabled="forever" :class="{ disabled: forever }"
min="1" :disabled="forever"
type="number" min="1"
> type="number"
<Select
id="userFilterExpiresUnit"
v-model="expirationUnit"
class="input unit-input unstyled"
:disabled="forever"
>
<option
key="s"
value="s"
> >
{{ $t('time.unit.seconds_suffix') }} <Select
</option> id="userFilterExpiresUnit"
<option v-model="expirationUnit"
key="m" class="input unit-input unstyled"
value="m" :disabled="forever"
> >
{{ $t('time.unit.minutes_suffix') }} <option
</option> key="s"
<option value="s"
key="h" >
value="h" {{ $t('time.unit.seconds_suffix') }}
> </option>
{{ $t('time.unit.hours_suffix') }} <option
</option> key="m"
<option value="m"
key="d" >
value="d" {{ $t('time.unit.minutes_suffix') }}
> </option>
{{ $t('time.unit.days_suffix') }} <option
</option> key="h"
</Select> value="h"
>
{{ $t('time.unit.hours_suffix') }}
</option>
<option
key="d"
value="d"
>
{{ $t('time.unit.days_suffix') }}
</option>
</Select>
</span>
{{ $t('user_card.mute_or') }} {{ $t('user_card.mute_or') }}
@ -64,7 +66,7 @@
> >
{{ $t('user_card.mute_block_never') }} {{ $t('user_card.mute_block_never') }}
</Checkbox> </Checkbox>
</p> </div>
<template #footerLeft> <template #footerLeft>
<div class="footer-left-checkbox"> <div class="footer-left-checkbox">

View file

@ -348,8 +348,7 @@ const addNewStatuses = (
// NOOP, it is known status but we don't do anything about it for now // NOOP, it is known status but we don't do anything about it for now
}, },
default: (unknown) => { default: (unknown) => {
console.warn('unknown status type') console.warn('unknown status type', unknown)
console.warn(unknown)
}, },
} }

View file

@ -99,12 +99,16 @@ export const findColor = (color, { dynamicVars, staticVars }) => {
const staticVar = staticVars[variableSlot] const staticVar = staticVars[variableSlot]
const dynamicVar = dynamicVars[variableSlot] const dynamicVar = dynamicVars[variableSlot]
if (!staticVar && !dynamicVar) { if (!staticVar && !dynamicVar) {
console.warn(dynamicVars, variableSlot, dynamicVars[variableSlot]) console.warn(
console.warn(`Couldn't find variable "${variableSlot}", falling back to magenta. Variables are: `Couldn't find variable "${variableSlot}", falling back to magenta. Variables are:
Static: Static:
${JSON.stringify(staticVars, null, 2)} ${JSON.stringify(staticVars, null, 2)}
Dynamic: Dynamic:
${JSON.stringify(dynamicVars, null, 2)}`) ${JSON.stringify(dynamicVars, null, 2)}`,
dynamicVars,
variableSlot,
dynamicVars[variableSlot],
)
} }
targetColor = convert(staticVar ?? dynamicVar ?? '#FF00FF').rgb targetColor = convert(staticVar ?? dynamicVar ?? '#FF00FF').rgb
} }

View file

@ -146,11 +146,7 @@ describe('Gallery', () => {
{ items: [{ type: 'image' }] }, { items: [{ type: 'image' }] },
{ audio: true, items: [{ type: 'audio' }] }, { audio: true, items: [{ type: 'audio' }] },
{ {
items: [ items: [{ type: 'image' }, { type: 'image' }, { type: 'image' }],
{ type: 'image' },
{ type: 'image' },
{ type: 'image' },
],
}, },
]) ])
}) })
@ -251,31 +247,19 @@ describe('Gallery', () => {
expect(Gallery.computed.rows.call(local)).to.eql([ expect(Gallery.computed.rows.call(local)).to.eql([
{ {
items: [ items: [{ type: 'image' }, { type: 'image' }],
{ type: 'image' },
{ type: 'image' },
],
}, },
{ {
items: [ items: [{ type: 'image' }, { type: 'image' }],
{ type: 'image' },
{ type: 'image' },
],
}, },
{ audio: true, items: [{ type: 'audio' }] }, { audio: true, items: [{ type: 'audio' }] },
{ items: [{ type: 'image' }] }, { items: [{ type: 'image' }] },
{ audio: true, items: [{ type: 'audio' }] }, { audio: true, items: [{ type: 'audio' }] },
{ {
items: [ items: [{ type: 'image' }, { type: 'image' }],
{ type: 'image' },
{ type: 'image' },
],
}, },
{ {
items: [ items: [{ type: 'image' }, { type: 'image' }],
{ type: 'image' },
{ type: 'image' },
],
}, },
]) ])
}) })