diff --git a/components/forms/NewPodcastForm.vue b/components/forms/NewPodcastForm.vue
new file mode 100644
index 00000000..a91e4661
--- /dev/null
+++ b/components/forms/NewPodcastForm.vue
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Submit
+
+
+
+
+
\ No newline at end of file
diff --git a/components/ui/MultiSelect.vue b/components/ui/MultiSelect.vue
new file mode 100644
index 00000000..fb7397e1
--- /dev/null
+++ b/components/ui/MultiSelect.vue
@@ -0,0 +1,261 @@
+
+
+
{{ label }}
+
+
+
+
+
+
+
+ {{ item }}
+
+
+ checkmark
+
+
+
+
+
+ No Items
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/ui/TextInput.vue b/components/ui/TextInput.vue
index ed37523c..09480e23 100644
--- a/components/ui/TextInput.vue
+++ b/components/ui/TextInput.vue
@@ -1,6 +1,6 @@
-
+
{{ prependIcon }}
@@ -26,10 +26,6 @@ export default {
prependIcon: {
type: String,
default: null
- },
- textSize: {
- type: String,
- default: 'lg'
}
},
data() {
@@ -45,7 +41,7 @@ export default {
}
},
inputClass() {
- var classes = [`bg-${this.bg}`, `rounded-${this.rounded}`, `text-${this.textSize}`]
+ var classes = [`bg-${this.bg}`, `rounded-${this.rounded}`]
if (this.disabled) classes.push('text-gray-300')
else classes.push('text-white')
diff --git a/components/ui/TextareaInput.vue b/components/ui/TextareaInput.vue
new file mode 100644
index 00000000..55c007e2
--- /dev/null
+++ b/components/ui/TextareaInput.vue
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/ui/TextareaWithLabel.vue b/components/ui/TextareaWithLabel.vue
new file mode 100644
index 00000000..96f98c92
--- /dev/null
+++ b/components/ui/TextareaWithLabel.vue
@@ -0,0 +1,41 @@
+
+
+
{{ label }}
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/bookshelf/search.vue b/pages/bookshelf/search.vue
index 98a603e1..4c32c287 100644
--- a/pages/bookshelf/search.vue
+++ b/pages/bookshelf/search.vue
@@ -31,15 +31,15 @@
-
+
arrow_back
Back
-
-
Selected Podcast Feed
+
+
diff --git a/plugins/axios.js b/plugins/axios.js
index 55a49c2b..7d5a3d89 100644
--- a/plugins/axios.js
+++ b/plugins/axios.js
@@ -5,21 +5,21 @@ export default function ({ $axios, store }) {
return
}
- var customHeaders = store.getters['user/getCustomHeaders']
+ const customHeaders = store.getters['user/getCustomHeaders']
if (customHeaders) {
for (const key in customHeaders) {
config.headers.common[key] = customHeaders[key]
}
}
- var bearerToken = store.getters['user/getToken']
+ const bearerToken = store.getters['user/getToken']
if (bearerToken) {
config.headers.common['Authorization'] = `Bearer ${bearerToken}`
} else {
console.warn('[Axios] No Bearer Token for request')
}
- var serverUrl = store.getters['user/getServerAddress']
+ const serverUrl = store.getters['user/getServerAddress']
if (serverUrl) {
config.url = `${serverUrl}${config.url}`
}
diff --git a/plugins/init.client.js b/plugins/init.client.js
index f77d6f15..aab159f9 100644
--- a/plugins/init.client.js
+++ b/plugins/init.client.js
@@ -105,6 +105,43 @@ Vue.prototype.$secondsToTimestamp = (seconds) => {
return `${_hours}:${_minutes.toString().padStart(2, '0')}:${_seconds.toString().padStart(2, '0')}`
}
+Vue.prototype.$sanitizeFilename = (input, colonReplacement = ' - ') => {
+ if (typeof input !== 'string') {
+ return false
+ }
+
+ // Max is actually 255-260 for windows but this leaves padding incase ext wasnt put on yet
+ const MAX_FILENAME_LEN = 240
+
+ var replacement = ''
+ var illegalRe = /[\/\?<>\\:\*\|"]/g
+ var controlRe = /[\x00-\x1f\x80-\x9f]/g
+ var reservedRe = /^\.+$/
+ var windowsReservedRe = /^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i
+ var windowsTrailingRe = /[\. ]+$/
+ var lineBreaks = /[\n\r]/g
+
+ var sanitized = input
+ .replace(':', colonReplacement) // Replace first occurrence of a colon
+ .replace(illegalRe, replacement)
+ .replace(controlRe, replacement)
+ .replace(reservedRe, replacement)
+ .replace(lineBreaks, replacement)
+ .replace(windowsReservedRe, replacement)
+ .replace(windowsTrailingRe, replacement)
+
+
+ if (sanitized.length > MAX_FILENAME_LEN) {
+ var lenToRemove = sanitized.length - MAX_FILENAME_LEN
+ var ext = Path.extname(sanitized)
+ var basename = Path.basename(sanitized, ext)
+ basename = basename.slice(0, basename.length - lenToRemove)
+ sanitized = basename + ext
+ }
+
+ return sanitized
+}
+
function isClickedOutsideEl(clickEvent, elToCheckOutside, ignoreSelectors = [], ignoreElems = []) {
const isDOMElement = (element) => {
return element instanceof Element || element instanceof HTMLDocument