See #559: Fixed untranslated privacy settings
This commit is contained in:
parent
2845bdd932
commit
32ccea92d2
|
@ -9,8 +9,10 @@
|
||||||
<human-date class="date" :date="event.published" />
|
<human-date class="date" :date="event.published" />
|
||||||
</div>
|
</div>
|
||||||
<div class="extra text">
|
<div class="extra text">
|
||||||
<router-link :to="{name: 'library.tracks.detail', params: {id: event.object.local_id }}">{{ event.object.name }}</router-link>
|
<router-link :to="{name: 'library.tracks.detail', params: {id: event.object.local_id }}">
|
||||||
<translate :translate-params="{album: event.object.album, artist: event.object.artist}">from %{ album } by %{ artist }</translate>
|
{{ event.object.name }}
|
||||||
|
</router-link>
|
||||||
|
<translate :translate-params="{album: event.object.album, artist: event.object.artist}">from %{ album } by %{ artist }</translate>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -9,8 +9,10 @@
|
||||||
<human-date class="date" :date="event.published" />
|
<human-date class="date" :date="event.published" />
|
||||||
</div>
|
</div>
|
||||||
<div class="extra text">
|
<div class="extra text">
|
||||||
<router-link :to="{name: 'library.tracks.detail', params: {id: event.object.local_id }}">{{ event.object.name }}</router-link>
|
<router-link :to="{name: 'library.tracks.detail', params: {id: event.object.local_id }}">
|
||||||
<translate :translate-params="{album: event.object.album, artist: event.object.artist}">from %{ album } by %{ artist }</translate>
|
{{ event.object.name }}
|
||||||
|
</router-link>
|
||||||
|
<translate :translate-params="{album: event.object.album, artist: event.object.artist}">from %{ album } by %{ artist }</translate>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="field" v-for="f in orderedSettingsFields">
|
<div class="field" v-for="f in orderedSettingsFields">
|
||||||
<label :for="f.id">{{ f.label }}</label>
|
<label>{{ sharedLabels.fields[f.id].label }}</label>
|
||||||
<p v-if="f.help">{{ f.help }}</p>
|
<p v-if="f.help">{{ sharedLabels.fields[f.id].help }}</p>
|
||||||
<select v-if="f.type === 'dropdown'" class="ui dropdown" v-model="f.value">
|
<select v-if="f.type === 'dropdown'" class="ui dropdown" v-model="f.value">
|
||||||
<option :value="c.value" v-for="c in f.choices">{{ c.label }}</option>
|
<option :value="c" v-for="c in f.choices">{{ sharedLabels.fields[f.id].choices[c] }}</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<button :class="['ui', {'loading': isLoading}, 'button']" type="submit">
|
<button :class="['ui', {'loading': isLoading}, 'button']" type="submit">
|
||||||
|
@ -118,8 +118,10 @@ import axios from 'axios'
|
||||||
import logger from '@/logging'
|
import logger from '@/logging'
|
||||||
import PasswordInput from '@/components/forms/PasswordInput'
|
import PasswordInput from '@/components/forms/PasswordInput'
|
||||||
import SubsonicTokenForm from '@/components/auth/SubsonicTokenForm'
|
import SubsonicTokenForm from '@/components/auth/SubsonicTokenForm'
|
||||||
|
import TranslationsMixin from '@/components/mixins/Translations'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [TranslationsMixin],
|
||||||
components: {
|
components: {
|
||||||
PasswordInput,
|
PasswordInput,
|
||||||
SubsonicTokenForm
|
SubsonicTokenForm
|
||||||
|
@ -144,24 +146,14 @@ export default {
|
||||||
'privacy_level': {
|
'privacy_level': {
|
||||||
type: 'dropdown',
|
type: 'dropdown',
|
||||||
initial: this.$store.state.auth.profile.privacy_level,
|
initial: this.$store.state.auth.profile.privacy_level,
|
||||||
label: 'Activity visibility',
|
choices: ['me', 'instance']
|
||||||
help: 'Determine the visibility level of your activity',
|
|
||||||
choices: [
|
|
||||||
{
|
|
||||||
value: 'me',
|
|
||||||
label: 'Nobody except me'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'instance',
|
|
||||||
label: 'Everyone on this instance'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
d.settings.order.forEach(id => {
|
d.settings.order.forEach(id => {
|
||||||
d.settings.fields[id].value = d.settings.fields[id].initial
|
d.settings.fields[id].value = d.settings.fields[id].initial
|
||||||
|
d.settings.fields[id].id = id
|
||||||
})
|
})
|
||||||
return d
|
return d
|
||||||
},
|
},
|
||||||
|
|
|
@ -3,6 +3,16 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
sharedLabels () {
|
sharedLabels () {
|
||||||
return {
|
return {
|
||||||
|
fields: {
|
||||||
|
privacy_level: {
|
||||||
|
label: this.$gettext('Activity visibility'),
|
||||||
|
help: this.$gettext('Determine the visibility level of your activity'),
|
||||||
|
choices: {
|
||||||
|
me: this.$gettext('Nobody except me'),
|
||||||
|
instance: this.$gettext('Everyone on this instance'),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
filters: {
|
filters: {
|
||||||
creation_date: this.$gettext('Creation date'),
|
creation_date: this.$gettext('Creation date'),
|
||||||
accessed_date: this.$gettext('Accessed date'),
|
accessed_date: this.$gettext('Accessed date'),
|
||||||
|
|
Loading…
Reference in New Issue