forked from AkkomaGang/akkoma-fe
Merge branch 'showMobileNewPost' into 'develop'
New user option: Always show floating New Post button See merge request pleroma/pleroma-fe!1395
This commit is contained in:
commit
a8a82ad12f
9 changed files with 25 additions and 3 deletions
|
@ -11,6 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- Implemented user option to change sidebar position to the right side
|
- Implemented user option to change sidebar position to the right side
|
||||||
- Implemented user option to hide floating shout panel
|
- Implemented user option to hide floating shout panel
|
||||||
- Implemented "edit profile" button if viewing own profile which opens profile settings
|
- Implemented "edit profile" button if viewing own profile which opens profile settings
|
||||||
|
- Implemented user option to always show floating New Post button (normally mobile-only)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
- Fixed follow request count showing in the wrong location in mobile view
|
- Fixed follow request count showing in the wrong location in mobile view
|
||||||
|
|
|
@ -73,6 +73,9 @@ export default {
|
||||||
this.$store.state.instance.instanceSpecificPanelContent
|
this.$store.state.instance.instanceSpecificPanelContent
|
||||||
},
|
},
|
||||||
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
|
showFeaturesPanel () { return this.$store.state.instance.showFeaturesPanel },
|
||||||
|
shoutboxPosition () {
|
||||||
|
return this.$store.getters.mergedConfig.showNewPostButton || false
|
||||||
|
},
|
||||||
hideShoutbox () {
|
hideShoutbox () {
|
||||||
return this.$store.getters.mergedConfig.hideShoutbox
|
return this.$store.getters.mergedConfig.hideShoutbox
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
v-if="currentUser && shout && !hideShoutbox"
|
v-if="currentUser && shout && !hideShoutbox"
|
||||||
:floating="true"
|
:floating="true"
|
||||||
class="floating-shout mobile-hidden"
|
class="floating-shout mobile-hidden"
|
||||||
|
:class="{ 'left': shoutboxPosition }"
|
||||||
/>
|
/>
|
||||||
<MobilePostStatusButton />
|
<MobilePostStatusButton />
|
||||||
<UserReportingModal />
|
<UserReportingModal />
|
||||||
|
|
|
@ -44,6 +44,9 @@ const MobilePostStatusButton = {
|
||||||
|
|
||||||
return this.autohideFloatingPostButton && (this.hidden || this.inputActive)
|
return this.autohideFloatingPostButton && (this.hidden || this.inputActive)
|
||||||
},
|
},
|
||||||
|
isPersistent () {
|
||||||
|
return !!this.$store.getters.mergedConfig.showNewPostButton
|
||||||
|
},
|
||||||
autohideFloatingPostButton () {
|
autohideFloatingPostButton () {
|
||||||
return !!this.$store.getters.mergedConfig.autohideFloatingPostButton
|
return !!this.$store.getters.mergedConfig.autohideFloatingPostButton
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div v-if="isLoggedIn">
|
<div v-if="isLoggedIn">
|
||||||
<button
|
<button
|
||||||
class="button-default new-status-button"
|
class="button-default new-status-button"
|
||||||
:class="{ 'hidden': isHidden }"
|
:class="{ 'hidden': isHidden, 'always-show': isPersistent }"
|
||||||
@click="openPostForm"
|
@click="openPostForm"
|
||||||
>
|
>
|
||||||
<FAIcon icon="pen" />
|
<FAIcon icon="pen" />
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@media all and (min-width: 801px) {
|
@media all and (min-width: 801px) {
|
||||||
.new-status-button {
|
.new-status-button:not(.always-show) {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -122,6 +122,11 @@
|
||||||
{{ $t('settings.sensitive_by_default') }}
|
{{ $t('settings.sensitive_by_default') }}
|
||||||
</BooleanSetting>
|
</BooleanSetting>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<BooleanSetting path="alwaysShowNewPostButton">
|
||||||
|
{{ $t('settings.always_show_post_button') }}
|
||||||
|
</BooleanSetting>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<BooleanSetting path="autohideFloatingPostButton">
|
<BooleanSetting path="autohideFloatingPostButton">
|
||||||
{{ $t('settings.autohide_floating_post_button') }}
|
{{ $t('settings.autohide_floating_post_button') }}
|
||||||
|
|
|
@ -79,12 +79,19 @@
|
||||||
|
|
||||||
.floating-shout {
|
.floating-shout {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0px;
|
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
max-width: 25em;
|
max-width: 25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.floating-shout.left {
|
||||||
|
left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.floating-shout:not(.left) {
|
||||||
|
right: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
.shout-panel {
|
.shout-panel {
|
||||||
.shout-heading {
|
.shout-heading {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
|
@ -352,6 +352,7 @@
|
||||||
"hide_isp": "Hide instance-specific panel",
|
"hide_isp": "Hide instance-specific panel",
|
||||||
"hide_shoutbox": "Hide instance shoutbox",
|
"hide_shoutbox": "Hide instance shoutbox",
|
||||||
"right_sidebar": "Show sidebar on the right side",
|
"right_sidebar": "Show sidebar on the right side",
|
||||||
|
"always_show_post_button": "Always show floating New Post button",
|
||||||
"hide_wallpaper": "Hide instance wallpaper",
|
"hide_wallpaper": "Hide instance wallpaper",
|
||||||
"preload_images": "Preload images",
|
"preload_images": "Preload images",
|
||||||
"use_one_click_nsfw": "Open NSFW attachments with just one click",
|
"use_one_click_nsfw": "Open NSFW attachments with just one click",
|
||||||
|
|
|
@ -35,6 +35,7 @@ export const defaultState = {
|
||||||
loopVideoSilentOnly: true,
|
loopVideoSilentOnly: true,
|
||||||
streaming: false,
|
streaming: false,
|
||||||
emojiReactionsOnTimeline: true,
|
emojiReactionsOnTimeline: true,
|
||||||
|
alwaysShowNewPostButton: false,
|
||||||
autohideFloatingPostButton: false,
|
autohideFloatingPostButton: false,
|
||||||
pauseOnUnfocused: true,
|
pauseOnUnfocused: true,
|
||||||
stopGifs: false,
|
stopGifs: false,
|
||||||
|
|
Loading…
Reference in a new issue