V0.2.1 - small bugfixes (#58)
Co-authored-by: Graham Steffaniak <graham.steffaniak@autodesk.com>
This commit is contained in:
parent
47e1975c12
commit
9b57eb1060
|
@ -9,15 +9,7 @@ __webpack_public_path__ = window.FileBrowser.StaticURL + "/";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "app",
|
name: "app",
|
||||||
computed: {
|
computed: {},
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
const loading = document.getElementById("loading");
|
|
||||||
loading.classList.add("done");
|
|
||||||
setTimeout(() => {
|
|
||||||
loading.parentNode.removeChild(loading);
|
|
||||||
}, 200);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@
|
||||||
<div v-if="isMobile && active" id="result" :class="{ hidden: !active }" ref="result">
|
<div v-if="isMobile && active" id="result" :class="{ hidden: !active }" ref="result">
|
||||||
<div id="result-list">
|
<div id="result-list">
|
||||||
<div class="button" style="width: 100%">
|
<div class="button" style="width: 100%">
|
||||||
Search Context: {{ getContext(this.$route.path) }}
|
Search Context: {{ this.searchContext }}
|
||||||
</div>
|
</div>
|
||||||
<ul v-show="results.length > 0">
|
<ul v-show="results.length > 0">
|
||||||
<li
|
<li
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
<i v-else-if="s.archive" class="material-icons archive-icons"> archive </i>
|
<i v-else-if="s.archive" class="material-icons archive-icons"> archive </i>
|
||||||
<i v-else class="material-icons file-icons"> insert_drive_file </i>
|
<i v-else class="material-icons file-icons"> insert_drive_file </i>
|
||||||
<span class="text-container">
|
<span class="text-container">
|
||||||
{{ basePath(s.path) }}<b>{{ baseName(s.path) }}</b>
|
{{ basePath(s.path,s.dir) }}<b>{{ baseName(s.path) }}</b>
|
||||||
</span>
|
</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!isMobile && active" id="result-desktop" ref="result">
|
<div v-show="!isMobile && active" id="result-desktop" ref="result">
|
||||||
<div class="searchContext">Search Context: {{ getContext(this.$route.path) }}</div>
|
<div class="searchContext">Search Context: {{ this.searchContext }}</div>
|
||||||
<div id="result-list">
|
<div id="result-list">
|
||||||
<template>
|
<template>
|
||||||
<p v-show="isEmpty && isRunning" id="renew">
|
<p v-show="isEmpty && isRunning" id="renew">
|
||||||
|
@ -178,7 +178,7 @@
|
||||||
<i v-else-if="s.archive" class="material-icons archive-icons"> archive </i>
|
<i v-else-if="s.archive" class="material-icons archive-icons"> archive </i>
|
||||||
<i v-else class="material-icons file-icons"> insert_drive_file </i>
|
<i v-else class="material-icons file-icons"> insert_drive_file </i>
|
||||||
<span class="text-container">
|
<span class="text-container">
|
||||||
{{ basePath(s.path) }}<b>{{ baseName(s.path) }}</b>
|
{{ basePath(s.path,s.dir) }}<b>{{ baseName(s.path) }}</b>
|
||||||
</span>
|
</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</li>
|
</li>
|
||||||
|
@ -535,6 +535,7 @@ export default {
|
||||||
name: "search",
|
name: "search",
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
|
searchContext: "./",
|
||||||
largerThan: "",
|
largerThan: "",
|
||||||
smallerThan: "",
|
smallerThan: "",
|
||||||
noneMessage: "Start typing 3 or more characters to begin searching.",
|
noneMessage: "Start typing 3 or more characters to begin searching.",
|
||||||
|
@ -602,7 +603,7 @@ export default {
|
||||||
...mapState(["user", "show"]),
|
...mapState(["user", "show"]),
|
||||||
...mapGetters(["isListing"]),
|
...mapGetters(["isListing"]),
|
||||||
isDarkMode() {
|
isDarkMode() {
|
||||||
return this.user && this.user.darkMode ? this.user.darkMode : darkMode;
|
return this.user && Object.prototype.hasOwnProperty.call(this.user, "darkMode") ? this.user.darkMode : darkMode;
|
||||||
},
|
},
|
||||||
showBoxes() {
|
showBoxes() {
|
||||||
return this.searchTypes == "";
|
return this.searchTypes == "";
|
||||||
|
@ -634,6 +635,7 @@ export default {
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
window.addEventListener("resize", this.handleResize);
|
window.addEventListener("resize", this.handleResize);
|
||||||
|
this.searchContext = this.getContext(this.$route.path)
|
||||||
this.handleResize(); // Call this once to set the initial width
|
this.handleResize(); // Call this once to set the initial width
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -650,15 +652,18 @@ export default {
|
||||||
let path = "./" + url.substring(url.indexOf("/") + 1);
|
let path = "./" + url.substring(url.indexOf("/") + 1);
|
||||||
return path.replace(/\/+$/, "") + "/";
|
return path.replace(/\/+$/, "") + "/";
|
||||||
},
|
},
|
||||||
basePath(str) {
|
basePath(str,isDir) {
|
||||||
let parts = str.split("/");
|
let parts = str.replace(/(\/$|^\/)/, "").split("/");
|
||||||
if (parts.length <= 2) {
|
if (parts.length <= 2) {
|
||||||
return "/";
|
if (isDir) {
|
||||||
|
return "/"
|
||||||
|
}
|
||||||
|
return "";
|
||||||
}
|
}
|
||||||
parts.pop();
|
parts.pop();
|
||||||
parts = parts.join("/") + "/";
|
parts = parts.join("/") + "/";
|
||||||
if (str.endsWith("/")) {
|
if (isDir) {
|
||||||
parts = "/" + parts;
|
parts = "/" + parts; // fix weird rtl thing
|
||||||
}
|
}
|
||||||
return parts;
|
return parts;
|
||||||
},
|
},
|
||||||
|
|
|
@ -129,7 +129,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["user"]),
|
...mapState(["user"]),
|
||||||
isDarkMode() {
|
isDarkMode() {
|
||||||
return this.user && this.user.darkMode ? this.user.darkMode : darkMode;
|
return this.user && Object.prototype.hasOwnProperty.call(this.user, "darkMode") ? this.user.darkMode : darkMode;
|
||||||
},
|
},
|
||||||
...mapGetters(["isLogged"]),
|
...mapGetters(["isLogged"]),
|
||||||
active() {
|
active() {
|
||||||
|
|
|
@ -48,7 +48,7 @@ export default {
|
||||||
...mapGetters(["isLogged", "progress", "isListing"]),
|
...mapGetters(["isLogged", "progress", "isListing"]),
|
||||||
...mapState(["req", "user", "state"]),
|
...mapState(["req", "user", "state"]),
|
||||||
isDarkMode() {
|
isDarkMode() {
|
||||||
return this.user && this.user.darkMode ? this.user.darkMode : darkMode;
|
return this.user && Object.prototype.hasOwnProperty.call(this.user, "darkMode") ? this.user.darkMode : darkMode;
|
||||||
},
|
},
|
||||||
isExecEnabled: () => enableExec,
|
isExecEnabled: () => enableExec,
|
||||||
currentView() {
|
currentView() {
|
||||||
|
|
|
@ -133,7 +133,7 @@ export default {
|
||||||
computed: {
|
computed: {
|
||||||
...mapState(["req", "user", "oldReq", "jwt", "loading", "show"]),
|
...mapState(["req", "user", "oldReq", "jwt", "loading", "show"]),
|
||||||
isDarkMode() {
|
isDarkMode() {
|
||||||
return this.user && this.user.darkMode ? this.user.darkMode : darkMode;
|
return this.user && Object.prototype.hasOwnProperty.call(this.user, "darkMode") ? this.user.darkMode : darkMode;
|
||||||
},
|
},
|
||||||
hasPrevious() {
|
hasPrevious() {
|
||||||
return this.previousLink !== "";
|
return this.previousLink !== "";
|
||||||
|
|
Loading…
Reference in New Issue