Skip to content

Commit

Permalink
translation, cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
evandor committed Jun 8, 2024
1 parent 8a30f7d commit 0aa4fc1
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 183 deletions.
36 changes: 10 additions & 26 deletions src/components/tabsets/SidePanelTabsetsExpansionList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@
class="q-ma-none q-px-sm q-py-none"
name="o_bookmark_add"
:class="alreadyInTabset() ? '':'cursor-pointer'"
:color="alreadyInTabset() ? 'grey-5': tsBadges.length > 0 ? 'accent':'warning'"
:color="alreadyInTabset() ? 'grey-5': tsBadges.length > 0 ? 'positive':'warning'"
size="xs"
data-testid="saveInTabsetBtn">
<div>Add Tab</div>
<!-- <q-icon right class="q-ma-none q-pa-none" size="2em" name="o_south" />-->
</q-btn>
<span
v-if="!alreadyInTabset() && showAddTabButton(tabset as Tabset, currentChromeTab) && tsBadges.length > 0"
style="color: grey;font-size: 7px;position: relative;top:-2px;left:-11px;">{{
tsBadges.length
}}</span>
<!-- <span-->
<!-- v-if="!alreadyInTabset() && showAddTabButton(tabset as Tabset, currentChromeTab) && tsBadges.length > 0"-->
<!-- style="color: grey;font-size: 7px;position: relative;top:-2px;left:-11px;">{{-->
<!-- tsBadges.length-->
<!-- }}</span>-->
<q-tooltip class="tooltip-small" v-if="alreadyInTabset()">
Tab is already contained in tabset '{{ tabset.name }}'
</q-tooltip>
Expand All @@ -125,12 +125,12 @@
</q-item-section>

