mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
revert: file-handling API test
This commit is contained in:
parent
d1c579948f
commit
326a5eef88
13
src/App.vue
13
src/App.vue
@ -10,7 +10,6 @@ import { storeToRefs } from 'pinia'
|
|||||||
import { useScreenStore, useMainStore, useSnapshotStore } from '@/store'
|
import { useScreenStore, useMainStore, useSnapshotStore } from '@/store'
|
||||||
import { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'
|
import { LOCALSTORAGE_KEY_DISCARDED_DB } from '@/configs/storage'
|
||||||
import { isPC } from './utils/common'
|
import { isPC } from './utils/common'
|
||||||
import useExport from './hooks/useExport'
|
|
||||||
|
|
||||||
import Editor from './views/Editor/index.vue'
|
import Editor from './views/Editor/index.vue'
|
||||||
import Screen from './views/Screen/index.vue'
|
import Screen from './views/Screen/index.vue'
|
||||||
@ -36,18 +35,6 @@ export default defineComponent({
|
|||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
snapshotStore.initSnapshotDatabase()
|
snapshotStore.initSnapshotDatabase()
|
||||||
mainStore.setAvailableFonts()
|
mainStore.setAvailableFonts()
|
||||||
|
|
||||||
const { importSpecificFile } = useExport()
|
|
||||||
|
|
||||||
if ('launchQueue' in window) {
|
|
||||||
/* eslint-disable-next-line */
|
|
||||||
(window as any).launchQueue.setConsumer(async (launchParams: any) => {
|
|
||||||
if (launchParams.files && launchParams.files.length) {
|
|
||||||
const files: File[] = launchParams.files
|
|
||||||
importSpecificFile(files, true)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 应用注销时向 localStorage 中记录下本次 indexedDB 的数据库ID,用于之后清除数据库
|
// 应用注销时向 localStorage 中记录下本次 indexedDB 的数据库ID,用于之后清除数据库
|
||||||
|
@ -67,16 +67,6 @@ module.exports = {
|
|||||||
type: 'image/png',
|
type: 'image/png',
|
||||||
purpose: 'maskable'
|
purpose: 'maskable'
|
||||||
}],
|
}],
|
||||||
file_handlers: [
|
|
||||||
{
|
|
||||||
action: '/',
|
|
||||||
accept: {
|
|
||||||
'application/vnd.pptist': '.pptist',
|
|
||||||
'*/*': '.pptist',
|
|
||||||
'application/vnd.openxmlformatsofficedocument.presentationml.presentation': '.pptx',
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
start_url: '.',
|
start_url: '.',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
background_color: '#000000',
|
background_color: '#000000',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user