Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 0 additions & 63 deletions .github/workflows/deploy-pages.yml

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@json.ms/www",
"private": true,
"type": "module",
"version": "1.2.18",
"version": "1.2.19",
"scripts": {
"dev": "vite --host",
"build": "run-p type-check \"build-only {@}\" --",
Expand Down
4 changes: 2 additions & 2 deletions src/components/ActionBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {useStructure} from '@/composables/structure';
import {useLayout} from '@/composables/layout';
import {useGlobalStore} from '@/stores/global';
import {computed} from "vue";
import {useTypings} from "@/composables/typings";
import {useSyncing} from "@/composables/syncing";
import {useModelStore} from "@/stores/model";
import TriggerMenu from "@/components/TriggerMenu.vue";
import type {IStructure, IStructureData} from "@/interfaces";
Expand Down Expand Up @@ -45,7 +45,7 @@ const onSetAsDefaultValues = () => {
}

const onSyncWithLocalOnly = () => {
useTypings().syncToFolder(modelStore.structure, 'typescript', ['data']);
useSyncing().syncToFolder(modelStore.structure, ['data']);
userDataSaved.value = true;
setTimeout(() => userDataSaved.value = false, 1000);
}
Expand Down
13 changes: 8 additions & 5 deletions src/components/FileFieldItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import {useDisplay} from "vuetify";
import {useGlobalStore} from "@/stores/global";
import ImgTag from "@/components/ImgTag.vue";
import VideoPlayer from "@/components/VideoPlayer.vue";
import {blobFileList} from "@/composables/syncing";

const value = defineModel<any>({ required: true });
const {
Expand Down Expand Up @@ -40,12 +41,15 @@ const thumbnailSize = (file: IFile): { width: number, height: number } => {
};
}
const isImage = (file: IFile): boolean => {
return file.meta.type.startsWith('image/');
return file.meta.type?.startsWith('image/') || false;
}
const isVideo = (file: IFile): boolean => {
return file.meta.type.startsWith('video/');
return file.meta.type?.startsWith('video/') || false;
}
const src = computed((): string => {
if (file.path && blobFileList[file.path]) {
return blobFileList[file.path];
}
if (file.path && (file.path.startsWith('http://') || file.path.startsWith('https://'))) {
return file.path;
}
Expand All @@ -60,7 +64,7 @@ const onDownloadFile = (file: IFile) => {
.then(blob => {
const link = document.createElement('a');
link.href = URL.createObjectURL(blob);
link.download = file.meta.originalFileName;
link.download = file.meta.originalFileName || 'unknown';
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
Expand Down Expand Up @@ -155,12 +159,11 @@ const onRemoveFile = (file: IFile) => {
v-bind="props"
:disabled="disabled"
:size="smAndDown ? 'small' : 'default'"
color="error"
variant="text"
icon
@click="() => onRemoveFile(file)"
>
<v-icon icon="mdi-trash-can-outline" />
<v-icon icon="mdi-close" />
</v-btn>
</template>
</v-tooltip>
Expand Down
Loading