Skip to content

Commit

Permalink
pkp/pkp-lib#10779 Help button adjustments WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jardakotesovec committed Jan 15, 2025
1 parent 4a0d293 commit 653dc96
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/HelpButton/HelpButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
@click.prevent
>
<Icon class="h-5 w-5 text-primary" icon="Help" />
<span class="-screenReader">{{ label }}</span>
<span :class="!showLabel ? '-screenReader' : ''">
{{ label || t('help.help') }}
</span>
</button>
</template>

Expand All @@ -27,7 +29,13 @@ export default {
/** A localized label for screen readers. In English this should be "Help". */
label: {
type: String,
required: true,
required: false,
default: null,
},
showLabel: {
type: Boolean,
required: false,
default: false,
},
},
};
Expand Down
2 changes: 2 additions & 0 deletions src/pages/workflow/WorkflowPageOJS.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import WorkflowChangeSubmissionLanguage from './components/publication/WorkflowC
import WorkflowPrimaryBasicMetadata from './components/primary/WorkflowPrimaryBasicMetadata.vue';
import WorkflowSubmissionStatus from './components/primary/WorkflowSubmissionStatus.vue';
import WorkflowPublicationEditDisabled from './components/publication/WorkflowPublicationEditDisabled.vue';
import HelpButton from '@/components/HelpButton/HelpButton.vue';
import {useWorkflowConfigOJS as useWorkflowConfig} from './composables/useWorkflowConfig/useWorkflowConfigOJS';
import {useWorkflowNavigationConfigOJS as useWorkflowNavigationConfig} from './composables/useWorkflowNavigationConfig/useWorkflowNavigationConfigOJS';
Expand Down Expand Up @@ -56,6 +57,7 @@ const Components = markRaw({
WorkflowChangeSubmissionLanguage,
WorkflowSubmissionStatus,
WorkflowPublicationEditDisabled,
HelpButton,
});
const store = useWorkflowStore({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,14 @@ export const WorkflowConfig = {
},
});

items.push({
component: 'HelpButton',
props: {
topic: 'editorial-workflow/submission',
showLabel: true,
},
});

return items;
},

Expand Down

0 comments on commit 653dc96

Please sign in to comment.