Răsfoiți Sursa

Merge remote-tracking branch 'upstream/master' into feat/vue3

Gerald 3 ani în urmă
părinte
comite
f985d3c57b

+ 7 - 0
.babelrc.js

@@ -1,3 +1,10 @@
+const path = require('path');
+const { defaultOptions } = require('@gera2ld/plaid/util');
+
+defaultOptions.alias = {
+  '@': path.resolve('src'),
+};
+
 module.exports = {
   extends: require.resolve('@gera2ld/plaid/config/babelrc'),
   presets: [

+ 1 - 1
package.json

@@ -79,5 +79,5 @@
     ],
     "testEnvironment": "./test/mock/env.js"
   },
-  "beta": 2
+  "beta": 3
 }

+ 6 - 1
scripts/plaid.conf.js

@@ -1,4 +1,9 @@
-const { isProd } = require('@gera2ld/plaid/util');
+const path = require('path');
+const { defaultOptions, isProd } = require('@gera2ld/plaid/util');
+
+defaultOptions.alias = {
+  '@': path.resolve('src'),
+};
 
 /**
  * For each entry, `key` is the chunk name, `value` has following properties:

+ 1 - 1
src/background/utils/patch-db.js

@@ -1,5 +1,5 @@
-import { parseMeta } from './script';
 import storage from '@/common/storage';
+import { parseMeta } from './script';
 
 export default () => new Promise((resolve, reject) => {
   console.info('Upgrade database...');

+ 1 - 3
src/options/utils/dragging.js

@@ -6,7 +6,6 @@ const MAX_SCROLL_SPEED = 20;
 const ONE_FRAME_MS = 16;
 // touch-and-hold duration in ms before recognizing dragstart (needed to allow fling-scrolling)
 const LONGPRESS_DELAY = 500;
-const DROP_EVENT_RELAY = 'VM-drop-event-relay';
 
 const isTouch = 'ontouchstart' in document;
 const eventNames = isTouch
@@ -44,7 +43,6 @@ export default function toggleDragging(state) {
   parent = this.$refs.scriptList;
   parentOnDrop = this.moveScript;
   parent::(state ? on : off)(eventNames.start, isTouch ? onTouchStart : onDragStart);
-  parent::(state ? on : off)(DROP_EVENT_RELAY, onDrop);
 }
 
 function onDrop() {
@@ -129,7 +127,7 @@ function onDragMouseUp() {
   dragged.remove();
   if (isTouch) noScroll.remove();
   original.classList.remove('dragging-placeholder');
-  original.dispatchEvent(new Event(DROP_EVENT_RELAY));
+  onDrop();
 }
 
 function animate(hoveredIndex) {

+ 1 - 1
src/options/views/edit/index.vue

@@ -68,12 +68,12 @@ import { deepCopy, deepEqual, objectPick } from '@/common/object';
 import { showConfirmation, showMessage } from '@/common/ui';
 import { keyboardService } from '@/common/keyboard';
 import VmCode from '@/common/ui/code';
+import VmExternals from '@/common/ui/externals';
 import options from '@/common/options';
 import { route, getUnloadSentry } from '@/common/router';
 import { store } from '../../utils';
 import VmSettings from './settings';
 import VmValues from './values';
-import VmExternals from '@/common/ui/externals';
 import VmHelp from './help';
 
 const CUSTOM_PROPS = {