Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 63 additions & 4 deletions views/assets/src/components/pro-task-lists/subtask-lists.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
<template>
<div class="pm-pro-single-subtask-lists">
<div class="subtask-title pm-h2">
{{ __( 'Subtasks', 'wedevs-project-manager' ) }}
<span class="pm-pro-badge">{{ __( 'Pro', 'wedevs-project-manager' ) }}</span>
<div class="subtask-header-row">
<div class="subtask-title pm-h2">
{{ __( 'Subtasks', 'wedevs-project-manager' ) }}
<span class="pm-pro-badge">{{ __( 'Pro', 'wedevs-project-manager' ) }}</span>
</div>
<button
type="button"
class="pm-btn pm-btn-ai pm-btn-ai-subtask--preview"
disabled
aria-disabled="true"
>
<svg class="pm-ai-btn-icon" width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
<path d="M12 1L13.5 8.5L21 9.5L13.5 10.5L12 18L10.5 10.5L3 9.5L10.5 8.5L12 1Z" fill="currentColor"/>
<path d="M20 14L20.6 17.2L23.8 18L20.6 18.8L20 22L19.4 18.8L16.2 18L19.4 17.2L20 14Z" fill="currentColor"/>
<path d="M4 14L4.6 17.2L7.8 18L4.6 18.8L4 22L3.4 18.8L0.2 18L3.4 17.2L4 14Z" fill="currentColor"/>
</svg>
{{ __( 'Generate with AI', 'wedevs-project-manager' ) }}
<span class="pm-ai-pro-badge">{{ __( 'Pro', 'wedevs-project-manager' ) }}</span>
</button>
</div>
<ul class="pm-subtsk-sortable">
<li class="subtask-li">
Expand Down Expand Up @@ -41,6 +57,49 @@
.pm-pro-single-subtask-lists {
position: relative;

.subtask-header-row {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 5px;

.subtask-title {
margin: 20px 0 0 0 !important;
}
}

.pm-btn-ai-subtask--preview {
background: #8b5cf6;
color: #fff;
font-size: 13px;
line-height: 1;
display: inline-flex;
align-items: center;
gap: 5px;
border: none;
border-radius: 3px;
padding: 5px 10px;
opacity: 0.6;
cursor: not-allowed;

.pm-ai-btn-icon {
display: inline-block;
vertical-align: middle;
flex-shrink: 0;
}

.pm-ai-pro-badge {
float: none;
background: rgba(255, 255, 255, 0.25);
color: #fff;
font-size: 10px;
padding: 1px 5px;
border-radius: 3px;
vertical-align: middle;
font-weight: 600;
}
}

.pm-ui-state-highlight {
background: none !important;
border: 1px dashed #d7dee2 !important;
Expand Down Expand Up @@ -81,7 +140,7 @@
}
.subtask-title {
color: #000;
margin: 20px 0 5px 0;
margin: 0 0 5px 0;
font-size: 14px;
font-weight: bold;

Expand Down
5 changes: 4 additions & 1 deletion views/assets/src/components/settings/ai-settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<div id="pm_ai_settings" class="group" style="">
<form @submit.prevent="saveAISettings()" method="post" action="options.php">
<h2>{{ __( 'AI Settings', 'wedevs-project-manager') }}</h2>
<p class="description" style="margin-bottom: 16px;">
{{ __( 'Configure the AI provider used for AI-powered features — including automatic project generation and AI subtask generation (Pro).', 'wedevs-project-manager') }}
</p>
<table class="form-table">
<tbody>
<tr>
Expand Down Expand Up @@ -52,7 +55,7 @@
</th>
<td>
<input v-model.number="max_tokens" type="number" class="regular-text" id="ai_max_tokens" name="ai_max_tokens" min="500" max="16384">
<p class="description">{{ __( 'Maximum number of tokens for AI responses (500-16384). Higher values allow more detailed projects but may cost more.', 'wedevs-project-manager') }}</p>
<p class="description">{{ __( 'Maximum number of tokens for AI responses (500-16384). Higher values allow more detailed responses for both project and subtask generation, but may cost more.', 'wedevs-project-manager') }}</p>
</td>
</tr>
<tr>
Expand Down