summaryrefslogtreecommitdiff
path: root/src/client/components
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2020-03-22 10:59:27 +0900
committersyuilo <syuilotan@yahoo.co.jp>2020-03-22 10:59:27 +0900
commit7f0084a7ede7a3950ea6bdaeadd744f602d010cf (patch)
treee339d8002b094f18dccabf364479aaab056ee0dd /src/client/components
parentMerge branch 'develop' (diff)
parent12.23.0 (diff)
downloadmisskey-7f0084a7ede7a3950ea6bdaeadd744f602d010cf.tar.gz
misskey-7f0084a7ede7a3950ea6bdaeadd744f602d010cf.tar.bz2
misskey-7f0084a7ede7a3950ea6bdaeadd744f602d010cf.zip
Merge branch 'develop'
Diffstat (limited to 'src/client/components')
-rw-r--r--src/client/components/drive.file.vue4
-rw-r--r--src/client/components/drive.folder.vue16
-rw-r--r--src/client/components/drive.vue28
-rw-r--r--src/client/components/emoji-picker.vue19
-rw-r--r--src/client/components/note.vue25
-rw-r--r--src/client/components/post-form.vue1
-rwxr-xr-xsrc/client/components/signin.vue4
7 files changed, 55 insertions, 42 deletions
diff --git a/src/client/components/drive.file.vue b/src/client/components/drive.file.vue
index 2ef3fd38e4..014e1a6ca5 100644
--- a/src/client/components/drive.file.vue
+++ b/src/client/components/drive.file.vue
@@ -139,9 +139,9 @@ export default Vue.extend({
rename() {
this.$root.dialog({
- title: this.$t('contextmenu.rename-file'),
+ title: this.$t('renameFile'),
input: {
- placeholder: this.$t('contextmenu.input-new-file-name'),
+ placeholder: this.$t('inputNewFileName'),
default: this.file.name,
allowEmpty: false
}
diff --git a/src/client/components/drive.folder.vue b/src/client/components/drive.folder.vue
index 658aced3e8..2e861e2480 100644
--- a/src/client/components/drive.folder.vue
+++ b/src/client/components/drive.folder.vue
@@ -137,14 +137,14 @@ export default Vue.extend({
switch (err) {
case 'detected-circular-definition':
this.$root.dialog({
- title: this.$t('unable-to-process'),
- text: this.$t('circular-reference-detected')
+ title: this.$t('unableToProcess'),
+ text: this.$t('circularReferenceFolder')
});
break;
default:
this.$root.dialog({
type: 'error',
- text: this.$t('unhandled-error')
+ text: this.$t('error')
});
}
});
@@ -177,9 +177,9 @@ export default Vue.extend({
rename() {
this.$root.dialog({
- title: this.$t('contextmenu.rename-folder'),
+ title: this.$t('renameFolder'),
input: {
- placeholder: this.$t('contextmenu.input-new-folder-name'),
+ placeholder: this.$t('inputNewFolderName'),
default: this.folder.name
}
}).then(({ canceled, result: name }) => {
@@ -206,14 +206,14 @@ export default Vue.extend({
case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
this.$root.dialog({
type: 'error',
- title: this.$t('unable-to-delete'),
- text: this.$t('has-child-files-or-folders')
+ title: this.$t('unableToDelete'),
+ text: this.$t('hasChildFilesOrFolders')
});
break;
default:
this.$root.dialog({
type: 'error',
- text: this.$t('unable-to-delete')
+ text: this.$t('unableToDelete')
});
}
});
diff --git a/src/client/components/drive.vue b/src/client/components/drive.vue
index bb35b156aa..fddac5b9aa 100644
--- a/src/client/components/drive.vue
+++ b/src/client/components/drive.vue
@@ -263,14 +263,14 @@ export default Vue.extend({
switch (err) {
case 'detected-circular-definition':
this.$root.dialog({
- title: this.$t('unable-to-process'),
- text: this.$t('circular-reference-detected')
+ title: this.$t('unableToProcess'),
+ text: this.$t('circularReferenceFolder')
});
break;
default:
this.$root.dialog({
type: 'error',
- text: this.$t('unhandled-error')
+ text: this.$t('error')
});
}
});
@@ -284,9 +284,9 @@ export default Vue.extend({
urlUpload() {
this.$root.dialog({
- title: this.$t('url-upload'),
+ title: this.$t('uploadFromUrl'),
input: {
- placeholder: this.$t('url-of-file')
+ placeholder: this.$t('uploadFromUrlDescription')
}
}).then(({ canceled, result: url }) => {
if (canceled) return;
@@ -296,17 +296,17 @@ export default Vue.extend({
});
this.$root.dialog({
- title: this.$t('url-upload-requested'),
- text: this.$t('may-take-time')
+ title: this.$t('uploadFromUrlRequested'),
+ text: this.$t('uploadFromUrlMayTakeTime')
});
});
},
createFolder() {
this.$root.dialog({
- title: this.$t('create-folder'),
+ title: this.$t('createFolder'),
input: {
- placeholder: this.$t('folder-name')
+ placeholder: this.$t('folderName')
}
}).then(({ canceled, result: name }) => {
if (canceled) return;
@@ -321,9 +321,9 @@ export default Vue.extend({
renameFolder(folder) {
this.$root.dialog({
- title: this.$t('contextmenu.rename-folder'),
+ title: this.$t('renameFolder'),
input: {
- placeholder: this.$t('contextmenu.input-new-folder-name'),
+ placeholder: this.$t('inputNewFolderName'),
default: folder.name
}
}).then(({ canceled, result: name }) => {
@@ -349,14 +349,14 @@ export default Vue.extend({
case 'b0fc8a17-963c-405d-bfbc-859a487295e1':
this.$root.dialog({
type: 'error',
- title: this.$t('unable-to-delete'),
- text: this.$t('has-child-files-or-folders')
+ title: this.$t('unableToDelete'),
+ text: this.$t('hasChildFilesOrFolders')
});
break;
default:
this.$root.dialog({
type: 'error',
- text: this.$t('unable-to-delete')
+ text: this.$t('unableToDelete')
});
}
});
diff --git a/src/client/components/emoji-picker.vue b/src/client/components/emoji-picker.vue
index a647b0ea04..e346023f29 100644
--- a/src/client/components/emoji-picker.vue
+++ b/src/client/components/emoji-picker.vue
@@ -2,12 +2,11 @@
<x-popup :source="source" ref="popup" @closed="() => { $emit('closed'); destroyDom(); }">
<div class="omfetrab">
<header>
- <button v-for="category in categories"
+ <button v-for="(category, i) in categories"
class="_button"
- :title="category.text"
@click="go(category)"
:class="{ active: category.isActive }"
- :key="category.text"
+ :key="i"
>
<fa :icon="category.icon" fixed-width/>
</button>
@@ -15,7 +14,7 @@
<div class="emojis">
<template v-if="categories[0].isActive">
- <header class="category"><fa :icon="faHistory" fixed-width/> {{ $t('recentUsedEmojis') }}</header>
+ <header class="category"><fa :icon="faHistory" fixed-width/> {{ $t('recentUsed') }}</header>
<div class="list">
<button v-for="(emoji, i) in ($store.state.device.recentEmojis || [])"
class="_button"
@@ -27,9 +26,10 @@
<img v-else :src="$store.state.device.disableShowingAnimatedImages ? getStaticImageUrl(emoji.url) : emoji.url"/>
</button>
</div>
+
+ <header class="category"><fa :icon="faAsterisk" fixed-width/> {{ $t('customEmojis') }}</header>
</template>
- <header class="category"><fa :icon="categories.find(x => x.isActive).icon" fixed-width/> {{ categories.find(x => x.isActive).text }}</header>
<template v-if="categories.find(x => x.isActive).name">
<div class="list">
<button v-for="emoji in emojilist.filter(e => e.category === categories.find(x => x.isActive).name)"
@@ -92,47 +92,38 @@ export default Vue.extend({
customEmojis: {},
faGlobe, faHistory,
categories: [{
- text: this.$t('customEmoji'),
icon: faAsterisk,
isActive: true
}, {
name: 'people',
- text: this.$t('people'),
icon: faLaugh,
isActive: false
}, {
name: 'animals_and_nature',
- text: this.$t('animals-and-nature'),
icon: faLeaf,
isActive: false
}, {
name: 'food_and_drink',
- text: this.$t('food-and-drink'),
icon: faUtensils,
isActive: false
}, {
name: 'activity',
- text: this.$t('activity'),
icon: faFutbol,
isActive: false
}, {
name: 'travel_and_places',
- text: this.$t('travel-and-places'),
icon: faCity,
isActive: false
}, {
name: 'objects',
- text: this.$t('objects'),
icon: faDice,
isActive: false
}, {
name: 'symbols',
- text: this.$t('symbols'),
icon: faHeart,
isActive: false
}, {
name: 'flags',
- text: this.$t('flags'),
icon: faFlag,
isActive: false
}]
diff --git a/src/client/components/note.vue b/src/client/components/note.vue
index db669309d3..b3126e0673 100644
--- a/src/client/components/note.vue
+++ b/src/client/components/note.vue
@@ -86,7 +86,7 @@
<script lang="ts">
import Vue from 'vue';
import { faBolt, faTimes, faBullhorn, faStar, faLink, faExternalLinkSquareAlt, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan, faQuoteRight, faInfoCircle } from '@fortawesome/free-solid-svg-icons';
-import { faCopy, faTrashAlt, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
+import { faCopy, faTrashAlt, faEdit, faEye, faEyeSlash } from '@fortawesome/free-regular-svg-icons';
import { parse } from '../../mfm/parse';
import { sum, unique } from '../../prelude/array';
import i18n from '../i18n';
@@ -142,7 +142,7 @@ export default Vue.extend({
replies: [],
showContent: false,
hideThisNote: false,
- faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan
+ faEdit, faBolt, faTimes, faBullhorn, faPlus, faMinus, faRetweet, faReply, faReplyAll, faEllipsisH, faHome, faUnlock, faEnvelope, faThumbtack, faBan
};
},
@@ -460,6 +460,22 @@ export default Vue.extend({
});
},
+ delEdit() {
+ this.$root.dialog({
+ type: 'warning',
+ text: this.$t('deleteAndEditConfirm'),
+ showCancelButton: true
+ }).then(({ canceled }) => {
+ if (canceled) return;
+
+ this.$root.api('notes/delete', {
+ noteId: this.appearNote.id
+ });
+
+ this.$root.post({ initialNote: this.appearNote, renote: this.appearNote.renote, reply: this.appearNote.reply });
+ });
+ },
+
toggleFavorite(favorite: boolean) {
this.$root.api(favorite ? 'notes/favorites/create' : 'notes/favorites/delete', {
noteId: this.appearNote.id
@@ -548,6 +564,11 @@ export default Vue.extend({
...(this.appearNote.userId == this.$store.state.i.id ? [
null,
{
+ icon: faEdit,
+ text: this.$t('deleteAndEdit'),
+ action: this.delEdit
+ },
+ {
icon: faTrashAlt,
text: this.$t('delete'),
action: this.del
diff --git a/src/client/components/post-form.vue b/src/client/components/post-form.vue
index 7b84938d5a..d7bd105d80 100644
--- a/src/client/components/post-form.vue
+++ b/src/client/components/post-form.vue
@@ -300,6 +300,7 @@ export default Vue.extend({
});
}
this.visibility = init.visibility;
+ this.localOnly = init.localOnly;
this.quoteId = init.renote ? init.renote.id : null;
}
diff --git a/src/client/components/signin.vue b/src/client/components/signin.vue
index 758bc59107..3d68289390 100755
--- a/src/client/components/signin.vue
+++ b/src/client/components/signin.vue
@@ -155,7 +155,7 @@ export default Vue.extend({
if (err === null) return;
this.$root.dialog({
type: 'error',
- text: this.$t('login-failed')
+ text: this.$t('signinFailed')
});
this.signing = false;
});
@@ -176,7 +176,7 @@ export default Vue.extend({
}).catch(() => {
this.$root.dialog({
type: 'error',
- text: this.$t('login-failed')
+ text: this.$t('signinFailed')
});
this.challengeData = null;
this.totpLogin = false;