-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.vue
154 lines (134 loc) · 4.37 KB
/
app.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<script setup>
import { firebaseStore } from "./stores/firebaseStore";
firebaseStore.initDb()
// firebaseSync();
// onMounted(() => {
// storageSync("toStore");
// });
// watch(store, (newData) => {
// storageSync("toLocalStorage");
// if (hasMatchingURLs(store.data, store.unsupportedLinks)) {
// store.unsupportedLinks = store.unsupportedLinks.filter(
// (x) => !store.data.some((y) => y.url === x.url)
// );
// }
// });
const title = ref('')
const n = ref({
title: 'wd33w',
id: 13423,
category: 'e'
})
import { doc, setDoc } from "firebase/firestore";
const cityRef = doc(firebaseStore.db, '20240927/BJ/fw/newdoc');
</script>
<template>
<FloatNav />
<div class="w-svw h-svh items-center justify-center pt-14">
<!-- <EditTab /> -->
<ImportTab />
<!-- <ExportTab /> -->
<!-- <v-text-field
class="px-4"
v-model="n.title"
label="Title"
></v-text-field>
<v-btn @click="firebaseStore.createDoc(n)">
Save
</v-btn> -->
</div>
<!-- <v-layout class="rounded rounded-md">
<v-main height="100vh" class="flex flex-col items-start justify-start">
<v-toolbar color="primary">
<v-toolbar-title>JDMS</v-toolbar-title>
<v-tabs v-model="tab">
<v-tab prepend-icon="mdi-download">Import</v-tab>
<v-tab
:disabled="store.data.length == 0"
v-for="nav in store.navCategories"
:value="nav"
>{{ nav }}</v-tab
>
<v-tab prepend-icon="mdi-export">Export</v-tab>
</v-tabs>
</v-toolbar>
<v-tabs-window v-model="tab" class="px-6 py-6 overflow-auto w-full">
<v-tabs-window-item value="Import">
<div class="flex flex-row">
<v-list lines="one">
<v-list-subheader>Manual Intervention Required: </v-list-subheader
><v-btn size="small" class="ml-4" variant="outlined"
>What is Manual Intervention?</v-btn
>
<v-list-item
v-for="link in store.data.length == 0
? store.unsupportedLinks.filter(
(link) =>
!new Set(store.data.map((obj) => obj.url)).has(link)
)
: store.unsupportedLinks"
:title="link.url"
a
target="_blank"
rel="noopener noreferrer"
:href="link.url"
></v-list-item> </v-list
><div class="flex flex-col gap-4 items-center justify-center w-full">
<div class="flex flex-row-reverse items-center justify-between w-full">
<v-btn
prepend-icon="mdi-download"
variant="tonal"
:class="
isLoading
? 'w-fit flex gap-4 '
: isSuccess
? 'w-fit flex gap-4 '
: ' w-fit flex gap-4 '
"
:loading="isLoading"
@click="submitForm"
>
Import Links
</v-btn>
<v-btn prepend-icon="mdi-info" size="small" variant="outlined"
>What can I import?</v-btn
>
</div>
<v-alert
v-show="errorMsg !== ''"
density="compact"
class="mx-4"
type="warning"
>{{ errorMsg }}</v-alert
>
<v-textarea
autofocus="true"
label="Links"
v-model="inputLinks"
name="input-7-1"
variant="filled"
class="w-full"
auto-grow
></v-textarea>
</div>
</div>
</v-tabs-window-item>
<v-tabs-window-item v-for="nav in store.navCategories" :value="nav">
<EditWindow :items="store.data.filter((x) => x.category == nav)" />
</v-tabs-window-item>
<v-tabs-window-item value="Export">
</v-tabs-window-item>
</v-tabs-window>
</v-main>
</v-layout> -->
</template>
<style>
:root {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
font-smooth: auto;
}
html {
overflow-y: auto;
}
</style>