Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
evandor committed Dec 3, 2024
1 parent fc56903 commit 34caeb4
Show file tree
Hide file tree
Showing 35 changed files with 58 additions and 304 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {useRoute, useRouter} from "vue-router";
import {useLogger} from "src/services/Logger";
import {useSettingsStore} from "stores/settingsStore";
import {useAppStore} from "stores/appStore";
import {usePermissionsStore} from "stores/usePermissionsStore";
import {usePermissionsStore} from "src/core/stores/usePermissionsStore";
const $q = useQuasar()
const router = useRouter()
Expand Down
3 changes: 1 addition & 2 deletions src/app/listeners/BrowserListeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {Tab} from "src/tabsets/models/Tab";
import {useTabsetService} from "src/tabsets/services/TabsetService2";
import {Extractor, Extractors, ExtractorType} from "src/core/config/Extractors";
import {useUtils} from "src/core/services/Utils";
import {Suggestion, SuggestionState, SuggestionType} from "src/suggestions/models/Suggestion";
import {SuggestionState} from "src/suggestions/models/Suggestion";
import {useSuggestionsStore} from "src/suggestions/stores/suggestionsStore";
import {useTabsStore2} from "src/tabsets/stores/tabsStore2";
import {useTabsetsStore} from "src/tabsets/stores/tabsetsStore";
Expand All @@ -24,7 +24,6 @@ import {ContentItem} from "src/content/models/ContentItem";

const {
saveText,
saveLinksFor,
addToTabsetId
} = useTabsetService()

Expand Down
14 changes: 7 additions & 7 deletions src/app/models/AppFeatures.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import _ from "lodash"
import {Feature} from "src/features/models/Feature";
import {FeatureIdent, FeatureType} from "src/app/models/FeatureIdent";
import {GrantPermissionCommand} from "src/domain/commands/GrantPermissionCommand";
import {RevokePermissionCommand} from "src/domain/commands/RevokePermissionCommand";
import {GrantPermissionCommand} from "src/core/domain/commands/GrantPermissionCommand";
import {RevokePermissionCommand} from "src/core/domain/commands/RevokePermissionCommand";

