mirror of
https://github.com/frappe/books.git
synced 2025-02-11 08:28:47 +00:00
fix(ux): persistent back button
This commit is contained in:
parent
a200753063
commit
8e6aab2c02
@ -1,10 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<a
|
<a
|
||||||
class="cursor-pointer font-semibold flex items-center"
|
class="
|
||||||
|
cursor-pointer
|
||||||
|
font-semibold
|
||||||
|
flex
|
||||||
|
items-center
|
||||||
|
bg-gray-100
|
||||||
|
px-3
|
||||||
|
rounded-md
|
||||||
|
"
|
||||||
@click="$router.back()"
|
@click="$router.back()"
|
||||||
>
|
>
|
||||||
<feather-icon name="chevron-left" class="w-5 h-5" />
|
<feather-icon name="chevron-left" class="w-4 h-4" />
|
||||||
<span class="ml-1">{{ t`Back` }}</span>
|
|
||||||
</a>
|
</a>
|
||||||
</template>
|
</template>
|
||||||
<script></script>
|
<script></script>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col bg-gray-25">
|
<div class="flex flex-col bg-gray-25">
|
||||||
<!-- Page Header (Title, Buttons, etc) -->
|
<!-- Page Header (Title, Buttons, etc) -->
|
||||||
<PageHeader :backLink="backLink" :title="title" :border="false">
|
<PageHeader :title="title" :border="false">
|
||||||
<slot name="header" />
|
<slot name="header" />
|
||||||
</PageHeader>
|
</PageHeader>
|
||||||
|
|
||||||
@ -28,7 +28,6 @@ import PageHeader from './PageHeader.vue';
|
|||||||
export default {
|
export default {
|
||||||
components: { PageHeader },
|
components: { PageHeader },
|
||||||
props: {
|
props: {
|
||||||
backLink: { type: Boolean, default: false },
|
|
||||||
title: { type: String, default: '' },
|
title: { type: String, default: '' },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
"
|
"
|
||||||
:class="border ? 'border-b' : ''"
|
:class="border ? 'border-b' : ''"
|
||||||
>
|
>
|
||||||
<h1 class="text-xl font-semibold select-none" v-if="title && !backLink">
|
<h1 class="text-xl font-semibold select-none" v-if="title">
|
||||||
{{ title }}
|
{{ title }}
|
||||||
</h1>
|
</h1>
|
||||||
<BackLink v-if="backLink" class="window-no-drag" />
|
<div class="flex items-stretch window-no-drag gap-2 ml-auto">
|
||||||
<div class="flex items-stretch window-no-drag gap-2">
|
|
||||||
<slot />
|
<slot />
|
||||||
|
<BackLink v-if="backLink" class="window-no-drag" />
|
||||||
<SearchBar v-if="!hideSearch" />
|
<SearchBar v-if="!hideSearch" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -28,7 +28,7 @@ import SearchBar from './SearchBar.vue';
|
|||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
title: { type: String, default: '' },
|
title: { type: String, default: '' },
|
||||||
backLink: { type: Boolean, default: false },
|
backLink: { type: Boolean, default: true },
|
||||||
hideSearch: { type: Boolean, default: false },
|
hideSearch: { type: Boolean, default: false },
|
||||||
border: { type: Boolean, default: true },
|
border: { type: Boolean, default: true },
|
||||||
},
|
},
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<FormContainer :backLink="true">
|
<FormContainer>
|
||||||
<!-- Page Header (Title, Buttons, etc) -->
|
<!-- Page Header (Title, Buttons, etc) -->
|
||||||
<template #header v-if="doc">
|
<template #header v-if="doc">
|
||||||
<StatusBadge :status="status" />
|
<StatusBadge :status="status" />
|
||||||
@ -194,7 +194,7 @@ docsPath,
|
|||||||
getActionsForDocument,
|
getActionsForDocument,
|
||||||
openSettings,
|
openSettings,
|
||||||
routeTo,
|
routeTo,
|
||||||
showMessageDialog
|
showMessageDialog,
|
||||||
} from 'src/utils/ui';
|
} from 'src/utils/ui';
|
||||||
import { handleErrorWithDialog } from '../errorHandling';
|
import { handleErrorWithDialog } from '../errorHandling';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<FormContainer :backLink="true">
|
<FormContainer>
|
||||||
<!-- Page Header (Title, Buttons, etc) -->
|
<!-- Page Header (Title, Buttons, etc) -->
|
||||||
<template #header v-if="doc">
|
<template #header v-if="doc">
|
||||||
<StatusBadge :status="status" />
|
<StatusBadge :status="status" />
|
||||||
@ -177,7 +177,7 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
activated() {
|
activated() {
|
||||||
docsPath.value = docsPathMap.JournalEntry
|
docsPath.value = docsPathMap.JournalEntry;
|
||||||
},
|
},
|
||||||
deactivated() {
|
deactivated() {
|
||||||
docsPath.value = '';
|
docsPath.value = '';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<div class="flex flex-col flex-1 bg-gray-25">
|
<div class="flex flex-col flex-1 bg-gray-25">
|
||||||
<PageHeader :backLink="true" class="z-10" :border="false">
|
<PageHeader class="z-10" :border="false">
|
||||||
<Button
|
<Button
|
||||||
class="text-gray-900 text-xs"
|
class="text-gray-900 text-xs"
|
||||||
@click="showCustomiser = !showCustomiser"
|
@click="showCustomiser = !showCustomiser"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user