-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from evandor/TAB-435-toasts
Tab 435 toasts
- Loading branch information
Showing
12 changed files
with
663 additions
and
460 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<template> | ||
|
||
<q-btn v-if="props.showSuggestionIcon" | ||
@click.stop="emits('wasClicked')" | ||
icon="o_lightbulb" | ||
class="q-my-xs q-ml-xs q-px-xs" | ||
flat | ||
color="warning" | ||
size="9px"> | ||
<q-tooltip class="tooltip">{{ suggestionsLabel() }}</q-tooltip> | ||
</q-btn> | ||
|
||
<SidePanelFooterLeftButton | ||
:side-panel-view="SidePanelView.TABS_LIST" icon="o_playlist_add" | ||
tooltip="All your browser's open tabs"/> | ||
|
||
<SidePanelFooterLeftButton :side-panel-view="SidePanelView.BOOKMARKS" | ||
icon="bookmark" | ||
:size="buttonSize" | ||
tooltip="Show the Bookmarks Browser"/> | ||
<SidePanelFooterLeftButton :side-panel-view="SidePanelView.TAGS_LIST" | ||
icon="o_label" | ||
:size="buttonSize" | ||
tooltip="List of all tags sorted by prevalence"/> | ||
<SidePanelFooterLeftButton :side-panel-view="SidePanelView.BY_DOMAIN_LIST" | ||
icon="o_dns" | ||
:size="buttonSize" | ||
tooltip="List all your tabs URLs by domain"/> | ||
<SidePanelFooterLeftButton :side-panel-view="SidePanelView.RSS_LIST" | ||
icon="o_rss_feed" | ||
tooltip="List all your RSS feeds"/> | ||
<SidePanelFooterLeftButton :side-panel-view="SidePanelView.NEWEST_TABS_LIST" | ||
icon="o_schedule" | ||
:size="buttonSize" | ||
tooltip="Newest Tabs List"/> | ||
<SidePanelFooterLeftButton :side-panel-view="SidePanelView.TOP_10_TABS_LIST" | ||
icon="o_workspace_premium" | ||
:size="buttonSize" | ||
tooltip="Top 10 Tabs List"/> | ||
|
||
<span class="q-ma-none" | ||
v-if="permissionsStore.hasFeature(FeatureIdent.OPENTABS_THRESHOLD) && tabsStore.tabsets?.size > 0"> | ||
<OpenTabsThresholdWidget :showLabel="false" :in-side-panel="true"> | ||
<q-tooltip>{{ tabsStore.tabs?.length }} open tabs</q-tooltip> | ||
</OpenTabsThresholdWidget> | ||
</span> | ||
|
||
</template> | ||
<script setup lang="ts"> | ||
import {SidePanelView, useUiStore} from "stores/uiStore"; | ||
import {FeatureIdent} from "src/models/AppFeature"; | ||
import SidePanelFooterLeftButton from "components/helper/SidePanelFooterLeftButton.vue"; | ||
import OpenTabsThresholdWidget from "components/widgets/OpenTabsThresholdWidget.vue"; | ||
import {usePermissionsStore} from "stores/permissionsStore"; | ||
import {useTabsStore} from "stores/tabsStore"; | ||
import {useSuggestionsStore} from "stores/suggestionsStore"; | ||
import {ref, watchEffect} from "vue"; | ||
const props = defineProps({ | ||
showSuggestionIcon: {type: Boolean, required: true} | ||
}) | ||
const emits = defineEmits(['wasClicked']) | ||
const permissionsStore = usePermissionsStore() | ||
const tabsStore = useTabsStore() | ||
const buttonSize = ref('15px') | ||
watchEffect(() => { | ||
buttonSize.value = useUiStore().getButtonSize('sidePanelFooter') | ||
}) | ||
const suggestionsLabel = () => { | ||
const suggestions = useSuggestionsStore().getSuggestions() | ||
return suggestions.length === 1 ? | ||
suggestions.length + " New Suggestion" : | ||
suggestions.length + " New Suggestions" | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {uid} from "quasar"; | ||
|
||
export enum ToastType { | ||
INFO = "INFO", | ||
WARNING = "WARNING", | ||
ERROR = "ERROR" | ||
} | ||
|
||
export class Toast { | ||
|
||
public id: string | ||
public created: number; | ||
|
||
constructor( | ||
public msg: string, public type: ToastType, public action: any = undefined) { | ||
this.id = uid() | ||
this.created = new Date().getTime() | ||
} | ||
|
||
} |
Oops, something went wrong.