export class AppFeatures {
features: Feature[] = [
Expand Down Expand Up @@ -116,8 +116,8 @@ export class AppFeatures {
'Browser Notifications',
'Allow Tabsets to send Notifications via your Browser. Recommended.',
'o_notifications', '', ['all']),
// .setActivateCommands([new GrantPermissionCommand('notifications')])
// .setDeactivateCommands([ne0w RevokePermissionCommand('notifications')]),
// .setActivateCommands([new GrantPermissionCommand('notifications')])
// .setDeactivateCommands([ne0w RevokePermissionCommand('notifications')]),

new Feature(FeatureIdent.ANNOTATIONS, FeatureType.DISABLED,
'Annotate Websites',
Expand Down Expand Up @@ -152,7 +152,7 @@ export class AppFeatures {
'Chrome Tab Groups',
'Utilize Chrome Tab Groups',
'o_view_list', '', ['chrome_bex']),
// .setActivateCommands([new GrantPermissionCommand('tabGroups')]),
// .setActivateCommands([new GrantPermissionCommand('tabGroups')]),

new Feature(FeatureIdent.AUTO_TAB_SWITCHER, FeatureType.EXPERIMENTAL,
'Auto Tab Switcher',
Expand All @@ -167,8 +167,8 @@ export class AppFeatures {
new Feature(FeatureIdent.WEBSITE_CLIP, FeatureType.EXPERIMENTAL,
'Website Clip',
'Create an image clip from a website and store it',
'filter_center_focus', '', ['bex']),
// .setActivateCommands([new GrantPermissionCommand('notifications')]),
'filter_center_focus', '', ['bex'])
.setActivateCommands([new GrantPermissionCommand('notifications')]),

new Feature(FeatureIdent.DYNAMIC_TABSET, FeatureType.EXPERIMENTAL,
'Dynamic Tabset',
Expand Down
34 changes: 17 additions & 17 deletions src/components/DrawerRight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
dense
maxlength="9"
v-model="scope.value"
@update:model-value="val => setFilter2( val)"
@update:model-value="val => setFilter2( val ? val.toString() : '')"
hint="Filter open Tabs"
@keyup.enter="scope.set">
<template v-slot:after>
Expand All @@ -58,32 +58,32 @@

<div class="row greyBorderTop"></div>

<!-- <UnassignedAndOpenTabs v-if="tab === DrawerTabs.UNASSIGNED_TABS"/>-->
<!-- <UnassignedAndOpenTabs v-if="tab === DrawerTabs.UNASSIGNED_TABS"/>-->
<OpenTabsView v-if="tab === DrawerTabs.OPEN_TABS"/>

<BookmarksTree v-else-if="tab === DrawerTabs.BOOKMARKS"
:nodes="showOnlyFolders ? useBookmarksStore().nonLeafNodes : useBookmarksStore().bookmarksNodes2"
:show-only-folders="showOnlyFolders"
@toggle-show-only-folders="toggleShowOnlyFolders()"
:in-side-panel="true"/>
:nodes="showOnlyFolders ? useBookmarksStore().nonLeafNodes : useBookmarksStore().bookmarksNodes2"
:show-only-folders="showOnlyFolders"
@toggle-show-only-folders="toggleShowOnlyFolders()"
:in-side-panel="true"/>

<!-- <OpenTabs v-else-if="tab === DrawerTabs.OPEN_TABS" :filter="filter"/>-->
<!-- <UnassignedTabs v-else-if="tab === DrawerTabs.UNASSIGNED_TABS" :filter="filter"/>-->
<ByDomainList v-else-if="tab === DrawerTabs.GROUP_BY_HOST_TABS"/>
<!-- <SavedTabs v-else-if="tab === DrawerTabs.SAVED_TABS"/>-->
<!-- <SavedPdfs v-else-if="tab === DrawerTabs.SAVED_TABS_AS_PDF"/>-->
<!-- <TabsetAsSidebar v-else-if="tab === DrawerTabs.SIDEBAR"/>-->
<!-- <NewTabUrls v-else-if="tab === DrawerTabs.NEW_TAB_URLS"/>-->
<!-- <RssTabs v-else-if="tab === DrawerTabs.RSS"/>-->
<!-- <SavedTabs v-else-if="tab === DrawerTabs.SAVED_TABS"/>-->
<!-- <SavedPdfs v-else-if="tab === DrawerTabs.SAVED_TABS_AS_PDF"/>-->
<!-- <TabsetAsSidebar v-else-if="tab === DrawerTabs.SIDEBAR"/>-->
<!-- <NewTabUrls v-else-if="tab === DrawerTabs.NEW_TAB_URLS"/>-->
<!-- <RssTabs v-else-if="tab === DrawerTabs.RSS"/>-->
<!-- <ScheduledTabs v-else-if="tab === DrawerTabs.SCHEDULED"/>-->
<Features v-else-if="tab === DrawerTabs.FEATURES"/>
<!-- <TabDetails v-else-if="tab === DrawerTabs.TAB_DETAILS"/>
<TabsetDetails v-else-if="tab === DrawerTabs.TABSET_DETAILS"/>-->
<!-- <TabDetails v-else-if="tab === DrawerTabs.TAB_DETAILS"/>
<TabsetDetails v-else-if="tab === DrawerTabs.TABSET_DETAILS"/>-->

<!-- <TagsListViewer v-else-if="tab === DrawerTabs.TAGS_VIEWER"/>-->
<!-- <TagsListViewer v-else-if="tab === DrawerTabs.TAGS_VIEWER"/>-->
<TagListViewer v-else-if="tab === DrawerTabs.TAG_VIEWER"/>

<!-- <TabsetHelp v-else-if="tab === DrawerTabs.HELP"/>-->
<!-- <TabsetHelp v-else-if="tab === DrawerTabs.HELP"/>-->

<!-- only in sidepanel in chrome extension-->
<!-- <TagsViewer v-else-if="tab === DrawerTabs.TAGS_VIEWER"/>-->
Expand All @@ -93,8 +93,8 @@
</template>

<script lang="ts" setup>
import {ref, watch, watchEffect} from "vue";
import {useRoute, useRouter} from "vue-router";
import {ref, watchEffect} from "vue";
import {useRoute} from "vue-router";
import {useSettingsStore} from "src/stores/settingsStore";
import {DrawerTabs, useUiStore} from "src/ui/stores/uiStore";
import BookmarksTree from "src/bookmarks/components/BookmarksTree.vue";
Expand Down
5 changes: 5 additions & 0 deletions src/components/helper/SidePanelFooterLeftButtons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
<!-- <q-item dense clickable v-close-popup>-->
<!-- <q-item-section>new window</q-item-section>-->
<!-- </q-item>-->
<!-- <SidePanelFooterViewMenuItem :side-panel-view="SidePanelViews.SHARED_TABSETS_LIST"-->
<!-- label="Shared Tabsets"-->
<!-- icon="o_share"-->
<!-- :size="buttonSize"-->
<!-- tooltip="All your shared tabsets"/>-->
<SidePanelFooterViewMenuItem :side-panel-view="SidePanelViews.BY_DOMAIN_LIST"
label="Tabs By Domain"
icon="o_dns"
Expand Down
2 changes: 1 addition & 1 deletion src/components/layouts/SearchHit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const {selectTabset} = useTabsetService()
const tabsetBadges = (hit: Hit): object[] => {
const badges: object[] = []
_.forEach(hit.tabsets, ts => badges.push({
_.forEach(hit.tabsets, (ts:string) => badges.push({
label: TabsetService.nameForTabsetId(ts),
tabsetId: ts,
encodedUrl: btoa(hit.url || '')
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/TagListViewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<script setup lang="ts">
import {uid, useQuasar} from "quasar";
import {uid} from "quasar";
import {onMounted, ref, watchEffect} from "vue";
import {Hit} from "src/search/models/Hit";
import Analytics from "src/core/utils/google-analytics";
Expand Down Expand Up @@ -47,7 +47,7 @@ const newSearch = (term: string) => {
})
})
_.forEach(results, h => {
_.forEach(results, (h:any) => {
//console.log("h", h.item.bookmarkId)
let tabsets: string[] = []
if (h.url) {
Expand Down
5 changes: 3 additions & 2 deletions src/components/widgets/BookmarkListElementWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ import {Bookmark} from "src/bookmarks/models/Bookmark";
import {useRouter} from "vue-router";
import {date} from "quasar";
import NavigationService from "src/services/NavigationService";
import BookmarksService from "src/bookmarks/services/BookmarksService";
import {useTabsetService} from "src/tabsets/services/TabsetService2";
const {formatDate} = useUtils()
Expand Down Expand Up @@ -124,7 +123,9 @@ const selectBookmark = (bm: Bookmark) =>
router.push("/mainpanel/bookmarks/" + bm.chromeBookmark.id) :
router.push("/bookmarks/" + bm.chromeBookmark.id)
const deleteBookmark = (bm: Bookmark) => BookmarksService.deleteBookmark(bm)
const deleteBookmark = (bm: Bookmark) => {
//BookmarksService.deleteBookmark(bm)
}
const existsInTabset = (url: string) => useTabsetService().tabsetsFor(url)?.length > 0
Expand Down
6 changes: 0 additions & 6 deletions src/domain/Types.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
// export default interface Types {

import {Tab} from "src/tabsets/models/Tab";

export type Programmer = {
name: string;
knownFor: string[];
};

export type TabPredicate = (t: Tab) => boolean;
export type Predicate<T> = (t: T) => boolean;

68 changes: 0 additions & 68 deletions src/domain/commands/GrantPermissionCommand.ts

This file was deleted.

57 changes: 0 additions & 57 deletions src/domain/commands/RevokePermissionCommand.ts

This file was deleted.

5 changes: 2 additions & 3 deletions src/domain/tabs/AddCommentCommand.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import Command from "src/core/domain/Command";
import {ExecutionResult} from "src/core/domain/ExecutionResult";
import {Tab, TabComment} from "src/tabsets/models/Tab";
import {TabComment} from "src/tabsets/models/Tab";
import {useTabsetService} from "src/tabsets/services/TabsetService2";
import {Tabset, TabsetSharing} from "src/tabsets/models/Tabset";
import {TabsetSharing} from "src/tabsets/models/Tabset";
import {useUiStore} from "src/ui/stores/uiStore";
import {useTabsetsStore} from "src/tabsets/stores/tabsetsStore";

Expand Down Expand Up @@ -37,7 +37,6 @@ export class AddCommentCommand implements Command<any> {
} else {
return Promise.reject("There was a problem adding your comment - could not find data for tabId " + this.tabId)
}
return Promise.reject("Could not find Tab")
}

}
Expand Down
1 change: 0 additions & 1 deletion src/domain/tabs/DeleteCommentCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export class DeleteCommentCommand implements Command<any> {
} else {
return Promise.reject("There was a problem deleting your comment")
}
return Promise.reject("Could not find Tab")
}

}
Expand Down
1 change: 0 additions & 1 deletion src/domain/tabs/UpdateTabColor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import Command from "src/core/domain/Command";
import {ExecutionResult} from "src/core/domain/ExecutionResult";
import TabsetService from "src/tabsets/services/TabsetService";
import {Tab} from "src/tabsets/models/Tab";
import {useSearchStore} from "src/search/stores/searchStore";

export class UpdateTabColorCommand implements Command<any> {

Expand Down
2 changes: 1 addition & 1 deletion src/layouts/FullPageLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ import {useSpacesStore} from "src/spaces/stores/spacesStore"
import SpacesSelectorWidget from 'src/spaces/widgets/SpacesSelectorWidget.vue'
import {DrawerTabs, useUiStore} from "src/ui/stores/uiStore";
import NotificationDialog from "components/dialogues/NotificationDialog.vue"
import {Notification, NotificationStatus} from "src/models/Notification";
import {Notification} from "src/core/models/Notification";
import {useUtils} from "src/core/services/Utils";
import DrawerRight from "components/DrawerRight.vue";
import {Suggestion, SuggestionState} from "src/suggestions/models/Suggestion";
Expand Down
2 changes: 1 addition & 1 deletion src/notes
2 changes: 1 addition & 1 deletion src/opentabs
2 changes: 1 addition & 1 deletion src/pages/SearchPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import SearchHit from "src/components/layouts/SearchHit.vue"
import {Hit} from "src/search/models/Hit";
import ReindexDialog from "components/dialogues/ReindexDialog.vue";
import {useCommandExecutor} from "src/core/services/CommandExecutor";
import {GrantPermissionCommand} from "src/domain/commands/GrantPermissionCommand";
import {GrantPermissionCommand} from "src/core/domain/commands/GrantPermissionCommand";
import InfoMessageWidget from "src/ui/widgets/InfoMessageWidget.vue";
const route = useRoute()
Expand Down
Loading

0 comments on commit 34caeb4

Please sign in to comment.