2023-04-13 17:17:36 +03:00
|
|
|
import AddPostTagsModal from './modals/add-tag';
|
2023-04-07 12:48:14 +03:00
|
|
|
import Component from '@glimmer/component';
|
2023-04-11 17:37:42 +03:00
|
|
|
import DeletePostsModal from './modals/delete-posts';
|
2023-04-12 12:58:46 +03:00
|
|
|
import EditPostsAccessModal from './modals/edit-posts-access';
|
2023-04-12 16:28:09 +03:00
|
|
|
import UnpublishPostsModal from './modals/unpublish-posts';
|
|
|
|
import nql from '@tryghost/nql';
|
2023-04-07 12:48:14 +03:00
|
|
|
import {action} from '@ember/object';
|
2023-04-14 13:16:15 +03:00
|
|
|
import {capitalizeFirstLetter} from 'ghost-admin/helpers/capitalize-first-letter';
|
2023-04-07 12:48:14 +03:00
|
|
|
import {inject as service} from '@ember/service';
|
2023-04-11 17:37:42 +03:00
|
|
|
import {task} from 'ember-concurrency';
|
2023-04-07 12:48:14 +03:00
|
|
|
|
2023-04-14 10:54:35 +03:00
|
|
|
/**
|
|
|
|
* @tryghost/tpl doesn't work in admin yet (Safari)
|
|
|
|
*/
|
|
|
|
function tpl(str, data) {
|
|
|
|
for (const key in data) {
|
|
|
|
str = str.replace(new RegExp(`{${key}}`, 'g'), data[key]);
|
|
|
|
}
|
|
|
|
return str;
|
|
|
|
}
|
|
|
|
|
2023-04-13 15:49:52 +03:00
|
|
|
const messages = {
|
|
|
|
deleted: {
|
2024-05-14 10:31:19 +03:00
|
|
|
single: '{Type} deleted',
|
|
|
|
multiple: '{count} {type}s deleted'
|
2023-04-13 15:49:52 +03:00
|
|
|
},
|
|
|
|
unpublished: {
|
2024-05-14 10:31:19 +03:00
|
|
|
single: '{Type} reverted to a draft',
|
|
|
|
multiple: '{count} {type}s reverted to drafts'
|
2023-04-13 15:49:52 +03:00
|
|
|
},
|
|
|
|
accessUpdated: {
|
2024-05-14 10:31:19 +03:00
|
|
|
single: '{Type} access updated',
|
|
|
|
multiple: '{Type} access updated for {count} {type}s'
|
2023-04-13 17:17:36 +03:00
|
|
|
},
|
|
|
|
tagsAdded: {
|
2024-05-14 10:31:19 +03:00
|
|
|
single: 'Tags added',
|
|
|
|
multiple: 'Tags added to {count} {type}s'
|
2023-04-14 11:41:49 +03:00
|
|
|
},
|
|
|
|
tagAdded: {
|
2024-05-14 10:31:19 +03:00
|
|
|
single: 'Tag added',
|
|
|
|
multiple: 'Tag added to {count} {type}s'
|
2023-05-15 11:30:32 +03:00
|
|
|
},
|
|
|
|
duplicated: {
|
2024-05-14 10:31:19 +03:00
|
|
|
single: '{Type} duplicated',
|
|
|
|
multiple: '{count} {type}s duplicated'
|
2023-04-13 15:49:52 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2023-04-07 12:48:14 +03:00
|
|
|
export default class PostsContextMenu extends Component {
|
|
|
|
@service ajax;
|
|
|
|
@service ghostPaths;
|
2023-04-11 17:32:11 +03:00
|
|
|
@service session;
|
2023-04-11 17:37:42 +03:00
|
|
|
@service infinity;
|
2023-04-12 12:58:46 +03:00
|
|
|
@service store;
|
2023-04-13 15:49:52 +03:00
|
|
|
@service notifications;
|
2023-04-13 18:54:01 +03:00
|
|
|
@service membersUtils;
|
2023-04-07 12:48:14 +03:00
|
|
|
|
|
|
|
get menu() {
|
|
|
|
return this.args.menu;
|
|
|
|
}
|
|
|
|
|
|
|
|
get selectionList() {
|
|
|
|
return this.menu.selectionList;
|
|
|
|
}
|
|
|
|
|
2023-04-14 13:16:15 +03:00
|
|
|
get type() {
|
|
|
|
return this.selectionList.first?.displayName === 'page' ? 'page' : 'post';
|
|
|
|
}
|
|
|
|
|
2023-04-13 15:49:52 +03:00
|
|
|
#getToastMessage(type) {
|
|
|
|
if (this.selectionList.isSingle) {
|
2023-04-14 13:16:15 +03:00
|
|
|
return tpl(messages[type].single, {count: this.selectionList.count, type: this.type, Type: capitalizeFirstLetter(this.type)});
|
2023-04-13 15:49:52 +03:00
|
|
|
}
|
2023-04-14 13:16:15 +03:00
|
|
|
return tpl(messages[type].multiple, {count: this.selectionList.count, type: this.type, Type: capitalizeFirstLetter(this.type)});
|
2023-04-13 15:49:52 +03:00
|
|
|
}
|
|
|
|
|
2023-04-13 16:04:06 +03:00
|
|
|
@action
|
|
|
|
async featurePosts() {
|
|
|
|
this.menu.performTask(this.featurePostsTask);
|
|
|
|
}
|
|
|
|
|
|
|
|
@action
|
|
|
|
async unfeaturePosts() {
|
|
|
|
this.menu.performTask(this.unfeaturePostsTask);
|
|
|
|
}
|
|
|
|
|
2023-04-13 17:17:36 +03:00
|
|
|
@action
|
|
|
|
async addTagToPosts() {
|
|
|
|
await this.menu.openModal(AddPostTagsModal, {
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-13 17:17:36 +03:00
|
|
|
selectionList: this.selectionList,
|
|
|
|
confirm: this.addTagToPostsTask
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-04-07 12:48:14 +03:00
|
|
|
@action
|
2023-04-11 17:37:42 +03:00
|
|
|
async deletePosts() {
|
2023-04-13 16:04:06 +03:00
|
|
|
this.menu.openModal(DeletePostsModal, {
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-12 16:53:17 +03:00
|
|
|
selectionList: this.selectionList,
|
2023-04-11 17:37:42 +03:00
|
|
|
confirm: this.deletePostsTask
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-04-12 16:28:09 +03:00
|
|
|
@action
|
|
|
|
async unpublishPosts() {
|
2023-04-13 16:04:06 +03:00
|
|
|
await this.menu.openModal(UnpublishPostsModal, {
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-12 16:53:17 +03:00
|
|
|
selectionList: this.selectionList,
|
2023-04-12 16:28:09 +03:00
|
|
|
confirm: this.unpublishPostsTask
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-04-12 12:58:46 +03:00
|
|
|
@action
|
|
|
|
async editPostsAccess() {
|
2023-04-13 16:04:06 +03:00
|
|
|
this.menu.openModal(EditPostsAccessModal, {
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-12 16:53:17 +03:00
|
|
|
selectionList: this.selectionList,
|
2023-04-12 12:58:46 +03:00
|
|
|
confirm: this.editPostsAccessTask
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-05-15 11:30:32 +03:00
|
|
|
@action
|
|
|
|
async copyPosts() {
|
|
|
|
this.menu.performTask(this.copyPostsTask);
|
|
|
|
}
|
|
|
|
|
2023-04-13 17:17:36 +03:00
|
|
|
@task
|
|
|
|
*addTagToPostsTask(tags) {
|
|
|
|
const updatedModels = this.selectionList.availableModels;
|
|
|
|
|
2023-04-13 18:05:42 +03:00
|
|
|
yield this.performBulkEdit('addTag', {
|
|
|
|
tags: tags.map((t) => {
|
|
|
|
return {
|
|
|
|
id: t.id,
|
|
|
|
name: t.name,
|
|
|
|
slug: t.slug
|
|
|
|
};
|
|
|
|
})
|
|
|
|
});
|
2023-04-14 11:41:49 +03:00
|
|
|
if (tags.length > 1) {
|
|
|
|
this.notifications.showNotification(this.#getToastMessage('tagsAdded'), {type: 'success'});
|
|
|
|
} else {
|
|
|
|
this.notifications.showNotification(this.#getToastMessage('tagAdded'), {type: 'success'});
|
|
|
|
}
|
2023-04-13 17:17:36 +03:00
|
|
|
|
2023-04-13 18:05:42 +03:00
|
|
|
const serializedTags = tags.toArray().map((t) => {
|
|
|
|
return {
|
|
|
|
...t.serialize({includeId: true}),
|
|
|
|
type: 'tag'
|
|
|
|
};
|
|
|
|
});
|
|
|
|
|
|
|
|
// Destroy unsaved new tags (otherwise we could select them again)
|
|
|
|
this.store.peekAll('tag').forEach((tag) => {
|
|
|
|
if (tag.isNew) {
|
|
|
|
tag.destroyRecord();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
// For new tags, attach the id to it, so we can link the new tag to the post
|
|
|
|
let allTags = null;
|
|
|
|
|
|
|
|
for (const tag of serializedTags) {
|
|
|
|
if (!tag.id) {
|
|
|
|
if (!allTags) {
|
|
|
|
// Update tags on the client side (we could have created new tags)
|
|
|
|
yield this.store.query('tag', {limit: 'all'});
|
|
|
|
allTags = this.store.peekAll('tag').toArray();
|
|
|
|
}
|
|
|
|
const createdTag = allTags.find(t => t.name === tag.name && t.id);
|
|
|
|
if (createdTag) {
|
|
|
|
tag.id = createdTag.id;
|
|
|
|
tag.slug = createdTag.slug;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-04-13 17:17:36 +03:00
|
|
|
// Update the models on the client side
|
|
|
|
for (const post of updatedModels) {
|
|
|
|
const newTags = post.tags.toArray().map((t) => {
|
|
|
|
return {
|
|
|
|
...t.serialize({includeId: true}),
|
|
|
|
type: 'tag'
|
|
|
|
};
|
|
|
|
});
|
2023-04-13 18:05:42 +03:00
|
|
|
for (const tag of serializedTags) {
|
2023-04-13 17:17:36 +03:00
|
|
|
if (!newTags.find(t => t.id === tag.id)) {
|
2023-04-13 18:05:42 +03:00
|
|
|
newTags.push(tag);
|
2023-04-13 17:17:36 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// We need to do it this way to prevent marking the model as dirty
|
|
|
|
this.store.push({
|
|
|
|
data: {
|
|
|
|
id: post.id,
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-13 17:17:36 +03:00
|
|
|
relationships: {
|
|
|
|
tags: {
|
|
|
|
data: newTags
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove posts that no longer match the filter
|
|
|
|
this.updateFilteredPosts();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-04-11 17:37:42 +03:00
|
|
|
@task
|
2023-04-13 16:04:06 +03:00
|
|
|
*deletePostsTask() {
|
2023-04-11 17:37:42 +03:00
|
|
|
const deletedModels = this.selectionList.availableModels;
|
|
|
|
yield this.performBulkDestroy();
|
2023-04-13 15:49:52 +03:00
|
|
|
this.notifications.showNotification(this.#getToastMessage('deleted'), {type: 'success'});
|
|
|
|
|
2023-04-11 17:37:42 +03:00
|
|
|
const remainingModels = this.selectionList.infinityModel.content.filter((model) => {
|
|
|
|
return !deletedModels.includes(model);
|
|
|
|
});
|
|
|
|
// Deleteobjects method from infintiymodel is broken for all models except the first page, so we cannot use this
|
|
|
|
this.infinity.replace(this.selectionList.infinityModel, remainingModels);
|
2023-04-14 13:16:15 +03:00
|
|
|
this.selectionList.clearSelection({force: true});
|
2023-04-11 17:37:42 +03:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-04-12 16:28:09 +03:00
|
|
|
@task
|
2023-04-13 16:04:06 +03:00
|
|
|
*unpublishPostsTask() {
|
2023-04-12 16:28:09 +03:00
|
|
|
const updatedModels = this.selectionList.availableModels;
|
|
|
|
yield this.performBulkEdit('unpublish');
|
2023-04-13 15:49:52 +03:00
|
|
|
this.notifications.showNotification(this.#getToastMessage('unpublished'), {type: 'success'});
|
2023-04-12 16:28:09 +03:00
|
|
|
|
|
|
|
// Update the models on the client side
|
|
|
|
for (const post of updatedModels) {
|
2023-04-13 17:20:58 +03:00
|
|
|
if (post.status === 'published') {
|
2023-04-12 16:28:09 +03:00
|
|
|
// We need to do it this way to prevent marking the model as dirty
|
|
|
|
this.store.push({
|
|
|
|
data: {
|
|
|
|
id: post.id,
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-12 16:28:09 +03:00
|
|
|
attributes: {
|
|
|
|
status: 'draft'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove posts that no longer match the filter
|
|
|
|
this.updateFilteredPosts();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
updateFilteredPosts() {
|
|
|
|
const updatedModels = this.selectionList.availableModels;
|
|
|
|
const filter = this.selectionList.allFilter;
|
2023-04-26 17:24:23 +03:00
|
|
|
const filterNql = nql(filter, {
|
2023-08-01 21:54:41 +03:00
|
|
|
expansions: [
|
|
|
|
{
|
|
|
|
key: 'primary_tag',
|
|
|
|
replacement: 'tags.slug',
|
|
|
|
expansion: 'posts_tags.sort_order:0+tags.visibility:public'
|
|
|
|
}, {
|
|
|
|
key: 'primary_author',
|
|
|
|
replacement: 'authors.slug',
|
|
|
|
expansion: 'posts_authors.sort_order:0+authors.visibility:public'
|
|
|
|
}, {
|
|
|
|
key: 'authors',
|
|
|
|
replacement: 'authors.slug'
|
|
|
|
}, {
|
|
|
|
key: 'author',
|
|
|
|
replacement: 'authors.slug'
|
|
|
|
}, {
|
|
|
|
key: 'tag',
|
|
|
|
replacement: 'tags.slug'
|
|
|
|
}, {
|
|
|
|
key: 'tags',
|
|
|
|
replacement: 'tags.slug'
|
|
|
|
}
|
|
|
|
]
|
2023-04-26 17:24:23 +03:00
|
|
|
});
|
2023-04-12 16:28:09 +03:00
|
|
|
|
|
|
|
const remainingModels = this.selectionList.infinityModel.content.filter((model) => {
|
|
|
|
if (!updatedModels.find(u => u.id === model.id)) {
|
|
|
|
return true;
|
|
|
|
}
|
2023-04-26 17:24:23 +03:00
|
|
|
return filterNql.queryJSON(model.serialize({includeId: true}));
|
2023-04-12 16:28:09 +03:00
|
|
|
});
|
|
|
|
// Deleteobjects method from infintiymodel is broken for all models except the first page, so we cannot use this
|
|
|
|
this.infinity.replace(this.selectionList.infinityModel, remainingModels);
|
2023-04-14 13:16:15 +03:00
|
|
|
|
|
|
|
this.selectionList.clearUnavailableItems();
|
2023-04-12 16:28:09 +03:00
|
|
|
}
|
|
|
|
|
2023-04-12 12:58:46 +03:00
|
|
|
@task
|
|
|
|
*editPostsAccessTask(close, {visibility, tiers}) {
|
|
|
|
const updatedModels = this.selectionList.availableModels;
|
|
|
|
yield this.performBulkEdit('access', {visibility, tiers});
|
2023-04-13 15:49:52 +03:00
|
|
|
this.notifications.showNotification(this.#getToastMessage('accessUpdated'), {type: 'success'});
|
2023-04-12 12:58:46 +03:00
|
|
|
|
|
|
|
// Update the models on the client side
|
|
|
|
for (const post of updatedModels) {
|
|
|
|
// We need to do it this way to prevent marking the model as dirty
|
|
|
|
this.store.push({
|
|
|
|
data: {
|
|
|
|
id: post.id,
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-12 12:58:46 +03:00
|
|
|
attributes: {
|
|
|
|
visibility
|
|
|
|
},
|
|
|
|
relationships: {
|
|
|
|
links: {
|
|
|
|
data: tiers
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-04-12 16:28:09 +03:00
|
|
|
// Remove posts that no longer match the filter
|
|
|
|
this.updateFilteredPosts();
|
|
|
|
|
2023-04-12 12:58:46 +03:00
|
|
|
close();
|
2023-04-13 16:04:06 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
@task
|
|
|
|
*featurePostsTask() {
|
|
|
|
const updatedModels = this.selectionList.availableModels;
|
|
|
|
yield this.performBulkEdit('feature');
|
|
|
|
|
2023-04-13 16:09:17 +03:00
|
|
|
// Update the models on the client side
|
|
|
|
for (const post of updatedModels) {
|
2023-04-13 16:04:06 +03:00
|
|
|
// We need to do it this way to prevent marking the model as dirty
|
|
|
|
this.store.push({
|
|
|
|
data: {
|
|
|
|
id: post.id,
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-13 16:04:06 +03:00
|
|
|
attributes: {
|
|
|
|
featured: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove posts that no longer match the filter
|
|
|
|
this.updateFilteredPosts();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@task
|
|
|
|
*unfeaturePostsTask() {
|
|
|
|
const updatedModels = this.selectionList.availableModels;
|
|
|
|
yield this.performBulkEdit('unfeature');
|
|
|
|
|
|
|
|
// Update the models on the client side
|
|
|
|
for (const post of updatedModels) {
|
|
|
|
// We need to do it this way to prevent marking the model as dirty
|
|
|
|
this.store.push({
|
|
|
|
data: {
|
|
|
|
id: post.id,
|
2023-04-14 13:16:15 +03:00
|
|
|
type: this.type,
|
2023-04-13 16:04:06 +03:00
|
|
|
attributes: {
|
|
|
|
featured: false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
// Remove posts that no longer match the filter
|
|
|
|
this.updateFilteredPosts();
|
2023-04-12 12:58:46 +03:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-05-15 11:30:32 +03:00
|
|
|
@task
|
|
|
|
*copyPostsTask() {
|
|
|
|
try {
|
|
|
|
const result = yield this.performCopy();
|
|
|
|
|
|
|
|
// Add to the store and retrieve model
|
|
|
|
this.store.pushPayload(result);
|
|
|
|
|
|
|
|
const data = result[this.type === 'post' ? 'posts' : 'pages'][0];
|
|
|
|
const model = this.store.peekRecord(this.type, data.id);
|
|
|
|
|
|
|
|
// Update infinity list
|
|
|
|
this.selectionList.infinityModel.content.unshiftObject(model);
|
|
|
|
|
|
|
|
// Show notification
|
|
|
|
this.notifications.showNotification(this.#getToastMessage('duplicated'), {type: 'success'});
|
|
|
|
} catch (error) {
|
|
|
|
this.notifications.showAPIError(error, {key: `${this.type}.copy.failed`});
|
|
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2023-04-11 17:37:42 +03:00
|
|
|
async performBulkDestroy() {
|
|
|
|
const filter = this.selectionList.filter;
|
2023-04-14 13:16:15 +03:00
|
|
|
let bulkUpdateUrl = this.ghostPaths.url.api(this.type === 'post' ? 'posts' : 'pages') + `?filter=${encodeURIComponent(filter)}`;
|
2023-04-11 17:37:42 +03:00
|
|
|
return await this.ajax.delete(bulkUpdateUrl);
|
2023-04-07 12:48:14 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
async performBulkEdit(_action, meta = {}) {
|
|
|
|
const filter = this.selectionList.filter;
|
2023-04-14 13:16:15 +03:00
|
|
|
let bulkUpdateUrl = this.ghostPaths.url.api(this.type === 'post' ? 'posts/bulk' : 'pages/bulk') + `?filter=${encodeURIComponent(filter)}`;
|
2023-04-07 12:48:14 +03:00
|
|
|
return await this.ajax.put(bulkUpdateUrl, {
|
|
|
|
data: {
|
|
|
|
bulk: {
|
|
|
|
action: _action,
|
|
|
|
meta
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
2023-05-15 11:30:32 +03:00
|
|
|
async performCopy() {
|
|
|
|
const id = this.selectionList.availableModels[0].id;
|
|
|
|
const copyUrl = this.ghostPaths.url.api(`${this.type === 'post' ? 'posts' : 'pages'}/${id}/copy`) + '?formats=mobiledoc,lexical';
|
|
|
|
return await this.ajax.post(copyUrl);
|
|
|
|
}
|
|
|
|
|
2023-04-07 12:48:14 +03:00
|
|
|
get shouldFeatureSelection() {
|
2023-04-12 16:37:53 +03:00
|
|
|
let featuredCount = 0;
|
|
|
|
for (const m of this.selectionList.availableModels) {
|
|
|
|
if (m.featured) {
|
|
|
|
featuredCount += 1;
|
|
|
|
}
|
2023-04-07 12:48:14 +03:00
|
|
|
}
|
2023-04-12 16:37:53 +03:00
|
|
|
return featuredCount <= this.selectionList.availableModels.length / 2;
|
2023-04-07 12:48:14 +03:00
|
|
|
}
|
|
|
|
|
2023-04-11 09:25:49 +03:00
|
|
|
get canFeatureSelection() {
|
2023-04-12 16:37:53 +03:00
|
|
|
for (const m of this.selectionList.availableModels) {
|
|
|
|
if (m.get('status') !== 'sent') {
|
|
|
|
return true;
|
|
|
|
}
|
2023-04-11 09:25:49 +03:00
|
|
|
}
|
2023-04-12 16:37:53 +03:00
|
|
|
return false;
|
2023-04-12 16:28:09 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
get canUnpublishSelection() {
|
|
|
|
for (const m of this.selectionList.availableModels) {
|
2023-04-13 17:20:58 +03:00
|
|
|
if (m.status === 'published') {
|
2023-04-12 16:28:09 +03:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return false;
|
2023-04-11 09:25:49 +03:00
|
|
|
}
|
2023-05-15 11:30:32 +03:00
|
|
|
|
|
|
|
get canCopySelection() {
|
|
|
|
return this.selectionList.availableModels.length === 1;
|
|
|
|
}
|
2023-04-07 12:48:14 +03:00
|
|
|
}
|