refs #151 Translate at new toot
This commit is contained in:
parent
33cf04c754
commit
61d65c4081
|
@ -101,5 +101,12 @@
|
|||
"cancel": "Cancel",
|
||||
"confirm_message": "Are you sure to remove all associations?"
|
||||
}
|
||||
},
|
||||
"new_toot": {
|
||||
"title": "New Toot",
|
||||
"cw": "Write your waring here",
|
||||
"status": "What is on your mind?",
|
||||
"cancel": "Cancel",
|
||||
"toot": "Toot"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,5 +101,12 @@
|
|||
"cancel": "キャンセル",
|
||||
"confirm_message": "本当に全ての連携を削除しますか?"
|
||||
}
|
||||
},
|
||||
"new_toot": {
|
||||
"title": "トゥート",
|
||||
"cw": "ここに警告を書いてください",
|
||||
"status": "今なにしてる?",
|
||||
"cancel": "キャンセル",
|
||||
"toot": "トゥート!"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
title="New Toot"
|
||||
:title="$t('new_toot.title')"
|
||||
:visible.sync="newTootModal"
|
||||
width="400px"
|
||||
class="new-toot-modal">
|
||||
<el-form v-on:submit.prevent="toot">
|
||||
<div class="spoiler" v-show="showContentWarning">
|
||||
<el-input placeholder="Write your warning here" v-model="spoiler"></el-input>
|
||||
<el-input :placeholder="$t('new_toot.cw')" v-model="spoiler"></el-input>
|
||||
</div>
|
||||
<Status
|
||||
v-model="status"
|
||||
|
@ -29,10 +29,22 @@
|
|||
<el-dropdown trigger="click" @command="changeVisibility">
|
||||
<el-button size="small" type="text"><icon :name="visibilityIcon"></icon></el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="public"><icon name="globe" class="privacy-icon"></icon>Public</el-dropdown-item>
|
||||
<el-dropdown-item command="unlisted"><icon name="unlock" class="privacy-icon"></icon>Unlisted</el-dropdown-item>
|
||||
<el-dropdown-item command="private"><icon name="lock" class="privacy-icon"></icon>Private</el-dropdown-item>
|
||||
<el-dropdown-item command="direct"><icon name="envelope" class="privacy-icon" scale="0.8"></icon>Direct</el-dropdown-item>
|
||||
<el-dropdown-item :command="visibilityList.Public.value">
|
||||
<icon name="globe" class="privacy-icon"></icon>
|
||||
{{ visibilityList.Public.name }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="visibilityList.Unlisted.value">
|
||||
<icon name="unlock" class="privacy-icon"></icon>
|
||||
{{ visibilityList.Unlisted.name }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="visibilityList.Private.value">
|
||||
<icon name="lock" class="privacy-icon"></icon>
|
||||
{{ visibilityList.Private.name }}
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item :command="visibilityList.Direct.value">
|
||||
<icon name="envelope" class="privacy-icon" scale="0.8"></icon>
|
||||
{{ visibilityList.Direct.name }}
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
@ -48,8 +60,8 @@
|
|||
</el-button>
|
||||
</div>
|
||||
<span class="text-count">{{ 500 - status.length }}</span>
|
||||
<el-button @click="close">Cancel</el-button>
|
||||
<el-button type="primary" @click="toot" v-loading="blockSubmit">Toot</el-button>
|
||||
<el-button @click="close">{{ $t('new_toot.cancel') }}</el-button>
|
||||
<el-button type="primary" @click="toot" v-loading="blockSubmit">{{ $t('new_toot.toot') }}</el-button>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
@ -67,7 +79,8 @@ export default {
|
|||
},
|
||||
data () {
|
||||
return {
|
||||
showContentWarning: false
|
||||
showContentWarning: false,
|
||||
visibilityList: Visibility
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -217,7 +230,7 @@ export default {
|
|||
this.$store.commit('TimelineSpace/Modals/NewToot/removeMedia', media)
|
||||
},
|
||||
changeVisibility (level) {
|
||||
this.$store.dispatch('TimelineSpace/Modals/NewToot/changeVisibility', level)
|
||||
this.$store.commit('TimelineSpace/Modals/NewToot/changeVisibilityValue', level)
|
||||
},
|
||||
changeSensitive () {
|
||||
this.$store.commit('TimelineSpace/Modals/NewToot/changeSensitive', !this.sensitive)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
v-shortkey="openSuggest ? {up: ['arrowup'], down: ['arrowdown'], enter: ['enter']} : {linux: ['ctrl', 'enter'], mac: ['meta', 'enter']}"
|
||||
@shortkey="handleKey"
|
||||
v-on:input="startSuggest"
|
||||
placeholder="What is on your mind?"
|
||||
:placeholder="$t('new_toot.status')"
|
||||
autofocus>
|
||||
</textarea>
|
||||
<el-popover
|
||||
|
|
|
@ -139,18 +139,6 @@ const NewToot = {
|
|||
},
|
||||
resetMediaId ({ commit }) {
|
||||
commit('updateMediaId', 0)
|
||||
},
|
||||
/**
|
||||
* changeVisibility
|
||||
* @param commit vuex commit object
|
||||
* @param level visibility level string object
|
||||
**/
|
||||
changeVisibility ({ commit }, level) {
|
||||
Object.keys(Visibility).map((key, index) => {
|
||||
if (Visibility[key].name === level) {
|
||||
commit('changeVisibility', Visibility[key])
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue