Selaa lähdekoodia

Merge branch 'master' of git.bubblev.org:bubblev/bubble-web into fix/missing-functionalities

pull/60/head
Tyler Chen 4 vuotta sitten
vanhempi
commit
c7ddf03330
2 muutettua tiedostoa jossa 93 lisäystä ja 26 poistoa
  1. +51
    -26
      src/_components/FormField.vue
  2. +42
    -0
      src/_router/index.js

+ 51
- 26
src/_components/FormField.vue Näytä tiedosto

@@ -1,34 +1,59 @@
<!-- Copyright (c) 2020 Bubble, Inc. All rights reserved. For personal (non-commercial) use, see license: https://getbubblenow.com/bubble-license/ -->
<template>
<div v-if="field" class="form-group">
<div v-if="field" class="form-group">
<label :htmlFor="field.name">
{{ messages[messagePrefix + field.name] }}:
</label>

<label :htmlFor="field">{{messages[messagePrefix+field.name]}}:</label>

<span v-if="field.mode === 'readOnly' && field.control === 'flag'"><b>{{messages['message_'+thing[field.name]]}}</b></span>
<span v-else-if="field.mode === 'readOnly'"><b>{{thing[field.name]}}</b></span>
<textarea v-else-if="field.control === 'textarea' || (textLimit != null && (''+thing[field.name]).length > textLimit)" v-model="thing[field.name]" class="form-control"></textarea>
<input v-else-if="field.control === 'flag'" type="checkbox" v-model="thing[field.name]" :name="field" class="form-control" />
<input v-else type="text" v-model="thing[field.name]" :name="field" class="form-control" />

<small v-if="messages['!'+messagePrefix+field.name+'_description']">{{messages[messagePrefix+field.name+'_description']}}</small>
<!-- <div v-if="errors.has(field)" class="invalid-feedback d-block">{{ errors.first(field) }}</div>-->
</div>
<span v-if="field.mode === 'readOnly' && field.control === 'flag'">
<b>{{ messages["message_" + thing[field.name]] }}</b>
</span>
<span v-else-if="field.mode === 'readOnly'">
<b>{{ thing[field.name] }}</b>
</span>
<textarea
v-else-if="
field.control === 'textarea' ||
(textLimit != null && ('' + thing[field.name]).length > textLimit)
"
v-model="thing[field.name]"
class="form-control"
></textarea>
<input
v-else-if="field.control === 'flag'"
type="checkbox"
v-model="thing[field.name]"
:name="field.name"
class="form-control"
/>
<input
v-else
type="text"
v-model="thing[field.name]"
:name="field.name"
class="form-control"
/>

<small v-if="messages['!' + messagePrefix + field.name + '_description']">{{
messages[messagePrefix + field.name + "_description"]
}}</small>
<!-- <div v-if="errors.has(field)" class="invalid-feedback d-block">{{ errors.first(field) }}</div>-->
</div>
</template>

<script>
import { mapState, mapActions } from 'vuex';
import { util } from '~/_helpers'
import { mapState, mapActions } from "vuex";
import { util } from "~/_helpers";

export default {
props: {
messagePrefix: String,
field: Object,
thing: Object,
textLimit: Number
},
computed: {
...mapState('system', ['messages'])
}
}
</script>
export default {
props: {
messagePrefix: String,
field: Object,
thing: Object,
textLimit: Number,
},
computed: {
...mapState("system", ["messages"]),
},
};
</script>

+ 42
- 0
src/_router/index.js Näytä tiedosto

@@ -209,6 +209,48 @@ export const router = new Router({
},
],
},
{
path: '',
component: () => import('~/_pages/auth/Layout'),
children: [
{ path: '', component: DashboardPage },
{
path: 'me/download/:uuid',
redirect: (r) => ({
path: 'me/policy',
query: { download: r.params.uuid },
}),
},
{ path: 'me/action', component: ActionPage },
{ path: 'apps', component: AppsPage },
{ path: 'app/:app', component: AppPage },
{ path: 'app/:app/config/:view', component: AppConfigPage },
{
path: 'app/:app/config/:view/:item',
component: AppConfigPage,
},
{ path: 'app/:app/view/:view', component: AppDataViewPage },
{ path: 'app/:app/site/:site', component: AppSitePage },
{
path: 'app/:app/site/:site/view/:view',
component: AppDataViewPage,
},
{ path: 'notifications', component: NotificationsPage },
{
path: 'appLogin',
component: () => import('~/_pages/auth/AppLogin'),
},
{
path: 'verifyEmail',
component: () => import('~/_pages/auth/VerifyEmail'),
},
{
path: 'payment',
component: () => import('~/_pages/auth/Payment'),
},
{ path: 'logout', component: () => import('~/auth/LogoutPage') },
],
},
{
path: '',
component: () => import('~/_pages/auth/Layout'),


Ladataan…
Peruuta
Tallenna