Skip to content

Commit

Permalink
Add settings title action (#4499)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored and pat-s committed Dec 18, 2024
1 parent b3c48b4 commit 81f7b76
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions web/src/components/layout/Settings.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
<template>
<Panel>
<div class="flex flex-col border-b mb-4 pb-4 justify-center dark:border-wp-background-100">
<h1 class="text-xl text-wp-text-100 flex items-center gap-1">
{{ title }}
<DocsLink v-if="docsUrl" :topic="title" :url="docsUrl" />
</h1>
<div class="flex items-center justify-between">
<h1 class="text-xl text-wp-text-100 flex items-center gap-1">
{{ title }}
<DocsLink v-if="docsUrl" :topic="title" :url="docsUrl" />
</h1>
<slot v-if="$slots.titleActions" name="titleActions" />
</div>

<div class="flex flex-wrap gap-x-4 gap-y-2 items-center justify-between">
<p v-if="description" class="text-sm text-wp-text-alt-100">{{ description }}</p>
Expand Down
2 changes: 1 addition & 1 deletion web/src/views/repo/settings/Badge.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<Settings :title="$t('repo.settings.badge.badge')">
<template #headerActions>
<template #titleActions>
<a v-if="badgeUrl" :href="badgeUrl" target="_blank">
<img :src="badgeUrl" />
</a>
Expand Down

0 comments on commit 81f7b76

Please sign in to comment.