ui tweaks

This commit is contained in:
Nazar Kanaev
2020-06-26 22:40:44 +01:00
parent 02ad42a52d
commit 312b4a54c1
5 changed files with 42 additions and 21 deletions

View File

@@ -6,6 +6,7 @@ var FILTERS = [
{'title': 'Starred', 'value': 'starred', 'icon': 'star'},
]
Vue.use(window['v-click-outside'])
var vm = new Vue({
el: '#app',
@@ -103,6 +104,22 @@ var vm = new Vue({
is_expanded: true,
})
},
renameFeed: function(feed) {
var newTitle = prompt('Enter new title', feed.title)
feed.title = newTitle
this.settingsManageDropdown = null
},
deleteFeed: function(feed) {
if (confirm('Are you sure you want to delete ' + feed.title + '?')) {
this.feeds = this.feeds.filter(function(f) { f.id != feed.id })
}
},
hideSettingsMenu: function() {
this.settingsManageDropdown = null
},
hideSettingsModal: function() {
this.settingsShow = false
},
}
})
vm.settingsShow = true

View File

@@ -0,0 +1,2 @@
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):e["v-click-outside"]=n()}(this,function(){var e="__v-click-outside",n="undefined"!=typeof window,t="undefined"!=typeof navigator,i=n&&("ontouchstart"in window||t&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"];function o(n,t){var o=function(e){var n="function"==typeof e;if(!n&&"object"!=typeof e)throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:n?e:e.handler,middleware:e.middleware||function(e){return e},events:e.events||i,isActive:!(!1===e.isActive)}}(t.value),r=o.handler,d=o.middleware;o.isActive&&(n[e]=o.events.map(function(e){return{event:e,handler:function(e){return function(e){var n=e.el,t=e.event,i=e.handler,o=e.middleware,r=t.path||t.composedPath&&t.composedPath(),d=r?r.indexOf(n)<0:!n.contains(t.target);t.target!==n&&d&&o(t)&&i(t)}({event:e,el:n,handler:r,middleware:d})}}}),n[e].forEach(function(t){var i=t.event,o=t.handler;return setTimeout(function(){n[e]&&document.documentElement.addEventListener(i,o,!1)},0)}))}function r(n){(n[e]||[]).forEach(function(e){return document.documentElement.removeEventListener(e.event,e.handler,!1)}),delete n[e]}var d=n?{bind:o,update:function(e,n){var t=n.value,i=n.oldValue;JSON.stringify(t)!==JSON.stringify(i)&&(r(e),o(e,{value:t}))},unbind:r}:{};return{install:function(e){e.directive("click-outside",d)},directive:d}});
//# sourceMappingURL=v-click-outside.umd.js.map