-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Copy category from other category or from activity #4823
Conversation
⛔ Feature branch deployment currently inactive.If the PR is still open, you can add the |
0076dec
to
b3b30a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool functionality
<v-btn v-show="clipboardPermission === 'prompt'" v-on="on"> | ||
<v-icon left>mdi-information-outline</v-icon> | ||
{{ | ||
$tc('components.campAdmin.dialogCategoryCreate.copyPasteCategoryOrActivity') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 81a5694
21db621
to
e644613
Compare
@@ -23,10 +104,17 @@ import { categoryRoute } from '@/router.js' | |||
import DialogForm from '@/components/dialog/DialogForm.vue' | |||
import DialogBase from '@/components/dialog/DialogBase.vue' | |||
import DialogCategoryForm from './DialogCategoryForm.vue' | |||
import PopoverPrompt from '../prompt/PopoverPrompt.vue' | |||
import router from '../../router.js' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be an absolute import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7fe7f5f
) | ||
}) | ||
.then(async (url) => { | ||
this.copyActivitySource = await ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this better?
i think 2 lines would make this easier to read
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 7fe7f5f
@@ -272,7 +272,7 @@ export default { | |||
async copyUrlToClipboard() { | |||
try { | |||
const res = await navigator.permissions.query({ name: 'clipboard-read' }) | |||
if (res.state == 'prompt') { | |||
if (res.state === 'prompt') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a lint rule for that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be good.
@@ -16,14 +16,24 @@ | |||
|
|||
<template #title-actions> | |||
<TogglePaperSize v-model="isPaperDisplaySize" /> | |||
<v-menu v-if="isManager" offset-y> | |||
<v-menu offset-y> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, like this you can copy categories from camps where you are not a manager, nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly. Same as for the activities which we already allow to copy. Sharing is caring.
7fe7f5f
to
fee746c
Compare
fee746c
to
ccfdcfc
Compare
Similar to #3993, but for pasting and duplicating categories. A pasted category can be based on another category (from the same or a different camp), or on an activity (from the same or a different camp).
Backend implementation is hilariously simple with the system we already have set up, props to @pmattmann!
I did this because it is a requested feature (with medium prio), and also I felt the need myself when setting up a camp recently.