Giter VIP home page Giter VIP logo

Comments (3)

nolimits4web avatar nolimits4web commented on June 26, 2024

Can you please post your main app.vue template?

from framework7-vue.

JCKodel avatar JCKodel commented on June 26, 2024

main.js

import Vue from "vue";
import Framework7 from "framework7/framework7.esm.bundle";
import Framework7Vue from "framework7-vue/framework7-vue.esm.bundle";
import "./assets/less/framework7.less";
import "./assets/sass/app.scss";
import App from "./app.vue";
import WebScaleFX from "./WebScaleFX-FrontEnd/WebScaleFX";
import store from "./store";

Framework7.use(Framework7Vue);
Vue.use(WebScaleFX);

new Vue({
	el: "#app",
	template: "<app/>",
	components: { app: App },
	store
});

app.vue

<template>
	<f7-app :params="f7params">
		<f7-statusbar></f7-statusbar>

		<f7-panel left cover theme-dark>
			<f7-view>
				<main-menu />
			</f7-view>
		</f7-panel>

		<f7-view id="main-view" url="/" main></f7-view>

		<f7-login-screen id="login-screen" @loginscreen:close="afterLogin()">
			<f7-view>
				<login-page />
			</f7-view>
		</f7-login-screen>
	</f7-app>
</template>

<script src="./app.js" />

app.js

import Routes from "./routes.js"
import LoginPage from "./pages/login.vue";
import MainMenu from "./pages/mainMenu.vue";

export default
	{
		components:
			{
				"login-page": LoginPage,
				"main-menu": MainMenu,
			},

		data()
		{
			return {
				f7params:
					{
						theme: "auto",
						routes: Routes,
						id: process.env.APP_NAME + "-" + process.env.APP_VERSION,

						view:
							{
								pushState: true,
								pushStateAnimateOnLoad: true,
								pushStateSeparator: "#di4m:/",
							},

						dialog:
							{
								title: process.env.APP_NAME,
								buttonOk: "OK",
								buttonCancel: "Cancelar",
								preloaderTitle: "Trabalhando nisso...",
								progressTitle: "Carregando...",
							},

						smartSelect:
							{
								pageBackLinkText: "Voltar",
								popupCloseLinkText: "Fechar",
								sheetCloseLinkText: "Feito",
								searchbar: true,
								searchbarPlaceholder: "Pesquisar",
								searchbarDisableText: "Cancelar",
								openIn: "popup",
							},

						autocomplete:
							{
								preloader: true,
								popupCloseLinkText: "Fechar",
								pageBackLinkText: "Voltar",
								searchbarPlaceholder: "Pesquisar...",
								searchbarDisableText: "Ver selecionados",
								notFoundText: "Nada encontrado",
								typeahead: true,
								multiple: false,
								closeOnSelect: true,
							},

						calendar:
							{
								monthNames: ["Janeiro", "Fevereiro", "Março", "Abril", "Maio", "Junho", "Julho", "Agosto", "Setembro", "Outubro", "Novembro", "Dezembro"],
								monthNamesShort: ["Jan", "Fev", "Mar", "Abr", "Mai", "Jun", "Jul", "Ago", "Set", "Out", "Nov", "Dez"],
								dayNames: ["Domingo", "Segunda", "Terça", "Quarta", "Quinta", "Sexta", "Sábado"],
								dayNamesShort: ["Dom", "Seg", "Ter", "Qua", "Qui", "Sex", "Sáb"],
								dateFormat: "dd-mm-yyyy",
								firstDay: 0,
								touchMove: false,
							},
					}
			};
		},

		mounted()
		{
			this.$store.dispatch("rehydrateStore");

			const loader = document.getElementById("_loader");

			if(loader) _loader.remove();
		},

		methods:
			{
				afterLogin()
				{
					if(this.$store.state.user.isAuthenticated && this.$store.state.login.returnUrl)
					{
						this.$f7.router.navigate(this.$store.state.login.returnUrl);
					}
				},
			},
	}

from framework7-vue.

nolimits4web avatar nolimits4web commented on June 26, 2024

Thanks, fixed now in beta 18

from framework7-vue.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.