Skip to content

Commit

Permalink
Merge branch 'refs/heads/chrome-extension' into firefox-extension
Browse files Browse the repository at this point in the history
# Conflicts:
#	src-bex/manifest.json
  • Loading branch information
evandor committed Apr 10, 2024
2 parents 30ecd26 + ab852ef commit 147037e
Show file tree
Hide file tree
Showing 10 changed files with 65 additions and 21 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/electron-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,24 @@ jobs:
run: |
yarn install
npm run "build electron (publish)"
- uses: AButler/[email protected]
with:
files: "dist/electron/Packaged/*;"
repo-token: ${{ secrets.GITHUB_TOKEN }}
# - name: Create Release
# id: create_release
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# Changes in this Release
# - First Change
# - Second Change
# draft: true
# prerelease: true

# - name: Install Node.js, NPM and Yarn
# uses: actions/setup-node@v1
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ on:
branches:
- 'chrome-extension'
jobs:
sync-branch-firefox:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master

- name: Merge chrome-extension -> firefox-extension
uses: devmasx/[email protected]
with:
type: now
from_branch: chrome-extension
target_branch: firefox-extension
github_token: ${{ secrets.GITHUB_TOKEN }}

sync-branch:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "tabsets.net",
"version": "0.4.12",
"description": "Use the tabsets.net browser extension to safely keep track all your tabs and links in the Side Panel, locally or in the cloud",
"productName": "Tabsets.net - Better Bookmarks",
"productName": "Tabsets.net",
"author": "evandor <[email protected]>",
"private": true,
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions src-bex/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,12 @@
"activeTab",
"alarms",
"scripting",
"sidePanel",
"contextMenus",
"bookmarks"
],
"optional_permissions": [
"pageCapture",
"notifications",
"webRequest"
],
Expand Down
2 changes: 1 addition & 1 deletion src/boot/constants.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {boot} from 'quasar/wrappers'

const INDEX_DB_VERSION = 21
const INDEX_DB_VERSION = 22