<q-item-section side
@click.stop=""
@mouseover="hoveredTabset = tabset.id"
@mouseleave="hoveredTabset = undefined">
<q-item-label>
<q-item-label v-if="useTabsetsStore().getCurrentTabset?.id === tabset.id">
<q-icon class="cursor-pointer" name="more_horiz" size="16px"/>
<SidePanelPageContextMenu :tabset="tabset as Tabset"
@edit-header-description="toggleEditHeader(tabset as Tabset, index)"/>
<SidePanelPageContextMenu :tabset="tabset as Tabset" />
</q-item-label>
</q-item-section>
</template>
Expand Down Expand Up @@ -408,23 +408,6 @@ const suggestTabsetImport = () => {
return false
}
const importSharedTabset = () => {
const currentTabUrl = useTabsStore2().currentChromeTab?.url
if (currentTabUrl) {
console.log("Importing", currentTabUrl)
const urlSplit = currentTabUrl.split("/")
const tabsetId = urlSplit[urlSplit.length - 1]
FirebaseCall.get("/share/public/" + tabsetId + "?cb=" + new Date().getTime(), false)
.then((res: any) => {
const newTabset = res as Tabset
newTabset.sharing = TabsetSharing.UNSHARED
//_.forEach(newTabset.tabs, t => t.preview = TabPreview.THUMBNAIL)
useTabsetService().saveTabset(newTabset)
useTabsetService().reloadTabset(newTabset.id)
})
}
}
const updateSelectedTabset = (tabsetId: string, open: boolean, index: number | undefined = undefined) => {
console.log("updated...", tabsetId, open, index, Object.keys(tabsetExpanded.value))
tabsetExpanded.value.set(tabsetId, open)
Expand Down Expand Up @@ -454,6 +437,7 @@ const updateSelectedTabset = (tabsetId: string, open: boolean, index: number | u
const toggleEditHeader = (tabset: Tabset, index: number) => {
editHeaderDescription.value = !editHeaderDescription.value
if (editHeaderDescription.value) {
console.log("hier!!")
updateSelectedTabset(tabset.id, true, index)
headerDescription.value = tabset.headerDescription || ''
}
Expand Down
27 changes: 25 additions & 2 deletions src/i18n/bg/bg.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,39 @@
{
"accidentally_closed_info_msgs": "undefined",
"activate_bookmarks_integration": "Активиране на интеграцията на отметките",
"activate_browser_notifications": "Активиране на известия от браузъра",
"activate_fullpage_application": "undefined",
"add_new_tabset": "Добавяне на нов Tabset",
"add_tabset": "Добавяне на Tabset",
"appearance": "undefined",
"auto": "undefined",
"changing_needs_restart": "undefined",
"create_your_first_ts": "Създайте първия си Tabset!",
"dark_mode": "undefined",
"disabled": "undefined",
"documentation": "Документация",
"enabled": "undefined",
"experimental": "експериментален",
"individually_per_tabset": "undefined",
"language": "Език",
"larger_thumbs_info": "По-големите миниатюри изглеждат по-добре, но се нуждаят от повече (локално) място за съхранение.",
"no_space_selected": "Не е избрано място",
"no_special_chars_and_length": "Моля, не използвайте специални символи, максималната дължина е 32",
"one_line_about_tabsets1": "undefined",
"one_line_about_tabsets2": "undefined",
"optionally": "По избор",
"provide_name_add_later": "Посочете име и добавете табове по-късно",
"restore_hints": "undefined",
"restore_info_msg": "undefined",
"settings_adjust_general_appearance": "undefined",
"show_full_url": "undefined",
"tab_info_detail_level": "undefined",
"tab_switcher_settings": "undefined",
"tab_switching_time": "undefined",
"tabset_name": "Име на таблицата",
"welcome_to_tabsets": "Добре дошли в Tabsets",
}
"thumbnail_quality": "Качество на миниатюрите в %",
"title": "undefined",
"warning_thresholds": "undefined",
"warnings_info": "undefined",
"welcome_to_tabsets": "Добре дошли в Tabsets"
}
24 changes: 22 additions & 2 deletions src/i18n/de/de.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
{
"accidentally_closed_info_msgs": "Wenn Sie versehentlich eine Infobox mit einem Hinweis geschlossen haben, können Sie alle wiederherstellen, indem Sie hier klicken:",
"activate_bookmarks_integration": "Bookmark Integration aktivieren",
"activate_browser_notifications": "Browser Notifications aktivieren",
"activate_fullpage_application": "Aktiviere 'Full-Page' App",
"add_new_tabset": "Neues Tabset erstellen",
"add_tabset": "Tabset hinzufügen",
"appearance": "Erscheinungsbild",
"auto": "Auto",
"changing_needs_restart": "(eine Änderung erfordert einen Neustart)",
"create_your_first_ts": "Erstelle Deinen ersten Tabset",
"dark_mode": "Dunkler Modus (experimentell)",
"disabled": "Deaktiviert",
"documentation": "Dokumentation",
"enabled": "Aktiviert",
"experimental": "experimental",
"individually_per_tabset": "Individuell pro Tabset einstellen",
"language": "Sprache",
"larger_thumbs_info": "Größere Thumbnails sehen besser aus, benötigen aber mehr (lokalen) Speicherplatz.",
"no_space_selected": "Kein Space gewählt",
"no_special_chars_and_length": "Bitte nur Standardzeichen, max. Länge ist 32",
"one_line_about_tabsets1": "Ändern Sie Ihre Links:",
"one_line_about_tabsets2": "lokal und privat oder synchronisiert und sicher",
"optionally": "Optional:",
"provide_name_add_later": "Vergebe einen Namen (und füge die Tabs später hinzu)",
"restore_hints": "Hinweise zur Wiederherstellung",
"restore_info_msg": "Info-Meldungen wiederherstellen",
"settings_adjust_general_appearance": "Auf dieser Einstellungsseite können Sie das allgemeine Erscheinungsbild der Tabsets-Erweiterung anpassen.",
"show_full_url": "Vollständige URLs in den Registerkartendetails anzeigen",
"tab_info_detail_level": "Tab Details {detailLevelPerTabset}",
"tab_switcher_settings": "Registerkarte Auto-Switcher-Einstellungen",
"tab_switching_time": "Umschaltzeit der Registerkarte in Sekunden",
"tabset_name": "Tabset Name",
"welcome_to_tabsets": "Willkommen zu Tabsets"
}
"thumbnail_quality": "Qualität der Vorschaubilder in %",
"title": "Titel",
"warning_thresholds": "Warnschwellenwerte",
"warnings_info": "Die Warnungen beginnen, wenn die Mindestanzahl offener Tabs erreicht ist. Wenn das Maximum erreicht ist, wird der Balken rot.",
"welcome_to_tabsets": "Willkommen bei Tabsets"
}
20 changes: 20 additions & 0 deletions src/i18n/en/en.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,39 @@
{
"accidentally_closed_info_msgs": "If you accidentally closed an info message box with a hint, you can restore them all by clicking here:",
"activate_bookmarks_integration": "Activate Bookmarks Integration",
"activate_browser_notifications": "Activate Browser Notifications",
"activate_fullpage_application": "Activate Full-Page App",
"add_new_tabset": "Add new Tabset",
"add_tabset": "Add Tabset",
"appearance": "Appearance",
"auto": "Auto",
"changing_needs_restart": "(changing this needs restart)",
"create_your_first_ts": "Create your first Tabset",
"dark_mode": "Dark Mode (experimental)",
"disabled": "Disabled",
"documentation": "Documentation",
"enabled": "Enabled",
"experimental": "experimental",
"individually_per_tabset": "Adjust individually per tabset",
"language": "Language",
"larger_thumbs_info": "larger Thumbnails look better but need more (local) storage.",
"no_space_selected": "No Space selected",
"no_special_chars_and_length": "Please do not use special Characters, maximum length is 32",
"optionally": "Optionally",
"one_line_about_tabsets1": "Mange your links:",
"one_line_about_tabsets2": "locally and private or synced and safe",
"provide_name_add_later": "provide a name (and add tabs later)",
"restore_hints": "Restore Hints",
"restore_info_msg": "Restore Info Messages",
"settings_adjust_general_appearance": "On this settings page, you can adjust the general appearance of the tabsets extension.",
"show_full_url": "Show full URLs in Tab Details",
"tab_info_detail_level": "Tab Info Detail Level {detailLevelPerTabset}",
"tab_switcher_settings": "Tab Auto-Switcher Settings",
"tab_switching_time": "Tab Switching Time in seconds",
"tabset_name": "Tabset name",
"title": "Title",
"thumbnail_quality": "Thumbnail Quality in %",
"warning_thresholds": "Warning Thresholds",
"warnings_info": "warnings start when minimum open tabs count is reached. Reaching the maximum will turn the bar red.",
"welcome_to_tabsets": "Welcome to Tabsets"
}
52 changes: 25 additions & 27 deletions src/pages/SettingsPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
inline-label
v-model="tab"
no-caps>
<q-tab name="appearance" label="Appearance"/>
<q-tab name="appearance" :label="t('appearance')"/>
<!-- <q-tab name="account" label="Account"/>-->
<!-- <q-tab name="subscription" label="Subscription" icon="o_shopping_bag"/>-->
<!-- <q-tab name="sharing" label="Sharing"-->
Expand All @@ -42,26 +42,25 @@
<div v-if="tab === 'appearance'">

<div class="q-pa-md q-gutter-sm">
<q-banner rounded style="border:1px solid orange">On this settings page, you can adjust the general appearance of
the tabsets extension.
{{ t('provide_name_add_later')}}
<q-banner rounded style="border:1px solid orange">
{{ t('settings_adjust_general_appearance')}}
</q-banner>

<div class="row items-baseline q-ma-md q-gutter-md">

<InfoLine label="Title">
<InfoLine :label="t('title')">
<q-input type="text" color="primary" filled v-model="installationTitle" label="">
<template v-slot:prepend>
<q-icon name="o_edit_note"/>
</template>
</q-input>
</InfoLine>

<InfoLine label="Dark Mode (experimental)">
<q-radio v-model="darkMode" val="auto" label="Auto"/>
<q-radio v-model="darkMode" val="true" label="Enabled"/>
<q-radio v-model="darkMode" val="false" label="Disabled"/>
&nbsp;&nbsp;&nbsp;(changing this needs restart)
<InfoLine :label="t('dark_mode')">
<q-radio v-model="darkMode" val="auto" :label="t('Auto')"/>
<q-radio v-model="darkMode" val="true" :label="t('Enabled')"/>
<q-radio v-model="darkMode" val="false" :label="t('Disabled')"/>
&nbsp;&nbsp;&nbsp;{{t('changing_needs_restart')}}
</InfoLine>

<div class="col-3">
Expand All @@ -81,35 +80,35 @@
</div>
<div class="col"></div>

<InfoLine :label="'Tab Info Detail Level ' + (detailLevelPerTabset ? ' (Default)' : '')">
<InfoLine :label="t('tab_info_detail_level', {detailLevelPerTabset: (detailLevelPerTabset ? ' (Default)' : '')})">
<q-radio v-model="detailLevel" :val="ListDetailLevel.MINIMAL" label="Minimal Details"/>
<q-radio v-model="detailLevel" :val="ListDetailLevel.SOME" label="Some Details"/>
<q-radio v-model="detailLevel" :val="ListDetailLevel.MAXIMAL" label="All Details"/>
</InfoLine>

<InfoLine label="">
<q-checkbox v-model="detailLevelPerTabset" label="Adjust individually per tabset"/>
<q-checkbox v-model="detailLevelPerTabset" :label="t('individually_per_tabset')"/>
</InfoLine>

<InfoLine label="URLs">
<q-checkbox v-model="fullUrls" label="Show full URLs in Tab Details"/>
<q-checkbox v-model="fullUrls" :label="t('show_full_url')"/>
</InfoLine>

<InfoLine label="Ignore Browser Extensions as tabs">
<q-toggle v-model="ignoreExtensionsEnabled"
@click="updateSettings('extensionsAsTabs', ignoreExtensionsEnabled)"/>
</InfoLine>
<!-- <InfoLine label="Ignore Browser Extensions as tabs">-->
<!-- <q-toggle v-model="ignoreExtensionsEnabled"-->
<!-- @click="updateSettings('extensionsAsTabs', ignoreExtensionsEnabled)"/>-->
<!-- </InfoLine>-->

</div>

<div class="row items-baseline q-ma-md q-gutter-md"
v-if="useFeaturesStore().hasFeature(FeatureIdent.AUTO_TAB_SWITCHER)">
<div class="col-3">
Tab Switching Time in seconds
{{t('tab_switching_time')}}
</div>
<div class="col-9">
<q-select
label="Tab Auto-Switcher Settings"
:label="t('tab_switcher_settings')"
filled
v-model="autoSwitcherOption"
:options="autoSwitcherOptions"
Expand All @@ -122,25 +121,24 @@

<div class="row items-baseline q-ma-md q-gutter-md">
<div class="col-3">
Restore Info Messages
{{ t('restore_info_msg')}}
</div>
<div class="col-3">
If you accidentally closed an info message box with a hint, you can restore them all by clicking here:
{{t('accidentally_closed_info_msgs')}}
</div>
<div class="col-1"></div>
<div class="col">
<q-btn label="Restore Hints" @click.stop="restoreHints"/>
<q-btn :label="t('restore_hints')" @click.stop="restoreHints"/>
</div>
</div>

<div class="row items-baseline q-ma-md q-gutter-md"
v-if="useFeaturesStore().hasFeature(FeatureIdent.OPENTABS_THRESHOLD)">
<div class="col-3">
Warning Thresholds
{{ t('warning_thresholds')}}
</div>
<div class="col-3">
warnings start when minimum open tabs count is reached<br>
Reaching the maximum will turn the bar red.
{{t('warnings_info')}}
</div>
<div class="col q-ma-xl">
<q-range
Expand All @@ -155,10 +153,10 @@

<div class="row items-baseline q-ma-md q-gutter-md">
<div class="col-3">
Thumbnail Quality in %
{{t('thumbnail_quality')}}
</div>
<div class="col-3">
larger Thumbnails look better but need more (local) storage.
{{t('larger_thumbs_info')}}
</div>
<div class="col q-ma-xl">
<q-slider v-model="settingsStore.thumbnailQuality"
Expand Down
38 changes: 4 additions & 34 deletions src/pages/sidepanel/SidePanelPageContextMenu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
icon="o_note"
label="Edit Tabset"/>

<ContextMenuItem v-close-popup
@was-clicked="emits('editHeaderDescription')"
icon="o_description"
label="Tabset Description..."/>
<!-- <ContextMenuItem v-close-popup-->
<!-- @was-clicked="emits('editHeaderDescription')"-->
<!-- icon="o_description"-->
<!-- label="Tabset Description..."/>-->

<template v-if="useFeaturesStore().hasFeature(FeatureIdent.TABSET_SUBFOLDER)">

Expand Down Expand Up @@ -103,34 +103,6 @@

<q-separator inset/>

<ContextMenuItem v-if="useFeaturesStore().hasFeature(FeatureIdent.TABSETS_SHARING) && (tabset.sharing === TabsetSharing.UNSHARED || !tabset.sharing)"
v-close-popup
@was-clicked="shareTabsetPubliclyDialog(tabset)"
icon="ios_share"
color="warning"
label="Share as link..."/>

<ContextMenuItem v-if="tabset.sharing === TabsetSharing.PUBLIC_LINK_OUTDATED"
v-close-popup
@was-clicked="shareTabsetPubliclyDialog(tabset, true)"
icon="ios_share"
color="warning"
label="Republish">
<q-tooltip class="tooltip-small">Tabset has changed, republish</q-tooltip>
</ContextMenuItem>

<ContextMenuItem
v-if="tabset.sharing === TabsetSharing.PUBLIC_LINK || tabset.sharing === TabsetSharing.PUBLIC_LINK_OUTDATED"
v-close-popup
@was-clicked="removePublicShare(tabset.id, tabset.sharedId)"
icon="ios_share"
color="warning"
label="Stop Sharing">
<q-tooltip class="tooltip-small">Delete Shared Link</q-tooltip>
</ContextMenuItem>

<q-separator inset v-if="useFeaturesStore().hasFeature(FeatureIdent.TABSETS_SHARING)" />

<template v-if="useFeaturesStore().hasFeature(FeatureIdent.DEV_MODE)">
<ContextMenuItem v-close-popup
@was-clicked="useSearchStore().reindexTabset(tabset.id)"
Expand Down Expand Up @@ -158,10 +130,8 @@

<script lang="ts" setup>
import {usePermissionsStore} from "stores/permissionsStore";
import {FeatureIdent} from "src/models/FeatureIdent";
import {Tabset, TabsetSharing, TabsetStatus} from "src/tabsets/models/Tabset";
import {useSettingsStore} from "stores/settingsStore";
import {useSearchStore} from "src/search/stores/searchStore";
import NavigationService from "src/services/NavigationService";
import EditTabsetDialog from "src/tabsets/dialogues/EditTabsetDialog.vue";
Expand Down
Loading

0 comments on commit 0aa4fc1

Please sign in to comment.