Merge branch 'small-fixes-and-improvements' into shigusegubu-themes3
This commit is contained in:
commit
268e57a009
24 changed files with 70 additions and 2 deletions
|
|
@ -3,3 +3,4 @@ option to remove forced aspect ratio for user profiles (requested)
|
||||||
showing user tags (mrf policies for user + custom if present)
|
showing user tags (mrf policies for user + custom if present)
|
||||||
version information now is also in about page
|
version information now is also in about page
|
||||||
mention autosuggest now sorts by recent activity
|
mention autosuggest now sorts by recent activity
|
||||||
|
non-square emoji support (toggleable by user)
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,11 @@ export default {
|
||||||
data: () => ({
|
data: () => ({
|
||||||
mobileActivePanel: 'timeline',
|
mobileActivePanel: 'timeline',
|
||||||
}),
|
}),
|
||||||
|
provide() {
|
||||||
|
return {
|
||||||
|
allowNonSquareEmoji: useMergedConfigStore().mergedConfig.nonSquareEmoji,
|
||||||
|
}
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
themeApplied() {
|
themeApplied() {
|
||||||
this.removeSplash()
|
this.removeSplash()
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,11 @@ const BasicUserCard = {
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return useMergedConfigStore().mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default BasicUserCard
|
export default BasicUserCard
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
class="basic-user-card-user-name-value"
|
class="basic-user-card-user-name-value"
|
||||||
:html="user.name"
|
:html="user.name"
|
||||||
:emoji="user.emoji"
|
:emoji="user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -20,5 +20,8 @@ export default {
|
||||||
htmlTitle() {
|
htmlTitle() {
|
||||||
return this.user ? this.user.name_html : ''
|
return this.user ? this.user.name_html : ''
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return useMergedConfigStore().mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@
|
||||||
:title="'@'+(user && user.screen_name_ui)"
|
:title="'@'+(user && user.screen_name_ui)"
|
||||||
:html="htmlTitle"
|
:html="htmlTitle"
|
||||||
:emoji="user.emoji || []"
|
:emoji="user.emoji || []"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
:is-local="user.is_local"
|
:is-local="user.is_local"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -210,6 +210,9 @@ const Notification = {
|
||||||
mergedConfig() {
|
mergedConfig() {
|
||||||
return useMergedConfigStore().mergedConfig
|
return useMergedConfigStore().mergedConfig
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return this.mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
shouldConfirmApprove() {
|
shouldConfirmApprove() {
|
||||||
return this.mergedConfig.modalOnApproveFollow
|
return this.mergedConfig.modalOnApproveFollow
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@
|
||||||
:title="'@'+notification.from_profile.screen_name_ui"
|
:title="'@'+notification.from_profile.screen_name_ui"
|
||||||
:html="notification.from_profile.name_html"
|
:html="notification.from_profile.name_html"
|
||||||
:emoji="notification.from_profile.emoji"
|
:emoji="notification.from_profile.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
:is-local="notification.from_profile.is_local"
|
:is-local="notification.from_profile.is_local"
|
||||||
/>
|
/>
|
||||||
</bdi>
|
</bdi>
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,9 @@ export default {
|
||||||
return this.expired ? 'polls.expired' : 'polls.expires_in'
|
return this.expired ? 'polls.expired' : 'polls.expires_in'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return useMergedConfigStore().mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
loggedIn() {
|
loggedIn() {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
:html="option.title_html"
|
:html="option.title_html"
|
||||||
:handle-links="false"
|
:handle-links="false"
|
||||||
:emoji="emoji"
|
:emoji="emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,12 @@ export default {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
// Allow wide emoji (max 3:1 ratio)
|
||||||
|
allowNonSquareEmoji: {
|
||||||
|
required: false,
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// NEVER EVER TOUCH DATA INSIDE RENDER
|
// NEVER EVER TOUCH DATA INSIDE RENDER
|
||||||
render() {
|
render() {
|
||||||
|
|
@ -322,7 +328,7 @@ export default {
|
||||||
// slots updated -> rerender -> emit -> update up the tree -> rerender -> ...
|
// slots updated -> rerender -> emit -> update up the tree -> rerender -> ...
|
||||||
// at least until vue3?
|
// at least until vue3?
|
||||||
const result = (
|
const result = (
|
||||||
<span class={['RichContent', this.faint ? '-faint' : '']}>
|
<span class={['RichContent', this.faint ? '-faint' : '', this.allowNonSquareEmoji ? '-allow-non-square-emoji' : '']}>
|
||||||
{this.collapse
|
{this.collapse
|
||||||
? pass2.map((x) => {
|
? pass2.map((x) => {
|
||||||
if (!Array.isArray(x)) return x.replace(/\n/g, ' ')
|
if (!Array.isArray(x)) return x.replace(/\n/g, ' ')
|
||||||
|
|
|
||||||
|
|
@ -77,6 +77,14 @@
|
||||||
height: var(--emoji-size, 32px);
|
height: var(--emoji-size, 32px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.-allow-non-square-emoji {
|
||||||
|
.emoji {
|
||||||
|
width: auto;
|
||||||
|
max-width: calc(var(--emoji-size, 32px) * 3);
|
||||||
|
min-width: var(--emoji-size, 32px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.img,
|
.img,
|
||||||
video {
|
video {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|
|
||||||
|
|
@ -169,6 +169,11 @@
|
||||||
{{ $t('settings.stop_gifs') }}
|
{{ $t('settings.stop_gifs') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="nonSquareEmoji">
|
||||||
|
{{ $t('settings.non_square_emoji') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<BooleanSetting
|
<BooleanSetting
|
||||||
:local="true"
|
:local="true"
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,9 @@ const Status = {
|
||||||
!this.inConversation
|
!this.inConversation
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return this.mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
repeaterClass() {
|
repeaterClass() {
|
||||||
const user = this.statusoid.user
|
const user = this.statusoid.user
|
||||||
return highlightClass(user)
|
return highlightClass(user)
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,7 @@
|
||||||
<RichContent
|
<RichContent
|
||||||
:html="retweeterHtml"
|
:html="retweeterHtml"
|
||||||
:emoji="retweeterUser.emoji"
|
:emoji="retweeterUser.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
:is-local="retweeterUser.is_local"
|
:is-local="retweeterUser.is_local"
|
||||||
/>
|
/>
|
||||||
</router-link>
|
</router-link>
|
||||||
|
|
@ -153,6 +154,7 @@
|
||||||
<RichContent
|
<RichContent
|
||||||
:html="status.user.name"
|
:html="status.user.name"
|
||||||
:emoji="status.user.emoji"
|
:emoji="status.user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
:is-local="status.user.is_local"
|
:is-local="status.user.is_local"
|
||||||
/>
|
/>
|
||||||
</h4>
|
</h4>
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,9 @@ const StatusBody = {
|
||||||
localCollapseSubjectDefault() {
|
localCollapseSubjectDefault() {
|
||||||
return this.mergedConfig.collapseMessageWithSubject
|
return this.mergedConfig.collapseMessageWithSubject
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return this.mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
// This is a bit hacky, but we want to approximate post height before rendering
|
// This is a bit hacky, but we want to approximate post height before rendering
|
||||||
// so we count newlines (masto uses <p> for paragraphs, GS uses <br> between them)
|
// so we count newlines (masto uses <p> for paragraphs, GS uses <br> between them)
|
||||||
// as well as approximate line count by counting characters and approximating ~80
|
// as well as approximate line count by counting characters and approximating ~80
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
:html="status.summary_raw_html"
|
:html="status.summary_raw_html"
|
||||||
:emoji="status.emojis"
|
:emoji="status.emojis"
|
||||||
:is-local="status.isLocal"
|
:is-local="status.isLocal"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
<button
|
<button
|
||||||
v-show="longSubject && showingLongSubject"
|
v-show="longSubject && showingLongSubject"
|
||||||
|
|
@ -47,6 +48,7 @@
|
||||||
:greentext="mergedConfig.greentext"
|
:greentext="mergedConfig.greentext"
|
||||||
:attentions="status.attentions"
|
:attentions="status.attentions"
|
||||||
:is-local="status.is_local"
|
:is-local="status.is_local"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
@parse-ready="onParseReady"
|
@parse-ready="onParseReady"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -400,6 +400,9 @@ export default {
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return this.mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
...mapState(useMergedConfigStore, ['mergedConfig']),
|
...mapState(useMergedConfigStore, ['mergedConfig']),
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -140,6 +140,7 @@
|
||||||
:title="editable ? newName : user.name_unescaped"
|
:title="editable ? newName : user.name_unescaped"
|
||||||
:html="editable ? newName : user.name_unescaped"
|
:html="editable ? newName : user.name_unescaped"
|
||||||
:emoji="editable ? emoji : user.emoji"
|
:emoji="editable ? emoji : user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
</router-link>
|
</router-link>
|
||||||
<EmojiInput
|
<EmojiInput
|
||||||
|
|
@ -369,6 +370,7 @@
|
||||||
:class="{ '-justify-left': mergedConfig.userCardLeftJustify }"
|
:class="{ '-justify-left': mergedConfig.userCardLeftJustify }"
|
||||||
:html="editable ? escapedNewBio : user.description_html"
|
:html="editable ? escapedNewBio : user.description_html"
|
||||||
:emoji="editable ? emoji : user.emoji"
|
:emoji="editable ? emoji : user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
:handle-links="true"
|
:handle-links="true"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -423,6 +425,7 @@
|
||||||
<RichContent
|
<RichContent
|
||||||
:html="field.name"
|
:html="field.name"
|
||||||
:emoji="editable ? emoji : user.emoji"
|
:emoji="editable ? emoji : user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
</dt>
|
</dt>
|
||||||
<dd
|
<dd
|
||||||
|
|
@ -432,6 +435,7 @@
|
||||||
<RichContent
|
<RichContent
|
||||||
:html="field.value"
|
:html="field.value"
|
||||||
:emoji="editable ? emoji : user.emoji"
|
:emoji="editable ? emoji : user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,9 @@ const UserListPopover = {
|
||||||
usersCapped() {
|
usersCapped() {
|
||||||
return this.users.slice(0, 16)
|
return this.users.slice(0, 16)
|
||||||
},
|
},
|
||||||
|
allowNonSquareEmoji() {
|
||||||
|
return useMergedConfigStore().mergedConfig.nonSquareEmoji
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
:title="'@'+user.screen_name_ui"
|
:title="'@'+user.screen_name_ui"
|
||||||
:html="user.name_html"
|
:html="user.name_html"
|
||||||
:emoji="user.emoji"
|
:emoji="user.emoji"
|
||||||
|
:allow-non-square-emoji="allowNonSquareEmoji"
|
||||||
/>
|
/>
|
||||||
<!-- eslint-enable vue/no-v-html -->
|
<!-- eslint-enable vue/no-v-html -->
|
||||||
<span class="user-list-screen-name">{{ user.screen_name_ui }}</span><UnicodeDomainIndicator :user="user" />
|
<span class="user-list-screen-name">{{ user.screen_name_ui }}</span><UnicodeDomainIndicator :user="user" />
|
||||||
|
|
|
||||||
|
|
@ -794,6 +794,7 @@
|
||||||
"default_post_status_content_type": "Default post status content type",
|
"default_post_status_content_type": "Default post status content type",
|
||||||
"sensitive_by_default": "Mark posts as sensitive by default",
|
"sensitive_by_default": "Mark posts as sensitive by default",
|
||||||
"stop_gifs": "Pause animated images until you hover on them",
|
"stop_gifs": "Pause animated images until you hover on them",
|
||||||
|
"non_square_emoji": "Allow non-square emoji",
|
||||||
"streaming": "Automatically show new posts when scrolled to the top",
|
"streaming": "Automatically show new posts when scrolled to the top",
|
||||||
"auto_update": "Show new posts automatically",
|
"auto_update": "Show new posts automatically",
|
||||||
"user_mutes": "Users",
|
"user_mutes": "Users",
|
||||||
|
|
|
||||||
|
|
@ -229,6 +229,10 @@ export const INSTANCE_DEFAULT_CONFIG_DEFINITIONS = {
|
||||||
description: 'Play animated gifs on hover only',
|
description: 'Play animated gifs on hover only',
|
||||||
default: true,
|
default: true,
|
||||||
},
|
},
|
||||||
|
nonSquareEmoji: {
|
||||||
|
description: 'Allow emoji to be non-square (max 3:1 aspect)',
|
||||||
|
default: true,
|
||||||
|
},
|
||||||
replyVisibility: {
|
replyVisibility: {
|
||||||
description: 'Type of replies to show',
|
description: 'Type of replies to show',
|
||||||
default: 'all',
|
default: 'all',
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,6 @@ export const unseenNotificationsFromStore = (
|
||||||
) => {
|
) => {
|
||||||
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
return filteredNotificationsFromStore(store, notificationVisibility).filter(
|
||||||
({ seen, type }) => {
|
({ seen, type }) => {
|
||||||
console.log(ignoreInactionableSeen)
|
|
||||||
if (!ignoreInactionableSeen) return !seen
|
if (!ignoreInactionableSeen) return !seen
|
||||||
if (seen) return false
|
if (seen) return false
|
||||||
return ACTIONABLE_NOTIFICATION_TYPES.has(type)
|
return ACTIONABLE_NOTIFICATION_TYPES.has(type)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue