Skip to content

Commit bae43fa

Browse files
committed
tabsets merge
1 parent d744666 commit bae43fa

File tree

3 files changed

+17
-14
lines changed

3 files changed

+17
-14
lines changed

commands/CreateTabsetCommand.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { useUtils } from 'src/core/services/Utils'
66
import Analytics from 'src/core/utils/google-analytics'
77
import { useFeaturesStore } from 'src/features/stores/featuresStore'
88
import { useLogger } from 'src/services/Logger'
9-
import { StaticSuggestionIdent, Suggestion } from 'src/suggestions/models/Suggestion'
9+
import { StaticSuggestionIdent, Suggestion } from 'src/suggestions/domain/models/Suggestion'
1010
import { useSuggestionsStore } from 'src/suggestions/stores/suggestionsStore'
1111
import { SaveOrReplaceResult } from 'src/tabsets/models/SaveOrReplaceResult'
1212
import { TabsetType } from 'src/tabsets/models/Tabset'
@@ -56,18 +56,14 @@ export class CreateTabsetCommand implements Command<SaveOrReplaceResult> {
5656
!useFeaturesStore().hasFeature(FeatureIdent.BOOKMARKS) &&
5757
process.env.MODE === 'bex'
5858
) {
59-
useSuggestionsStore().addSuggestion(
60-
Suggestion.getStaticSuggestion(StaticSuggestionIdent.TRY_BOOKMARKS_FEATURE),
61-
)
59+
useSuggestionsStore().addSuggestion(Suggestion.getStaticSuggestion('TRY_BOOKMARKS_FEATURE'))
6260
}
6361
if (
6462
useTabsetsStore().tabsets.size >= 15 &&
6563
!useFeaturesStore().hasFeature(FeatureIdent.SPACES) &&
6664
process.env.MODE === 'bex'
6765
) {
68-
useSuggestionsStore().addSuggestion(
69-
Suggestion.getStaticSuggestion(StaticSuggestionIdent.TRY_SPACES_FEATURE),
70-
)
66+
useSuggestionsStore().addSuggestion(Suggestion.getStaticSuggestion('TRY_SPACES_FEATURE'))
7167
// } else if (useTabsetsStore().tabsets.size >= 3 &&
7268
// useTabsetsStore().allTabsCount > 10 &&
7369
// !useFeaturesStore().hasFeature(FeatureIdent.NEWEST_TABS) &&

pages/TabsetPage.vue

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,12 @@
4141
</span>
4242
</template>
4343
<template v-else>
44-
<TabsetsSelectorWidget />
44+
<div>
45+
<TabsetsSelectorWidget />
46+
<span v-if="tabset.sharedId" class="text-caption"
47+
>shared by {{ tabset.sharedBy }}, {{ date.formatDate(tabset.sharedAt, 'DD.MM.YYYY HH:mm') }}</span
48+
>
49+
</div>
4550
</template>
4651
<q-icon
4752
v-if="showEditButton"
@@ -176,11 +181,10 @@
176181
v-model="tab"
177182
dense
178183
class="text-grey q-ma-none q-pa-none"
179-
active-color="primary"
180184
indicator-color="primary"
181185
align="left"
182186
narrow-indicator>
183-
<q-tab name="grid" label="As Grid" />
187+
<q-tab name="grid" label="As Grid" v-if="inBexMode()" />
184188
<q-tab name="list" label="As List" />
185189
<q-tab name="export" label="Export" />
186190
</q-tabs>
@@ -249,6 +253,7 @@ a tab's url starts with one of the urls of this tabset, it will be ignored and n
249253
import TabsetsSelectorWidget from 'components/widgets/TabsetsSelectorWidget.vue'
250254
import { date, uid, useQuasar } from 'quasar'
251255
import { useCommandExecutor } from 'src/core/services/CommandExecutor'
256+
import { useUtils } from 'src/core/services/Utils'
252257
import Analytics from 'src/core/utils/google-analytics'
253258
import { RenameTabsetCommand } from 'src/tabsets/commands/RenameTabset'
254259
import { ToggleSortingCommand } from 'src/tabsets/commands/ToggleSorting'
@@ -271,6 +276,8 @@ const router = useRouter()
271276
272277
const $q = useQuasar()
273278
279+
const { inBexMode } = useUtils()
280+
274281
const tabsetId = ref(null as unknown as string)
275282
const tabset = ref<Tabset>(new Tabset(uid(), 'empty', []))
276283
const tabsetFolder = ref<Tabset>(new Tabset(uid(), 'empty', []))
@@ -295,7 +302,7 @@ watchEffect(() => {
295302
tabsetId.value = route?.params.tabsetId as string
296303
tabset.value = useTabsetsStore().getTabset(tabsetId.value) || new Tabset(uid(), 'empty', [])
297304
console.log('watch effect in tabsetpage', tabsetId.value)
298-
tab.value = route.query['tab'] ? (route.query['tab'] as string) : 'grid'
305+
tab.value = route.query['tab'] ? (route.query['tab'] as string) : 'list'
299306
tabsetFolder.value = useTabsetsStore().getActiveFolder(tabset.value) || tabset.value
300307
})
301308

widgets/PanelTabListElementWidget.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@
231231
name="o_notifications"
232232
class="q-mr-xs"
233233
size="xs"
234-
:color="suggestion.state === SuggestionState.NOTIFICATION ? 'negative' : 'accent'">
235-
<q-tooltip class="tooltip-small" v-if="suggestion.state === SuggestionState.NOTIFICATION"
234+
:color="suggestion.state === 'NOTIFICATION' ? 'negative' : 'accent'">
235+
<q-tooltip class="tooltip-small" v-if="suggestion.state === 'NOTIFICATION'"
236236
>There is a new notification for this tab
237237
</q-tooltip>
238238
<q-tooltip class="tooltip-small" v-else>There is a notification for this tab</q-tooltip>
@@ -391,7 +391,7 @@ import { useFeaturesStore } from 'src/features/stores/featuresStore'
391391
import NavigationService from 'src/services/NavigationService'
392392
import TabService from 'src/services/TabService'
393393
import { SavedBlob } from 'src/snapshots/models/SavedBlob'
394-
import { Suggestion, SuggestionState } from 'src/suggestions/models/Suggestion'
394+
import { Suggestion, SuggestionState } from 'src/suggestions/domain/models/Suggestion'
395395
import { useSuggestionsStore } from 'src/suggestions/stores/suggestionsStore'
396396
import { DeleteChromeGroupCommand } from 'src/tabsets/commands/DeleteChromeGroupCommand'
397397
import { DeleteCommentCommand } from 'src/tabsets/commands/DeleteCommentCommand'

0 commit comments

Comments
 (0)