@brftech/filex-core 0.30.0 → 0.30.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brftech/filex-core",
3
- "version": "0.30.0",
3
+ "version": "0.30.1",
4
4
  "description": "filex core — Vue 3 source of truth for the filex file manager (FileExplorer + ConnectionsPanel SFCs, composables, types)",
5
5
  "type": "module",
6
6
  "main": "./dist/filex-core.umd.cjs",
@@ -104,6 +104,7 @@ import {
104
104
  panes or split view shows mismatched rows). */
105
105
  import {
106
106
  filterListing,
107
+ virtualSegmentKey,
107
108
  showHiddenFiles,
108
109
  setShowHiddenFiles,
109
110
  injectTrashRow,
@@ -3281,7 +3282,11 @@ const activeSplit = computed(() => tabsApi.activeTab.value?.split ?? null);
3281
3282
  // Sekme adı OTOMATİK = güncel klasör adı (kök = depo adı / kök etiketi).
3282
3283
  function tabLabel(path: string): string {
3283
3284
  const p = (path || '').replace(/^\/+|\/+$/g, '');
3284
- if (p === '.trash') return t('node.trash');
3285
+ // gezinti:g1 the virtual views park a sentinel in the path. Translate via
3286
+ // the SHARED map: this special-cased only '.trash' when recent/starred/shared
3287
+ // arrived, so the strip read ".shared" at users (reported 2026-09-04).
3288
+ const virtualKey = virtualSegmentKey(p.split('/').pop() || p);
3289
+ if (virtualKey) return t(virtualKey);
3285
3290
  if (!p) return multiStorageRoot.value ? t('breadcrumb.root') : adapter.value || t('breadcrumb.root');
3286
3291
  return p.split('/').pop() || p;
3287
3292
  }
@@ -21,6 +21,7 @@
21
21
  */
22
22
  import { computed, nextTick, onBeforeUnmount, ref, watch } from 'vue';
23
23
  import { hasInternalDrag } from '../lib/dragOut';
24
+ import { VIRTUAL_SEGMENTS } from '../lib/listing';
24
25
  import type { LocaleCode } from '../types/ExplorerConfig';
25
26
  import { useLocale } from '../composables/useLocale';
26
27
 
@@ -61,15 +62,6 @@ const floorLabel = computed(() => {
61
62
 
62
63
  const { t } = useLocale(() => props.locale);
63
64
 
64
- /* gezinti:g1 — sentinel dirname segment → locale key. The explorer parks these
65
- in `dirname` while a virtual view (trash, recent, starred, shared) is on
66
- screen; each has no real folder behind it. */
67
- const VIRTUAL_SEGMENTS: Record<string, string> = {
68
- '.trash': 'node.trash',
69
- '.recent': 'node.recent',
70
- '.starred': 'node.starred',
71
- '.shared': 'node.shared',
72
- };
73
65
 
74
66
  const emit = defineEmits<{
75
67
  (e: 'navigate', adapterPath: string): void;
@@ -159,3 +159,27 @@ export async function hydrateTrashRow(
159
159
  /* keep the bare row */
160
160
  }
161
161
  }
162
+
163
+ /**
164
+ * Sentinel path segment → locale key, for the virtual views the explorer parks
165
+ * in `dirname` (trash, recent, starred, shared). None has a real folder behind
166
+ * it, so anything that renders a path segment has to translate them or it
167
+ * prints the sentinel.
168
+ *
169
+ * ⚠ ONE map, deliberately. `.trash` predates the other three and its
170
+ * translation was written twice — once in the breadcrumb, once in the tab
171
+ * label. When recent/starred/shared arrived, only the breadcrumb copy was
172
+ * extended, so the tab strip read ".shared" in front of users (reported
173
+ * 2026-09-04). A second copy of a mapping is a second chance to forget it.
174
+ */
175
+ export const VIRTUAL_SEGMENTS: Record<string, string> = {
176
+ '.trash': 'node.trash',
177
+ '.recent': 'node.recent',
178
+ '.starred': 'node.starred',
179
+ '.shared': 'node.shared',
180
+ };
181
+
182
+ /** The locale key for a sentinel segment, or '' when it is a real folder. */
183
+ export function virtualSegmentKey(segment: string): string {
184
+ return VIRTUAL_SEGMENTS[segment] ?? '';
185
+ }