Skip to content
Snippets Groups Projects
Verified Commit f74e930d authored by Daniel Göbel's avatar Daniel Göbel
Browse files

Display a new folder not as file

#58
parent b460a4ba
No related branches found
No related tags found
2 merge requests!84Remove development branch,!52Resolve "Display new folder not as file"
This commit is part of merge request !52. Comments created here will be created in the context of that merge request.
......@@ -62,7 +62,7 @@ function uploadFolder() {
uploadModal?.hide();
successToast?.show();
emit("folder-created", {
key: key,
key: realKey,
bucket: props.bucketName,
size: 0,
last_modified: dayjs().toISOString(),
......
......@@ -72,9 +72,7 @@ const stringInput = ref<HTMLInputElement | undefined>(undefined);
const format = computed<string | undefined>(() => props.parameter["format"]);
const filesInBucket = computed<string[]>(() =>
keysInBucket.value.filter(
(obj) => !obj.endsWith("/") && !obj.endsWith(".s3keep")
)
keysInBucket.value.filter((obj) => !obj.endsWith("/"))
);
const foldersInBucket = computed<string[]>(() =>
......
......@@ -210,7 +210,7 @@ onMounted(() => {
role="status"
aria-hidden="true"
></span>
Save
View
</button>
</template>
</bootstrap-modal>
......
......@@ -20,16 +20,18 @@ export const useBucketStore = defineStore({
buckets: [],
ownPermissions: {},
_lastFetchBucketPromise: undefined,
_bla: 0,
_lastFetchBucketPromiseTimestamp: 0,
} as {
buckets: BucketOut[];
ownPermissions: Record<string, BucketPermissionOut>;
_lastFetchBucketPromise?: CancelablePromise<never>;
_bla: number;
_lastFetchBucketPromiseTimestamp: number;
}),
getters: {
ownBucketsAndFullPermissions(): string[] {
const authStore = useAuthStore();
const names = this.buckets
.filter((bucket) => bucket.owner === authStore.currentUID)
.map((bucket) => bucket.name)
.concat(
Object.values(this.ownPermissions)
......@@ -153,8 +155,8 @@ export const useBucketStore = defineStore({
* then no API call will be made and the last one reused
*/
const currentTime = new Date().getTime();
if (currentTime - this._bla > 5000) {
this._bla = currentTime;
if (currentTime - this._lastFetchBucketPromiseTimestamp > 5000) {
this._lastFetchBucketPromiseTimestamp = currentTime;
const authStore = useAuthStore();
if (this.buckets.length > 0) {
onFinally?.();
......
......@@ -3,6 +3,7 @@ import type { S3Key } from "@/client/s3proxy";
import { ref, watch } from "vue";
import FontAwesomeIcon from "@/components/FontAwesomeIcon.vue";
import DeleteModal from "@/components/modals/DeleteModal.vue";
import { environment } from "../../environment";
const props = defineProps<{
s3key: S3Key;
......@@ -37,6 +38,8 @@ function deleteKeyTrigger() {
:back-modal-id="undefined"
@confirm-delete="deleteKeyTrigger"
/>
<h3>S3 Endpoint:</h3>
<div class="fs-4 mb-4">{{ environment.S3_URL }}</div>
<h3>Access Key:</h3>
<div v-if="props.loading" class="placeholder-glow">
<span class="placeholder col-5 mt-3 mb-2 fs-4"></span><br />
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment