mirror of
https://github.com/frappe/books.git
synced 2024-11-09 23:30:56 +00:00
ux: add Cancel in Setup Wizard
This commit is contained in:
parent
2708fb50b6
commit
1eb9431767
@ -16,6 +16,7 @@
|
||||
<SetupWizard
|
||||
v-if="activeScreen === 'SetupWizard'"
|
||||
@setup-complete="showSetupWizardOrDesk(true)"
|
||||
@setup-canceled="setupCanceled"
|
||||
/>
|
||||
<portal-target name="popovers" multiple></portal-target>
|
||||
</div>
|
||||
@ -33,7 +34,7 @@ import config from '@/config';
|
||||
import { IPC_MESSAGES, IPC_ACTIONS } from '@/messages';
|
||||
import { connectToLocalDatabase, purgeCache } from '@/initialization';
|
||||
import { routeTo, showErrorDialog } from './utils';
|
||||
import { DB_CONN_FAILURE } from './messages';
|
||||
import fs from 'fs/promises';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@ -118,6 +119,11 @@ export default {
|
||||
purgeCache(true);
|
||||
this.activeScreen = 'DatabaseSelector';
|
||||
},
|
||||
async setupCanceled() {
|
||||
const filePath = config.get('lastSelectedFilePath')
|
||||
await fs.unlink(filePath)
|
||||
this.changeDbFile()
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -51,7 +51,8 @@
|
||||
</div>
|
||||
<TwoColumnForm :fields="fields" :doc="doc" />
|
||||
</div>
|
||||
<div class="flex justify-end px-8 mt-5 window-no-drag">
|
||||
<div class="flex justify-between px-8 mt-5 window-no-drag">
|
||||
<Button class="text-sm text-grey-900" @click="$emit('setup-canceled')">Cancel</Button>
|
||||
<Button
|
||||
@click="submit"
|
||||
type="primary"
|
||||
@ -175,7 +176,7 @@ export default {
|
||||
return this.meta.getQuickEditFields();
|
||||
},
|
||||
buttonText() {
|
||||
return this.loading ? this._('Setting Up...') : this._('Next');
|
||||
return this.loading ? this._('Setting Up...') : this._('Submit');
|
||||
},
|
||||
},
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user