@brftech/filex-core 0.40.0 → 0.41.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/README.md +32 -25
- package/dist/ArchiveViewer-DxxjhYZD.js +124 -0
- package/dist/ArchiveViewer-DxxjhYZD.js.map +1 -0
- package/dist/CsvViewer-CyuwENI_.js +141 -0
- package/dist/CsvViewer-CyuwENI_.js.map +1 -0
- package/dist/{DrawioViewer-BNALOB04.js → DrawioViewer-BIYsTX97.js} +48 -42
- package/dist/DrawioViewer-BIYsTX97.js.map +1 -0
- package/dist/EpubViewer-K9PjCMmS.js +163 -0
- package/dist/EpubViewer-K9PjCMmS.js.map +1 -0
- package/dist/IpynbViewer-DYU6Zgz2.js +184 -0
- package/dist/IpynbViewer-DYU6Zgz2.js.map +1 -0
- package/dist/MermaidViewer-Bp73aId8.js +137 -0
- package/dist/MermaidViewer-Bp73aId8.js.map +1 -0
- package/dist/PsdViewer-C2eLivw1.js +122 -0
- package/dist/PsdViewer-C2eLivw1.js.map +1 -0
- package/dist/TiffViewer-DsHg5gcz.js +142 -0
- package/dist/TiffViewer-DsHg5gcz.js.map +1 -0
- package/dist/Viewer3D-C_dc2HN9.js +75 -0
- package/dist/Viewer3D-C_dc2HN9.js.map +1 -0
- package/dist/filex-core.js +218 -20361
- package/dist/filex-core.js.map +1 -1
- package/dist/filex-core.umd.cjs +61 -62
- package/dist/filex-core.umd.cjs.map +1 -1
- package/dist/index-vxMZpYb-.js +26700 -0
- package/dist/index-vxMZpYb-.js.map +1 -0
- package/dist/index.d.ts +4212 -862
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/FileExplorer.vue +2154 -506
- package/src/components/AdvancedSearch.vue +870 -0
- package/src/components/Breadcrumb.vue +191 -19
- package/src/components/CommandPalette.vue +66 -22
- package/src/components/ConnectionsPanel.vue +6 -2
- package/src/components/ContextMenu.vue +39 -2
- package/src/components/EncryptedFolderModal.vue +31 -25
- package/src/components/FilePane.vue +951 -0
- package/src/components/FilterBar.vue +568 -72
- package/src/components/GalleryView.vue +172 -56
- package/src/components/GridView.vue +331 -82
- package/src/components/HomeView.vue +331 -0
- package/src/components/InspectorPanel.vue +296 -53
- package/src/components/ListView.vue +1173 -194
- package/src/components/NFSExportsPanel.vue +7 -4
- package/src/components/OnboardingTour.vue +156 -33
- package/src/components/QuickLook.vue +26 -1
- package/src/components/RecentlyOpened.vue +17 -2
- package/src/components/S3KeysPanel.vue +7 -4
- package/src/components/SSHKeysPanel.vue +7 -4
- package/src/components/ShortcutSettings.vue +6 -2
- package/src/components/ShortcutsHelp.vue +4 -1
- package/src/components/SideNav.vue +206 -140
- package/src/components/StorageFields.vue +19 -1
- package/src/components/TabBar.vue +87 -1
- package/src/components/TagPicker.vue +77 -6
- package/src/components/ThemeGallery.vue +13 -198
- package/src/components/ThemePalette.vue +244 -0
- package/src/components/TimeZoneDialog.vue +135 -0
- package/src/components/TimeZonePicker.vue +696 -0
- package/src/components/TokensPanel.vue +35 -14
- package/src/components/Toolbar.vue +953 -465
- package/src/components/ViewSwitcher.vue +9 -4
- package/src/composables/useConnections.ts +35 -4
- package/src/composables/useExplorerTimeZone.ts +89 -0
- package/src/composables/useFileApi.ts +53 -4
- package/src/composables/useLocale.ts +382 -26
- package/src/composables/useRowTouch.ts +95 -0
- package/src/index.ts +177 -3
- package/src/lib/actionIcons.ts +330 -0
- package/src/lib/advSearch.ts +162 -0
- package/src/lib/dateGroups.ts +197 -0
- package/src/lib/destinationTree.ts +235 -0
- package/src/lib/downloadSelection.ts +154 -0
- package/src/lib/fileFilters.ts +319 -12
- package/src/lib/fileIcons.ts +299 -5
- package/src/lib/filePreview.ts +605 -0
- package/src/lib/listing.ts +72 -0
- package/src/lib/shareTtl.ts +31 -2
- package/src/lib/sortOrder.ts +459 -0
- package/src/lib/themes.ts +151 -116
- package/src/lib/timezone.ts +501 -0
- package/src/lib/uiProfile.ts +82 -0
- package/src/lib/viewPrefs.ts +1036 -0
- package/src/locales/en.ts +416 -26
- package/src/locales/tr.ts +409 -26
- package/src/modals/ConvertModal.vue +23 -3
- package/src/modals/DestinationPickerModal.vue +341 -0
- package/src/modals/Modal.vue +18 -4
- package/src/modals/NewDocumentModal.vue +525 -0
- package/src/modals/NewFolderModal.vue +15 -9
- package/src/modals/PermissionsModal.vue +557 -476
- package/src/modals/PreviewModal.vue +516 -156
- package/src/styles/base.css +5409 -8
- package/src/styles/variables.css +139 -65
- package/src/types/Connections.ts +9 -0
- package/src/types/ExplorerConfig.ts +144 -39
- package/src/types/FileNode.ts +28 -0
- package/src/viewers/ArchiveViewer.vue +46 -8
- package/src/viewers/CsvViewer.vue +19 -2
- package/src/viewers/DrawioViewer.vue +12 -1
- package/src/viewers/EpubViewer.vue +50 -6
- package/src/viewers/IpynbViewer.vue +19 -2
- package/src/viewers/MermaidViewer.vue +20 -3
- package/src/viewers/PdfViewer.vue +24 -4
- package/src/viewers/PsdViewer.vue +28 -4
- package/src/viewers/TiffViewer.vue +19 -2
- package/src/viewers/Viewer3D.vue +36 -2
- package/dist/ArchiveViewer-Cdfv9LFC.js +0 -99
- package/dist/ArchiveViewer-Cdfv9LFC.js.map +0 -1
- package/dist/CsvViewer-CqWeV8VO.js +0 -131
- package/dist/CsvViewer-CqWeV8VO.js.map +0 -1
- package/dist/DrawioViewer-BNALOB04.js.map +0 -1
- package/dist/EpubViewer-BPmlImG7.js +0 -145
- package/dist/EpubViewer-BPmlImG7.js.map +0 -1
- package/dist/IpynbViewer-CDlQmuCV.js +0 -175
- package/dist/IpynbViewer-CDlQmuCV.js.map +0 -1
- package/dist/MermaidViewer-sfZWdR-d.js +0 -127
- package/dist/MermaidViewer-sfZWdR-d.js.map +0 -1
- package/dist/PsdViewer-DwuySZsb.js +0 -112
- package/dist/PsdViewer-DwuySZsb.js.map +0 -1
- package/dist/TiffViewer-BDQ3d3CQ.js +0 -132
- package/dist/TiffViewer-BDQ3d3CQ.js.map +0 -1
- package/dist/Viewer3D-CJJJgkuv.js +0 -60
- package/dist/Viewer3D-CJJJgkuv.js.map +0 -1
- package/src/components/SecondaryPane.vue +0 -447
- package/src/modals/ShareModal.vue +0 -139
|
@@ -45,6 +45,14 @@ const props = defineProps<{
|
|
|
45
45
|
* otherwise would have people mint one per protocol.
|
|
46
46
|
*/
|
|
47
47
|
protocol?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The host the surrounding guide tells people to connect to. Given by the
|
|
50
|
+
* connection guides, which know the server's own public address; without
|
|
51
|
+
* it the label falls back to where this panel was loaded from. ⚠ The
|
|
52
|
+
* default label used to be built from apiBase / the page while the guide
|
|
53
|
+
* right under it printed the server's address — one screen, two machines.
|
|
54
|
+
*/
|
|
55
|
+
host?: string;
|
|
48
56
|
}>();
|
|
49
57
|
|
|
50
58
|
const emit = defineEmits<{
|
|
@@ -52,7 +60,7 @@ const emit = defineEmits<{
|
|
|
52
60
|
}>();
|
|
53
61
|
|
|
54
62
|
const locale = computed<LocaleCode>(() => resolveLocale(props.config.locale));
|
|
55
|
-
const { t } = useLocale(locale);
|
|
63
|
+
const { t, formatDate } = useLocale(locale);
|
|
56
64
|
|
|
57
65
|
const { tokens, loading, error, canMint, revealed, load, create, remove, dismiss } = useTokens(
|
|
58
66
|
props.config,
|
|
@@ -93,18 +101,28 @@ onMounted(async () => {
|
|
|
93
101
|
emit('active', { hasToken: tokens.value.length > 0 });
|
|
94
102
|
});
|
|
95
103
|
|
|
104
|
+
/**
|
|
105
|
+
* The name a token gets when the field is left empty — one the user will
|
|
106
|
+
* recognise in the list later.
|
|
107
|
+
*
|
|
108
|
+
* A protocol guide knows both halves: `WebDAV — files.example.com`, the host
|
|
109
|
+
* being the PUBLIC address the guide resolved (connectionsOrigin). The API
|
|
110
|
+
* keys page knows neither, and it used to make a host up from `apiBase`,
|
|
111
|
+
* which is whatever the page happens to talk to: every key on a local
|
|
112
|
+
* instance was called `127.0.0.1:5297`, and that address was printed as the
|
|
113
|
+
* placeholder in the README screenshots. It names the key by the day it was
|
|
114
|
+
* made instead.
|
|
115
|
+
*/
|
|
96
116
|
function defaultLabel(): string {
|
|
97
117
|
const p = (props.protocol || '').toUpperCase();
|
|
98
|
-
|
|
118
|
+
if (p) return props.host ? `${p} — ${props.host}` : p;
|
|
119
|
+
return t('conn.tokens.defaultName', { date: new Date().toISOString().slice(0, 10) });
|
|
99
120
|
}
|
|
100
121
|
|
|
101
|
-
/**
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
} catch {
|
|
106
|
-
return 'filex';
|
|
107
|
-
}
|
|
122
|
+
/** What the empty name field suggests: the saved default on a protocol guide,
|
|
123
|
+
* an example of a useful name on the API keys page. */
|
|
124
|
+
function labelPlaceholder(): string {
|
|
125
|
+
return props.protocol ? defaultLabel() : t('conn.tokens.namePlaceholder');
|
|
108
126
|
}
|
|
109
127
|
|
|
110
128
|
async function mint(): Promise<void> {
|
|
@@ -169,10 +187,13 @@ async function copySecret(): Promise<void> {
|
|
|
169
187
|
}
|
|
170
188
|
}
|
|
171
189
|
|
|
190
|
+
/* zaman:z1 — one date formatter for the package. This was a bare
|
|
191
|
+
* `toLocaleDateString()`: the browser's locale and the browser's zone, so a
|
|
192
|
+
* key minted at 23:30 in Istanbul was dated a day early for a viewer reading
|
|
193
|
+
* UTC and came out in the wrong language besides. */
|
|
172
194
|
function fmtDate(v?: string | null): string {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return Number.isNaN(d.getTime()) ? '' : d.toLocaleDateString();
|
|
195
|
+
const ms = new Date(v ?? '').getTime();
|
|
196
|
+
return Number.isNaN(ms) ? '' : formatDate(ms);
|
|
176
197
|
}
|
|
177
198
|
|
|
178
199
|
function usedLabel(row: ApiToken): string {
|
|
@@ -194,7 +215,7 @@ function usedLabel(row: ApiToken): string {
|
|
|
194
215
|
<input
|
|
195
216
|
v-model="label"
|
|
196
217
|
class="fe-cfield__input"
|
|
197
|
-
:placeholder="
|
|
218
|
+
:placeholder="labelPlaceholder()"
|
|
198
219
|
data-testid="token-label"
|
|
199
220
|
/>
|
|
200
221
|
<button class="fe-s3keys__btn" :disabled="busy" data-testid="token-mint" @click="mint">
|
|
@@ -208,7 +229,7 @@ function usedLabel(row: ApiToken): string {
|
|
|
208
229
|
<input
|
|
209
230
|
v-model="label"
|
|
210
231
|
class="fe-cfield__input"
|
|
211
|
-
:placeholder="
|
|
232
|
+
:placeholder="labelPlaceholder()"
|
|
212
233
|
data-testid="token-label"
|
|
213
234
|
/>
|
|
214
235
|
|