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