| 1 |
import './helpers'; |
| 2 |
|
| 3 |
import Vue from 'vue'; |
| 4 |
import Router from 'vue-router'; |
| 5 |
|
| 6 |
import Errors from '../common/Errors'; |
| 7 |
import ajaxCaller from './ajaxCaller'; |
| 8 |
import jQueryActions from './jquery-actions'; |
| 9 |
import locale from 'element-ui/lib/locale'; |
| 10 |
import lang from 'element-ui/lib/locale/lang/en'; |
| 11 |
|
| 12 |
import { |
| 13 |
Button, |
| 14 |
Row, |
| 15 |
Col, |
| 16 |
Radio, |
| 17 |
Checkbox, |
| 18 |
CheckboxGroup, |
| 19 |
RadioGroup, |
| 20 |
Select, |
| 21 |
Option, |
| 22 |
OptionGroup, |
| 23 |
Input, |
| 24 |
Form, |
| 25 |
FormItem, |
| 26 |
Tooltip, |
| 27 |
Switch, |
| 28 |
InputNumber, |
| 29 |
DatePicker, |
| 30 |
Table, |
| 31 |
TableColumn, |
| 32 |
Popover, |
| 33 |
Dropdown, |
| 34 |
DropdownMenu, |
| 35 |
DropdownItem, |
| 36 |
Collapse, |
| 37 |
CollapseItem, |
| 38 |
Slider, |
| 39 |
Tag, |
| 40 |
Loading, |
| 41 |
Message, |
| 42 |
Notification, |
| 43 |
Dialog, |
| 44 |
MessageBox, |
| 45 |
ButtonGroup, |
| 46 |
ColorPicker, |
| 47 |
Tabs, |
| 48 |
TabPane, |
| 49 |
} from 'element-ui'; |
| 50 |
|
| 51 |
global.Errors = Errors; |
| 52 |
global.ffSettingsEvents = new Vue(); |
| 53 |
|
| 54 |
// Set locale |
| 55 |
locale.use(lang); |
| 56 |
Vue.use(Router); |
| 57 |
|
| 58 |
Vue.use(CollapseItem); |
| 59 |
Vue.use(DropdownMenu); |
| 60 |
Vue.use(DropdownItem); |
| 61 |
Vue.use(Tag); |
| 62 |
Vue.use(Slider); |
| 63 |
Vue.use(ColorPicker); |
| 64 |
Vue.use(RadioGroup); |
| 65 |
Vue.use(Dropdown); |
| 66 |
Vue.use(ButtonGroup); |
| 67 |
Vue.use(Collapse); |
| 68 |
Vue.use(Checkbox); |
| 69 |
Vue.use(CheckboxGroup); |
| 70 |
Vue.use(Popover); |
| 71 |
Vue.use(Button); |
| 72 |
Vue.use(Select); |
| 73 |
Vue.use(Radio); |
| 74 |
Vue.use(Table); |
| 75 |
Vue.use(Row); |
| 76 |
Vue.use(Col); |
| 77 |
Vue.use(Form); |
| 78 |
Vue.use(Input); |
| 79 |
Vue.use(Option); |
| 80 |
Vue.use(OptionGroup); |
| 81 |
Vue.use(Switch); |
| 82 |
Vue.use(Dialog); |
| 83 |
Vue.use(Tooltip); |
| 84 |
Vue.use(FormItem); |
| 85 |
Vue.use(DatePicker); |
| 86 |
Vue.use(ajaxCaller); |
| 87 |
Vue.use(TableColumn); |
| 88 |
Vue.use(InputNumber); |
| 89 |
Vue.use(jQueryActions); |
| 90 |
Vue.use(Tabs); |
| 91 |
Vue.use(TabPane); |
| 92 |
|
| 93 |
Vue.use(Loading.directive); |
| 94 |
|
| 95 |
Vue.prototype.$message = Message; |
| 96 |
Vue.prototype.$notify = Notification; |
| 97 |
Vue.prototype.$loading = Loading.service; |
| 98 |
Vue.prototype.$confirm = MessageBox.confirm; |
| 99 |
|
| 100 |
Vue.mixin({ |
| 101 |
filters: { |
| 102 |
ucFirst(string) { |
| 103 |
return string.charAt(0).toUpperCase() + string.slice(1); |
| 104 |
}, |
| 105 |
_startCase(string) { |
| 106 |
return _ff.startCase(string); |
| 107 |
} |
| 108 |
}, |
| 109 |
methods: { |
| 110 |
$t(str) { |
| 111 |
return str; |
| 112 |
} |
| 113 |
}, |
| 114 |
}); |
| 115 |
|
| 116 |
import Slack from './components/settings/Slack.vue'; |
| 117 |
import Zapier from './components/settings/Zapier.vue'; |
| 118 |
import LandingPages from './components/settings/LandingPages.vue'; |
| 119 |
import ConversationalForms from './components/settings/ConversationalForms.vue'; |
| 120 |
import PostFeeds from './components/settings/PostFeeds.vue'; |
| 121 |
import BasicSettings from './components/settings/FormSettings.vue'; |
| 122 |
import Confirmations from './components/settings/Confirmations.vue'; |
| 123 |
import EmailNotifications from './components/settings/Notifications.vue'; |
| 124 |
import WebHook from './components/settings/WebHook/WebHook'; |
| 125 |
import CustomCssJs from './components/settings/FormCustomCssJs'; |
| 126 |
import GeneralIntegration from './components/settings/GeneralIntegration/Integration'; |
| 127 |
import EditGeneralIntegration from './components/settings/GeneralIntegration/IntegrationEditor.vue'; |
| 128 |
import PdfFeeds from './components/settings/PdfFeeds.vue'; |
| 129 |
import PaymentSettings from './components/settings/PaymentSettings'; |
| 130 |
const routes = [ |
| 131 |
{ |
| 132 |
path: '*', |
| 133 |
name: 'formSettingsHome', |
| 134 |
component: BasicSettings |
| 135 |
}, |
| 136 |
{ |
| 137 |
path: '/payment-settings', |
| 138 |
name: 'payment_settings', |
| 139 |
component: PaymentSettings |
| 140 |
}, |
| 141 |
{ |
| 142 |
path: '/post-feeds', |
| 143 |
name: 'post_feeds', |
| 144 |
component: PostFeeds |
| 145 |
}, |
| 146 |
{ |
| 147 |
path: '/slack', |
| 148 |
name: 'slack', |
| 149 |
component: Slack |
| 150 |
}, |
| 151 |
{ |
| 152 |
path: '/email-settings', |
| 153 |
name: 'formEmailSettings', |
| 154 |
component: EmailNotifications |
| 155 |
}, |
| 156 |
{ |
| 157 |
path: '/pdf-feeds', |
| 158 |
name: 'PdfFeeds', |
| 159 |
component: PdfFeeds |
| 160 |
}, |
| 161 |
{ |
| 162 |
path: '/other-confirmations', |
| 163 |
name: 'formOtherConfirmations', |
| 164 |
component: Confirmations |
| 165 |
}, |
| 166 |
{ |
| 167 |
path: '/all-integrations', |
| 168 |
name: 'allIntegrations', |
| 169 |
component: GeneralIntegration |
| 170 |
}, |
| 171 |
{ |
| 172 |
path: '/all-integrations/:integration_id/:integration_name', |
| 173 |
name: 'edit_integration', |
| 174 |
component: EditGeneralIntegration |
| 175 |
}, |
| 176 |
{ |
| 177 |
path: '/custom-css-js', |
| 178 |
name: 'custom-css-js', |
| 179 |
component: CustomCssJs |
| 180 |
}, |
| 181 |
{ |
| 182 |
path: '/webhook', |
| 183 |
name: 'webhook', |
| 184 |
component: WebHook |
| 185 |
}, |
| 186 |
{ |
| 187 |
path: '/zapier', |
| 188 |
name: 'zapier', |
| 189 |
component: Zapier |
| 190 |
}, |
| 191 |
{ |
| 192 |
path: '/landing_pages', |
| 193 |
name: 'landing_pages', |
| 194 |
component: LandingPages |
| 195 |
}, |
| 196 |
{ |
| 197 |
path: '/conversational_forms', |
| 198 |
name: 'conversational_forms', |
| 199 |
component: ConversationalForms |
| 200 |
} |
| 201 |
]; |
| 202 |
|
| 203 |
const router = new Router({ |
| 204 |
routes: routes |
| 205 |
}); |
| 206 |
|
| 207 |
import App from './components/settings/SettingsApp'; |
| 208 |
|
| 209 |
const app = new Vue({ |
| 210 |
el: '#ff_form_settings_app', |
| 211 |
render: h => h(App), |
| 212 |
router: router |
| 213 |
}); |
| 214 |
|