parent
9e318d5ebc
commit
2a235151ed
|
@ -285,6 +285,8 @@ common/views/components/nav.vue:
|
||||||
feedback: "フィードバック"
|
feedback: "フィードバック"
|
||||||
|
|
||||||
common/views/components/note-menu.vue:
|
common/views/components/note-menu.vue:
|
||||||
|
detail: "詳細"
|
||||||
|
copy-link: "リンクをコピー"
|
||||||
favorite: "お気に入り"
|
favorite: "お気に入り"
|
||||||
pin: "ピン留め"
|
pin: "ピン留め"
|
||||||
delete: "削除"
|
delete: "削除"
|
||||||
|
|
|
@ -6,17 +6,27 @@
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from 'vue';
|
import Vue from 'vue';
|
||||||
|
import { url } from '../../../config';
|
||||||
|
import copyToClipboard from '../../../common/scripts/copy-to-clipboard';
|
||||||
|
|
||||||
export default Vue.extend({
|
export default Vue.extend({
|
||||||
props: ['note', 'source', 'compact'],
|
props: ['note', 'source', 'compact'],
|
||||||
computed: {
|
computed: {
|
||||||
items() {
|
items() {
|
||||||
const items = [];
|
const items = [{
|
||||||
items.push({
|
icon: '%fa:info-circle%',
|
||||||
|
text: '%i18n:@detail%',
|
||||||
|
action: this.detail
|
||||||
|
}, {
|
||||||
|
icon: '%fa:link%',
|
||||||
|
text: '%i18n:@copy-link%',
|
||||||
|
action: this.copyLink
|
||||||
|
}, null, {
|
||||||
icon: '%fa:star%',
|
icon: '%fa:star%',
|
||||||
text: '%i18n:@favorite%',
|
text: '%i18n:@favorite%',
|
||||||
action: this.favorite
|
action: this.favorite
|
||||||
});
|
}];
|
||||||
|
|
||||||
if (this.note.userId == this.$store.state.i.id) {
|
if (this.note.userId == this.$store.state.i.id) {
|
||||||
items.push({
|
items.push({
|
||||||
icon: '%fa:thumbtack%',
|
icon: '%fa:thumbtack%',
|
||||||
|
@ -42,6 +52,14 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
detail() {
|
||||||
|
this.$router.push(`/notes/${ this.note.id }`);
|
||||||
|
},
|
||||||
|
|
||||||
|
copyLink() {
|
||||||
|
copyToClipboard(`${url}/notes/${ this.note.id }`);
|
||||||
|
},
|
||||||
|
|
||||||
pin() {
|
pin() {
|
||||||
(this as any).api('i/pin', {
|
(this as any).api('i/pin', {
|
||||||
noteId: this.note.id
|
noteId: this.note.id
|
||||||
|
|
Loading…
Reference in a new issue