Skip to content

Commit

Permalink
feat: add reload db (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonreshetov committed Sep 29, 2023
1 parent c863e56 commit d6ff713
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/services/i18n/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"moveStorage": "Move Storage",
"openStorage": "Open Storage",
"newStorage": "New Storage",
"reloadStorage": "Reload Storage",
"fromMassCodeV1": "From massCode v1.0",
"fromSnippetsLab": "From SnippetsLab",
"confirm": "Confirm",
Expand Down
1 change: 1 addition & 0 deletions src/main/services/i18n/locales/ru/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"moveStorage": "Переместить",
"openStorage": "Открыть",
"newStorage": "Создать новое",
"reloadStorage": "Перезагрузить",
"fromMassCodeV1": "Из massCode v1.0",
"fromSnippetsLab": "Из SnippetsLab",
"confirm": "Подтвердить",
Expand Down
8 changes: 8 additions & 0 deletions src/renderer/components/preferences/StoragePreferences.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
<AppButton @click="onClickNew">
{{ i18n.t('button.newStorage') }}
</AppButton>
<AppButton @click="onClickReload">
{{ i18n.t('button.reloadStorage') }}
</AppButton>
</template>
<template #desc>
{{ i18n.t('special:description.storage') }}
Expand Down Expand Up @@ -210,6 +213,11 @@ const resetStore = () => {
snippetStore.$reset()
folderStore.$reset()
}
const onClickReload = () => {
ipc.invoke('main:restart-api', {})
snippetStore.getSnippets()
}
</script>

<style lang="scss" scoped></style>

0 comments on commit d6ff713

Please sign in to comment.