const CLEANUP_PERIOD_IN_MINUTES = 10 // in prod: 10
const EXPIRE_DATA_PERIOD_IN_MINUTES = 60 // in prod: 60
Expand Down
6 changes: 3 additions & 3 deletions src/domain/commands/GrantPermissionCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ export class GrantPermissionCommand implements Command<boolean> {
// usePermissionsStore().activateFeature('history')
} else if ("notifications" === this.permission) {
usePermissionsStore().activateFeature('notifications')
} else if ("contextMenus" === this.permission) {
//usePermissionsStore().grantPermission("notifications")
ChromeApi.buildContextMenu()
// } else if ("contextMenus" === this.permission) {
// //usePermissionsStore().grantPermission("notifications")
// ChromeApi.buildContextMenu()
}
return new ExecutionResult(
granted,
Expand Down
2 changes: 1 addition & 1 deletion src/models/AppFeature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export enum FeatureIdent {
//CATEGORIZATION = "CATEGORIZATION",
NOTIFICATIONS = "NOTIFICATIONS",
ANNOTATIONS = "ANNOTATIONS",
CONTEXT_MENUS = "CONTEXT_MENUS",
//CONTEXT_MENUS = "CONTEXT_MENUS",
ARCHIVE_TABSET = "ARCHIVE_TABSET",
//WINDOW_MANAGEMENT = "WINDOW_MANAGEMENT",
COLOR_TAGS = "COLOR_TAGS",
Expand Down
10 changes: 5 additions & 5 deletions src/models/AppFeatures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class AppFeatures {
new AppFeature(FeatureIdent.NOTES, FeatureType.EXPERIMENTAL, 'Activate Notes', 'o_note', ['all']),

new AppFeature(FeatureIdent.WEBSITE_CLIP, FeatureType.EXPERIMENTAL, 'Create an image clip from a website and store it', 'filter_center_focus', ['bex'])
.setActivateCommands([new GrantPermissionCommand('notifications'),new GrantPermissionCommand('contextMenus')]),
.setActivateCommands([new GrantPermissionCommand('notifications')]),

new AppFeature(FeatureIdent.STANDALONE_APP, FeatureType.RECOMMENDED, 'Standalone App', 'o_open_in_new', ['bex']),

Expand All @@ -54,11 +54,11 @@ export class AppFeatures {
.setActivateCommands([new GrantPermissionCommand('notifications')])
.setDeactivateCommands([new RevokePermissionCommand('notifications')]),

new AppFeature(FeatureIdent.ANNOTATIONS, FeatureType.EXPERIMENTAL, 'Annotate Websites', 'o_auto_awesome', ['bex'])
.setActivateCommands([new GrantPermissionCommand('contextMenus')]),
new AppFeature(FeatureIdent.ANNOTATIONS, FeatureType.EXPERIMENTAL, 'Annotate Websites', 'o_auto_awesome', ['bex']),
// .setActivateCommands([new GrantPermissionCommand('contextMenus')]),

new AppFeature(FeatureIdent.CONTEXT_MENUS, FeatureType.OPTIONAL, 'Use Tabsets Context Menu', 'o_list', ['all'])
.setActivateCommands([new GrantPermissionCommand('contextMenus')]),
// new AppFeature(FeatureIdent.CONTEXT_MENUS, FeatureType.OPTIONAL, 'Use Tabsets Context Menu', 'o_list', ['all'])
// .setActivateCommands([new GrantPermissionCommand('contextMenus')]),


new AppFeature(FeatureIdent.ARCHIVE_TABSET, FeatureType.OPTIONAL, 'Archive Tabsets', 'o_inventory_2', ['all']),
Expand Down
10 changes: 5 additions & 5 deletions src/pages/FeaturesPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -445,11 +445,11 @@ text.set(FeatureIdent.TABSETS_SHARING.toLowerCase(), {
needsAccount: true,
permissions: []
})
text.set(FeatureIdent.CONTEXT_MENUS.toLowerCase(), {
name: 'Tabsets Context Menus on Websites',
description: 'Integrate more deeply with Tabsets by using context menus. This might be available automatically when using some other features.',
permissions: []
})
// text.set(FeatureIdent.CONTEXT_MENUS.toLowerCase(), {
// name: 'Tabsets Context Menus on Websites',
// description: 'Integrate more deeply with Tabsets by using context menus. This might be available automatically when using some other features.',
// permissions: []
// })
text.set(FeatureIdent.ENTITY_MANAGER.toLowerCase(), {
name: 'Entitiy Manager',
description: 'Define your own entities to manage',
Expand Down
20 changes: 15 additions & 5 deletions src/services/ChromeApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class ChromeApi {
if (chrome && chrome.contextMenus) {
chrome.contextMenus.removeAll(
() => {
chrome.contextMenus.create({id: 'tabset_extension', title: 'Tabset Extension', contexts: ['all']},
chrome.contextMenus.create({id: 'tabset_extension', title: 'Tabsets Extension', contexts: ['page']},
() => {
// chrome.contextMenus.create({
// id: 'open_tabsets_page',
Expand Down Expand Up @@ -187,8 +187,8 @@ class ChromeApi {
chrome.contextMenus.create({
id: 'save_to_currentTS',
parentId: 'tabset_extension',
title: 'Save to current Tabset',
contexts: ['all']
title: 'Save to current Tabset (' + useTabsStore().currentTabsetName + ')',
contexts: ['page']
})

//console.log("context menu", useWindowsStore().currentChromeWindows)
Expand All @@ -214,10 +214,20 @@ class ChromeApi {
}
console.debug(` > context menu: save_as_tabset for ${tabsStore.tabsets.size} tabset(s)`)
const allTabsets = [...tabsStore.tabsets.values()] as Tabset[]

if (allTabsets.length > 0) {
chrome.contextMenus.create({
id: 'separator',
parentId: 'tabset_extension',
type: 'separator',
contexts: ['page']
})
}

if (allTabsets.length > 15) {
const result = _(allTabsets)
.groupBy(o => (o.name && o.name.length > 0) ? o.name[0].toUpperCase() : ' ')
.map((tabsets, firstLetter) => ({ firstLetter, tabsets }))
.map((tabsets, firstLetter) => ({firstLetter, tabsets}))
.sortBy(r => r.firstLetter)
.value();

Expand All @@ -230,7 +240,7 @@ class ChromeApi {
})

_.forEach(_.sortBy(r.tabsets, ['name']), (ts: Tabset) => {
this.createSubmenu(ts,'save_as_tab_folder|' + r.firstLetter, ts.name)
this.createSubmenu(ts, 'save_as_tab_folder|' + r.firstLetter, ts.name)
})

})
Expand Down

0 comments on commit 147037e

Please sign in to comment.