Merge remote-tracking branch 'upstream/develop' into betterStorage

* upstream/develop: (23 commits)
  fix lint
  use prime number step for Who to follow panel
  fix
  Revert "Revert "Update messages.js""
  Revert "Update messages.js"
  Update messages.js Update the Occitan language - Fixed Linting
  remove formatting options
  Remove outdated settings
  features panel i18n
  features panes supports chat & gopher
  Simplified image sensitivity label
  show features panel only if not login
  update
  debug
  update
  debug
  mock features panel
  i18n/messages.js: changed Folgende back to Follower
  updated german translation
  updated german translation
  ...
This commit is contained in:
Henry Jameson 2018-09-09 19:36:41 +03:00
commit ce36e8383a
8 changed files with 175 additions and 80 deletions

View file

@ -0,0 +1,14 @@
const FeaturesPanel = {
computed: {
chat: function () {
return this.$store.state.config.chatAvailable && (!this.$store.state.chatDisabled)
},
gopher: function () { return this.$store.state.config.gopherAvailable },
whoToFollow: function () { return this.$store.state.config.suggestionsEnabled },
mediaProxy: function () { return this.$store.state.config.mediaProxyAvailable },
scopeOptions: function () { return this.$store.state.config.scopeOptionsEnabled },
textlimit: function () { return this.$store.state.config.textlimit }
}
}
export default FeaturesPanel

View file

@ -0,0 +1,29 @@
<template>
<div class="features-panel">
<div class="panel panel-default base01-background">
<div class="panel-heading timeline-heading base02-background base04">
<div class="title">
{{$t('features_panel.title')}}
</div>
</div>
<div class="panel-body features-panel">
<ul>
<li v-if="chat">{{$t('features_panel.chat')}}</li>
<li v-if="gopher">{{$t('features_panel.gopher')}}</li>
<li v-if="whoToFollow">{{$t('features_panel.who_to_follow')}}</li>
<li v-if="mediaProxy">{{$t('features_panel.media_proxy')}}</li>
<li v-if="scopeOptions">{{$t('features_panel.scope_options')}}</li>
<li>{{$t('features_panel.text_limit')}} = {{textlimit}}</li>
</ul>
</div>
</div>
</div>
</template>
<script src="./features_panel.js" ></script>
<style lang="scss">
.features-panel li {
line-height: 24px;
}
</style>

View file

@ -90,8 +90,7 @@
</div>
<div class="upload_settings" v-if="newStatus.files.length > 0">
<input type="checkbox" id="filesSensitive" v-model="newStatus.nsfw">
<label for="filesSensitive" v-if="newStatus.nsfw">{{$t('post_status.attachments_sensitive')}}</label>
<label for="filesSensitive" v-else v-html="$t('post_status.attachments_not_sensitive')"></label>
<label for="filesSensitive">{{$t('post_status.attachments_sensitive')}}</label>
</div>
</form>
</div>

View file

@ -3,9 +3,10 @@ import apiService from '../../services/api/api.service.js'
function showWhoToFollow (panel, reply) {
var users = reply
var cn
var index = 0
var random = Math.floor(Math.random() * 10)
for (cn = random; cn < users.length; cn = cn + 10) {
var index
var step = 7
cn = Math.floor(Math.random() * step)
for (index = 0; index < 3; index++) {
var user
user = users[cn]
var img
@ -46,11 +47,8 @@ function showWhoToFollow (panel, reply) {
}
})
}
index = index + 1
if (index > 2) {
break
}
}
cn = (cn + step) % users.length
}
function getWhoToFollow (panel) {