Browse Source

fix: set package as external

Ahmad Kholid 2 years ago
parent
commit
4e00cfcfe5
3 changed files with 9 additions and 3 deletions
  1. 5 3
      src/components/block/BlockPackage.vue
  2. 1 0
      src/lib/vueI18n.js
  3. 3 0
      src/newtab/pages/Workflows.vue

+ 5 - 3
src/components/block/BlockPackage.vue

@@ -121,9 +121,11 @@ const state = shallowReactive({
 });
 });
 
 
 function installPackage() {
 function installPackage() {
-  packageStore.insert({ ...props.data }, false).then(() => {
-    state.isInstalled = true;
-  });
+  packageStore
+    .insert({ ...props.data, isExternal: Boolean(props.data.author) }, false)
+    .then(() => {
+      state.isInstalled = true;
+    });
 }
 }
 function removeConnections(type, old, newEdges) {
 function removeConnections(type, old, newEdges) {
   const removedEdges = [];
   const removedEdges = [];

+ 1 - 0
src/lib/vueI18n.js

@@ -46,6 +46,7 @@ export async function loadLocaleMessages(locale, location) {
   dayjs.locale(locale);
   dayjs.locale(locale);
 
 
   await importLocale('common.json');
   await importLocale('common.json');
+  await importLocale('popup.json', true);
   await importLocale(`${location}.json`, true);
   await importLocale(`${location}.json`, true);
   await importLocale('blocks.json', true);
   await importLocale('blocks.json', true);
 
 

+ 3 - 0
src/newtab/pages/Workflows.vue

@@ -28,6 +28,9 @@
               >
               >
                 {{ t('workflow.import') }}
                 {{ t('workflow.import') }}
               </ui-list-item>
               </ui-list-item>
+              <ui-list-item class="cursor-pointer">
+                {{ t('home.record.title') }}
+              </ui-list-item>
               <ui-list-item
               <ui-list-item
                 v-close-popover
                 v-close-popover
                 class="cursor-pointer"
                 class="cursor-pointer"