add security icons
This commit is contained in:
@@ -12,10 +12,21 @@
|
|||||||
class="w-full border-1 rounded-2 bg-white text-sm mt-2">
|
class="w-full border-1 rounded-2 bg-white text-sm mt-2">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="file of fileList" :key="file.id">
|
<tr v-for="file of fileList" :key="file.id">
|
||||||
<td class="py-2 pl-2 hidden sm:block">
|
<td class="py-2 pl-2 hidden sm:block relative">
|
||||||
<img
|
<img
|
||||||
:src="getFileIconImagePath(file.name || file.title)"
|
:src="getFileIconImagePath(file.name || file.title)"
|
||||||
class="h-10 text-center" />
|
class="h-10 text-center" />
|
||||||
|
<div
|
||||||
|
v-if="file.security_type != ''"
|
||||||
|
class="absolute right--1 top-0 h-4 w-4">
|
||||||
|
<svg
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
viewBox="0 0 24 24">
|
||||||
|
<title>locked</title>
|
||||||
|
<path
|
||||||
|
d="M12,17A2,2 0 0,0 14,15C14,13.89 13.1,13 12,13A2,2 0 0,0 10,15A2,2 0 0,0 12,17M18,8A2,2 0 0,1 20,10V20A2,2 0 0,1 18,22H6A2,2 0 0,1 4,20V10C4,8.89 4.9,8 6,8H7V6A5,5 0 0,1 12,1A5,5 0 0,1 17,6V8H18M12,3A3,3 0 0,0 9,6V8H15V6A3,3 0 0,0 12,3Z" />
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td class="pl-2 py-4 w-full">
|
<td class="pl-2 py-4 w-full">
|
||||||
<a :href="file.url" target="_blank">{{
|
<a :href="file.url" target="_blank">{{
|
||||||
@@ -23,7 +34,7 @@
|
|||||||
}}</a>
|
}}</a>
|
||||||
</td>
|
</td>
|
||||||
<td class="pr-2">
|
<td class="pr-2">
|
||||||
<a :href="file.url + '?download=1'"
|
<a :href="file.url"
|
||||||
><svg
|
><svg
|
||||||
viewBox="0 0 24 24"
|
viewBox="0 0 24 24"
|
||||||
fill="none"
|
fill="none"
|
||||||
@@ -83,8 +94,6 @@ import { openDialog } from "../components/SMDialog";
|
|||||||
import SMDialogMedia from "./dialogs/SMDialogMedia.vue";
|
import SMDialogMedia from "./dialogs/SMDialogMedia.vue";
|
||||||
import { Media } from "../helpers/api.types";
|
import { Media } from "../helpers/api.types";
|
||||||
import { onMounted, ref, watch } from "vue";
|
import { onMounted, ref, watch } from "vue";
|
||||||
import { ImportMetaExtras } from "../../../import-meta";
|
|
||||||
import { strCaseCmp } from "../helpers/string";
|
|
||||||
import { mediaGetWebURL } from "../helpers/media";
|
import { mediaGetWebURL } from "../helpers/media";
|
||||||
|
|
||||||
const emits = defineEmits(["update:modelValue"]);
|
const emits = defineEmits(["update:modelValue"]);
|
||||||
@@ -109,6 +118,7 @@ const fileList = ref([]);
|
|||||||
const handleClickAdd = async () => {
|
const handleClickAdd = async () => {
|
||||||
if (props.showEditor) {
|
if (props.showEditor) {
|
||||||
let result = await openDialog(SMDialogMedia, {
|
let result = await openDialog(SMDialogMedia, {
|
||||||
|
initial: fileList.value,
|
||||||
mime: "",
|
mime: "",
|
||||||
accepts: "",
|
accepts: "",
|
||||||
allowUpload: true,
|
allowUpload: true,
|
||||||
@@ -158,6 +168,7 @@ const updateFileList = (newFileList: Array<Media>) => {
|
|||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
|
|
||||||
for (const mediaItem of newFileList) {
|
for (const mediaItem of newFileList) {
|
||||||
|
console.log(mediaItem.url);
|
||||||
mediaItem.url = mediaGetWebURL(mediaItem);
|
mediaItem.url = mediaGetWebURL(mediaItem);
|
||||||
if (mediaItem.url != "") {
|
if (mediaItem.url != "") {
|
||||||
fileList.value.push(mediaItem);
|
fileList.value.push(mediaItem);
|
||||||
|
|||||||
Reference in New Issue
Block a user