mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2025-12-06 02:30:47 -08:00
Add right-click context menu for selecting/editing (#128)
This commit is contained in:
parent
d981d4f155
commit
171f4a1649
12 changed files with 87 additions and 47 deletions
|
|
@ -26,6 +26,7 @@
|
|||
"dependencies": {
|
||||
"cheerio": "1.0.0-rc.3",
|
||||
"download": "7.1.0",
|
||||
"electron-context-menu": "0.16.0",
|
||||
"electron-is-dev": "1.1.0",
|
||||
"electron-settings": "3.2.0",
|
||||
"electron-spellchecker": "2.2.1",
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
diff --git a/node_modules/builder-util/out/util.js b/node_modules/builder-util/out/util.js
|
||||
index 8064112..b6e3d81 100644
|
||||
--- a/node_modules/builder-util/out/util.js
|
||||
+++ b/node_modules/builder-util/out/util.js
|
||||
@@ -505,7 +505,7 @@ function isEmptyOrSpaces(s) {
|
||||
}
|
||||
|
||||
function isTokenCharValid(token) {
|
||||
- return /^[\w\/=+-]+$/.test(token);
|
||||
+ return /^[.\w\/=+-]+$/.test(token);
|
||||
}
|
||||
|
||||
function addValue(map, key, value) {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/node_modules/menubar/lib/Menubar.js b/node_modules/menubar/lib/Menubar.js
|
||||
index ee94dbf..63f8dfc 100644
|
||||
index c2cc450..ac90c9b 100644
|
||||
--- a/node_modules/menubar/lib/Menubar.js
|
||||
+++ b/node_modules/menubar/lib/Menubar.js
|
||||
@@ -237,7 +237,10 @@ var Menubar = /** @class */ (function (_super) {
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js b/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
|
||||
index e996530..81fb119 100644
|
||||
index ac57135..b0f8b08 100644
|
||||
--- a/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
|
||||
+++ b/node_modules/react-sortable-hoc/dist/react-sortable-hoc.esm.js
|
||||
@@ -582,7 +582,11 @@ function sortableContainer(WrappedComponent) {
|
||||
@@ -601,7 +601,11 @@ function sortableContainer(WrappedComponent) {
|
||||
distance = _this$props.distance,
|
||||
shouldCancelStart = _this$props.shouldCancelStart;
|
||||
|
||||
|
|
@ -1 +1,5 @@
|
|||
window.mode = 'add-workspace';
|
||||
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
window.mode = 'code-injection';
|
||||
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
window.mode = 'custom-user-agent';
|
||||
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
window.mode = 'edit-workspace';
|
||||
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
|
|
|
|||
|
|
@ -1 +1,5 @@
|
|||
window.mode = 'license-registration';
|
||||
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
contextMenu();
|
||||
|
|
|
|||
|
|
@ -1,16 +1,3 @@
|
|||
const {
|
||||
ContextMenuListener,
|
||||
ContextMenuBuilder,
|
||||
} = require('electron-spellchecker');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
// for copy paste context menu
|
||||
window.onload = () => {
|
||||
window.contextMenuBuilder = new ContextMenuBuilder(
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
);
|
||||
window.contextMenuListener = new ContextMenuListener((info) => {
|
||||
window.contextMenuBuilder.showPopupMenu(info);
|
||||
});
|
||||
};
|
||||
contextMenu();
|
||||
|
|
|
|||
|
|
@ -1,18 +1,5 @@
|
|||
window.mode = 'menubar';
|
||||
|
||||
const {
|
||||
ContextMenuListener,
|
||||
ContextMenuBuilder,
|
||||
} = require('electron-spellchecker');
|
||||
const contextMenu = require('electron-context-menu');
|
||||
|
||||
// for copy paste context menu
|
||||
window.onload = () => {
|
||||
window.contextMenuBuilder = new ContextMenuBuilder(
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
);
|
||||
window.contextMenuListener = new ContextMenuListener((info) => {
|
||||
window.contextMenuBuilder.showPopupMenu(info);
|
||||
});
|
||||
};
|
||||
contextMenu();
|
||||
|
|
|
|||
60
yarn.lock
60
yarn.lock
|
|
@ -3225,6 +3225,11 @@ astral-regex@^1.0.0:
|
|||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
|
||||
integrity sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==
|
||||
|
||||
astral-regex@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
|
||||
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
|
||||
|
||||
async-each@^1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf"
|
||||
|
|
@ -4717,6 +4722,14 @@ cli-cursor@^3.1.0:
|
|||
dependencies:
|
||||
restore-cursor "^3.1.0"
|
||||
|
||||
cli-truncate@^2.0.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7"
|
||||
integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg==
|
||||
dependencies:
|
||||
slice-ansi "^3.0.0"
|
||||
string-width "^4.2.0"
|
||||
|
||||
cli-width@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
|
||||
|
|
@ -5938,6 +5951,24 @@ electron-builder@22.3.2:
|
|||
update-notifier "^4.0.0"
|
||||
yargs "^15.1.0"
|
||||
|
||||
electron-context-menu@0.16.0:
|
||||
version "0.16.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-context-menu/-/electron-context-menu-0.16.0.tgz#4f53b4640e321f536415a625505a908518f5dff7"
|
||||
integrity sha512-lGr1/nRlNGmU8THc0hl2dYEB5bwXJpsi7vCjjsnsNGJKPZZLY8nHY3xvtjdtwKocErvp1h8wUb19moWenzoGPw==
|
||||
dependencies:
|
||||
cli-truncate "^2.0.0"
|
||||
electron-dl "^1.2.0"
|
||||
electron-is-dev "^1.0.1"
|
||||
|
||||
electron-dl@^1.2.0:
|
||||
version "1.14.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-dl/-/electron-dl-1.14.0.tgz#1466f1b945664ca3d784268307c2b935728177bf"
|
||||
integrity sha512-4okyei42a1mLsvLK7hLrIfd20EQzB18nIlLTwBV992aMSmTGLUEFRTmO1MfSslGNrzD8nuPuy1l/VxO8so4lig==
|
||||
dependencies:
|
||||
ext-name "^5.0.0"
|
||||
pupa "^1.0.0"
|
||||
unused-filename "^1.0.0"
|
||||
|
||||
electron-download@^4.1.0:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/electron-download/-/electron-download-4.1.1.tgz#02e69556705cc456e520f9e035556ed5a015ebe8"
|
||||
|
|
@ -5953,7 +5984,7 @@ electron-download@^4.1.0:
|
|||
semver "^5.4.1"
|
||||
sumchecker "^2.0.2"
|
||||
|
||||
electron-is-dev@1.1.0:
|
||||
electron-is-dev@1.1.0, electron-is-dev@^1.0.1:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/electron-is-dev/-/electron-is-dev-1.1.0.tgz#b15a2a600bdc48a51a857d460e05f15b19a2522c"
|
||||
integrity sha512-Z1qA/1oHNowGtSBIcWk0pcLEqYT/j+13xUw/MYOrBUOL4X7VN0i0KCTf5SqyvMPmW5pSPKbo28wkxMxzZ20YnQ==
|
||||
|
|
@ -9798,6 +9829,11 @@ mkdirp@0.5.1, mkdirp@^0.5.1, mkdirp@~0.5.1:
|
|||
dependencies:
|
||||
minimist "0.0.8"
|
||||
|
||||
modify-filename@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/modify-filename/-/modify-filename-1.1.0.tgz#9a2dec83806fbb2d975f22beec859ca26b393aa1"
|
||||
integrity sha1-mi3sg4Bvuy2XXyK+7IWcoms5OqE=
|
||||
|
||||
move-concurrently@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/move-concurrently/-/move-concurrently-1.0.1.tgz#be2c005fda32e0b29af1f05d7c4b33214c701f92"
|
||||
|
|
@ -11637,6 +11673,11 @@ punycode@^2.1.0, punycode@^2.1.1:
|
|||
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec"
|
||||
integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==
|
||||
|
||||
pupa@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pupa/-/pupa-1.0.0.tgz#9a9568a5af7e657b8462a6e9d5328743560ceff6"
|
||||
integrity sha1-mpVopa9+ZXuEYqbp1TKHQ1YM7/Y=
|
||||
|
||||
q@^1.1.2:
|
||||
version "1.5.1"
|
||||
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
|
||||
|
|
@ -12827,6 +12868,15 @@ slice-ansi@^2.1.0:
|
|||
astral-regex "^1.0.0"
|
||||
is-fullwidth-code-point "^2.0.0"
|
||||
|
||||
slice-ansi@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787"
|
||||
integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ==
|
||||
dependencies:
|
||||
ansi-styles "^4.0.0"
|
||||
astral-regex "^2.0.0"
|
||||
is-fullwidth-code-point "^3.0.0"
|
||||
|
||||
snapdragon-node@^2.0.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
|
||||
|
|
@ -13886,6 +13936,14 @@ unset-value@^1.0.0:
|
|||
has-value "^0.3.1"
|
||||
isobject "^3.0.0"
|
||||
|
||||
unused-filename@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unused-filename/-/unused-filename-1.0.0.tgz#d340880f71ae2115ebaa1325bef05cc6684469c6"
|
||||
integrity sha1-00CID3GuIRXrqhMlvvBcxmhEacY=
|
||||
dependencies:
|
||||
modify-filename "^1.1.0"
|
||||
path-exists "^3.0.0"
|
||||
|
||||
upath@^1.1.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue