kopia lustrzana https://github.com/nextcloud/social
rename post button depending on the chosen privacy/visibility
(e.g. to post publicly or post to followers) Signed-off-by: Jonas Sulzer <jonas@violoncello.ch>pull/16/head
rodzic
4f9be4b5e9
commit
be61c6f98b
|
|
@ -58,7 +58,7 @@
|
|||
</emoji-picker>
|
||||
|
||||
<div class="options">
|
||||
<input :value="t('social', 'Post')" :disabled="post.length < 1" class="submit primary"
|
||||
<input :value="currentVisibilityPostLabel" :disabled="post.length < 1" class="submit primary"
|
||||
type="submit" title="" data-original-title="Post">
|
||||
<div>
|
||||
<button :class="currentVisibilityIconClass" @click.prevent="togglePopoverMenu" />
|
||||
|
|
@ -365,6 +365,26 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
currentVisibilityPostLabel() {
|
||||
return this.visibilityPostLabel(this.type)
|
||||
},
|
||||
visibilityPostLabel() {
|
||||
return (type) => {
|
||||
if (typeof type === 'undefined') {
|
||||
type = this.type
|
||||
}
|
||||
switch (type) {
|
||||
case 'public':
|
||||
return t('social', 'Post publicly')
|
||||
case 'followers':
|
||||
return t('social', 'Post to followers')
|
||||
case 'direct':
|
||||
return t('social', 'Post to recipients')
|
||||
case 'unlisted':
|
||||
return t('social', 'Post unlisted')
|
||||
}
|
||||
}
|
||||
},
|
||||
visibilityPopover() {
|
||||
return [
|
||||
{
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue