diff --git a/web/satellite/src/components/browser/FileBrowser.vue b/web/satellite/src/components/browser/FileBrowser.vue index dfafcb674..db0c2049a 100644 --- a/web/satellite/src/components/browser/FileBrowser.vue +++ b/web/satellite/src/components/browser/FileBrowser.vue @@ -92,7 +92,7 @@
- | + |
-
- {{ filename }}
+ |
- + |
{{
size
}}
@@ -370,9 +369,14 @@
import { Component, Prop, Vue } from "vue-property-decorator";
import type { BrowserFile } from "@/types/browser";
import prettyBytes from "pretty-bytes";
+import MiddleTruncate from "./MiddleTruncate.vue";
// @vue/component
-@Component
+@Component({
+ components: {
+ MiddleTruncate,
+ }
+})
export default class FileEntry extends Vue {
public deleteConfirmation = false;
@@ -385,9 +389,7 @@ export default class FileEntry extends Vue {
* Return the name of file/folder formatted.
*/
public get filename(): string {
- return this.file.Key.length > 25
- ? this.file.Key.slice(0, 25) + "..."
- : this.file.Key;
+ return this.file.Key
}
/**
@@ -768,9 +770,12 @@ a {
}
.file-name {
+ position: relative;
margin-left: 5px;
cursor: pointer;
color: #000;
+ display: flex;
+ align-items: center;
}
.file-name:hover {
diff --git a/web/satellite/src/components/browser/MiddleTruncate.vue b/web/satellite/src/components/browser/MiddleTruncate.vue
new file mode 100644
index 000000000..aada96520
--- /dev/null
+++ b/web/satellite/src/components/browser/MiddleTruncate.vue
@@ -0,0 +1,53 @@
+// Copyright (C) 2022 Storj Labs, Inc.
+// See LICENSE for copying information.
+
+
+
+
+
+
+
+
+
\ No newline at end of file
{{ textFirstPart }}
+ {{ textLastPart }}
+ |
---|