mirror of
https://github.com/frappe/books.git
synced 2024-11-10 07:40:55 +00:00
feat: add doc link (will be dyn later)
This commit is contained in:
parent
9617030b8c
commit
d7def35dbf
@ -9,8 +9,7 @@
|
||||
</button>
|
||||
</template>
|
||||
<script>
|
||||
import { IPC_MESSAGES } from 'utils/messages';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { openLink } from 'src/utils/ipcCalls';
|
||||
import FeatherIcon from './FeatherIcon.vue';
|
||||
|
||||
export default {
|
||||
@ -23,7 +22,7 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
openHelpLink() {
|
||||
ipcRenderer.send(IPC_MESSAGES.OPEN_EXTERNAL, this.link);
|
||||
openLink(this.link);
|
||||
},
|
||||
},
|
||||
components: { FeatherIcon },
|
||||
|
@ -89,11 +89,25 @@
|
||||
gap-1
|
||||
items-center
|
||||
"
|
||||
@click="() => reportIssue()"
|
||||
@click="$emit('change-db-file')"
|
||||
>
|
||||
<feather-icon name="flag" class="h-4 w-4" />
|
||||
<feather-icon name="database" class="h-4 w-4" />
|
||||
<p>{{ t`Change DB` }}</p>
|
||||
</button>
|
||||
|
||||
<button
|
||||
class="
|
||||
flex
|
||||
text-sm text-gray-600
|
||||
hover:text-gray-800
|
||||
gap-1
|
||||
items-center
|
||||
"
|
||||
@click="openDocumentation"
|
||||
>
|
||||
<feather-icon name="help-circle" class="h-4 w-4" />
|
||||
<p>
|
||||
{{ t`Report Issue` }}
|
||||
{{ t`Documentation` }}
|
||||
</p>
|
||||
</button>
|
||||
|
||||
@ -105,11 +119,14 @@
|
||||
gap-1
|
||||
items-center
|
||||
"
|
||||
@click="$emit('change-db-file')"
|
||||
@click="() => reportIssue()"
|
||||
>
|
||||
<feather-icon name="database" class="h-4 w-4" />
|
||||
<p>{{ t`Change DB` }}</p>
|
||||
<feather-icon name="flag" class="h-4 w-4" />
|
||||
<p>
|
||||
{{ t`Report Issue` }}
|
||||
</p>
|
||||
</button>
|
||||
|
||||
<p
|
||||
v-if="fyo.store.isDevelopment"
|
||||
class="text-xs text-gray-500 select-none"
|
||||
@ -123,6 +140,7 @@
|
||||
import Button from 'src/components/Button.vue';
|
||||
import { reportIssue } from 'src/errorHandling';
|
||||
import { fyo } from 'src/initFyo';
|
||||
import { openLink } from 'src/utils/ipcCalls';
|
||||
import { getSidebarConfig } from 'src/utils/sidebarConfig';
|
||||
import { routeTo } from 'src/utils/ui';
|
||||
import router from '../router';
|
||||
@ -159,6 +177,9 @@ export default {
|
||||
methods: {
|
||||
routeTo,
|
||||
reportIssue,
|
||||
openDocumentation() {
|
||||
openLink('https://docs.frappebooks.com/');
|
||||
},
|
||||
setActiveGroup() {
|
||||
const { fullPath } = this.$router.currentRoute.value;
|
||||
const fallBackGroup = this.activeGroup;
|
||||
|
@ -70,13 +70,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ipcRenderer } from 'electron';
|
||||
import Button from 'src/components/Button';
|
||||
import Icon from 'src/components/Icon';
|
||||
import PageHeader from 'src/components/PageHeader';
|
||||
import { fyo } from 'src/initFyo';
|
||||
import { getGetStartedConfig } from 'src/utils/getStartedConfig';
|
||||
import { IPC_MESSAGES } from 'utils/messages';
|
||||
import { openLink } from 'src/utils/ipcCalls';
|
||||
import { h } from 'vue';
|
||||
|
||||
export default {
|
||||
@ -102,7 +101,7 @@ export default {
|
||||
methods: {
|
||||
async handleDocumentation({ key, documentation }) {
|
||||
if (documentation) {
|
||||
ipcRenderer.send(IPC_MESSAGES.OPEN_EXTERNAL, documentation);
|
||||
openLink(documentation);
|
||||
}
|
||||
|
||||
switch (key) {
|
||||
|
@ -91,15 +91,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { ipcRenderer } from 'electron';
|
||||
import FormControl from 'src/components/Controls/FormControl.vue';
|
||||
import LanguageSelector from 'src/components/Controls/LanguageSelector.vue';
|
||||
import TwoColumnForm from 'src/components/TwoColumnForm.vue';
|
||||
import { fyo } from 'src/initFyo';
|
||||
import { getErrorMessage } from 'src/utils';
|
||||
import { openLink } from 'src/utils/ipcCalls';
|
||||
import { getSetupWizardDoc } from 'src/utils/misc';
|
||||
import { showMessageDialog } from 'src/utils/ui';
|
||||
import { IPC_MESSAGES } from 'utils/messages';
|
||||
import Slide from './Slide.vue';
|
||||
|
||||
export default {
|
||||
@ -141,8 +140,7 @@ export default {
|
||||
return this.doc.schema?.fields.find((f) => f.fieldname === fieldname);
|
||||
},
|
||||
openContributingTranslations() {
|
||||
ipcRenderer.send(
|
||||
IPC_MESSAGES.OPEN_EXTERNAL,
|
||||
openLink(
|
||||
'https://github.com/frappe/books/wiki/Contributing-Translations'
|
||||
);
|
||||
},
|
||||
|
@ -5,7 +5,6 @@ import { ipcRenderer } from 'electron';
|
||||
import { t } from 'fyo';
|
||||
import { IPC_ACTIONS, IPC_MESSAGES } from 'utils/messages';
|
||||
import { setLanguageMap } from './language';
|
||||
import { WindowAction } from './types';
|
||||
import { showToast } from './ui';
|
||||
|
||||
export async function checkForUpdates() {
|
||||
@ -13,6 +12,10 @@ export async function checkForUpdates() {
|
||||
await setLanguageMap();
|
||||
}
|
||||
|
||||
export async function openLink(link: string) {
|
||||
ipcRenderer.send(IPC_MESSAGES.OPEN_EXTERNAL, link);
|
||||
}
|
||||
|
||||
export async function deleteDb(filePath: string) {
|
||||
await ipcRenderer.invoke(IPC_ACTIONS.DELETE_FILE, filePath);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user