Commit be493d59 authored by Reza Sahebgharan's avatar Reza Sahebgharan

initialproject

parent a986e7d0
{
"comments": false,
"presets": [
[
"@babel/preset-env",
{
"targets": [
"last 2 versions"
]
}
]
],
"plugins": [
[
"@babel/plugin-transform-async-to-generator"
],
[
"@babel/plugin-proposal-class-properties"
],
[
"@babel/plugin-proposal-object-rest-spread"
],
[
"@babel/plugin-transform-runtime",
{
"regenerator": true
}
]
]
}
\ No newline at end of file
node_modules/
*
!.meteor/
!node_modules/
!webpack.config.js
<template>
<v-app>
<v-content>
<transition name="fade" mode="out-in">
<keep-alive>
<router-view></router-view>
</keep-alive>
</transition>
</v-content>
</v-app>
</template>
<script>
import i18n from "./plugins/i18n";
import { mapGetters } from "vuex";
export default {
data() {
return {};
},
computed: {
...mapGetters(["lang"])
},
methods: {
changeLocale(locale) {
i18n.locale = locale;
}
},
watch: {
lang: function(newLang, oldLang) {
if (newLang == "en") {
this.$vuetify.rtl = false;
this.$vuetify.lang.current = "en";
}
if (newLang == "fa") {
this.$vuetify.rtl = true;
this.$vuetify.lang.current = "fa";
}
this.changeLocale(newLang);
}
}
};
</script>
<style>
#app {
font-family: "Vazir";
}
html {
overflow-y: auto !important;
}
</style>
<style scoped>
.fade-enter-active,
.fade-leave-active {
transition-duration: 0.3s;
transition-property: opacity;
transition-timing-function: ease;
}
.fade-enter,
.fade-leave-active {
opacity: 0;
}
</style>
\ No newline at end of file
<template>
<v-footer elevation="24" app class="d-flex" color="teal lighten-3">
<v-row justify="center" align="center" class="text-center red--text">
<v-menu transition="slide-x-transition">
<template v-slot:activator="{ on }">
<v-btn
class="changeLangBtn"
color="red"
dark
v-on="on"
depressed
text
>{{$t('AppFooter.appLang')}}</v-btn>
</template>
<v-list>
<v-list-item v-for="lng in langList" :key="lng.name" @click="setLang(lng.alias)">
<v-list-item-title>{{lng.name}}</v-list-item-title>
</v-list-item>
</v-list>
</v-menu>
<strong>{{ new Date().getFullYear() }}</strong>
<v-img src="img/0.png" contain max-height="60" max-width="60"></v-img>
</v-row>
</v-footer>
</template>
<script>
import { mapActions } from "vuex";
export default {
name: "app-footer",
data() {
return {
langList: [
{ name: "فارسی", alias: "fa" },
{ name: "English", alias: "en" }
]
};
},
methods: {
...mapActions(["setLang"])
}
};
</script>
<style scoped>
.changeLangBtn {
position: absolute;
left: 0;
top: 19px;
}
</style>>
</style>
\ No newline at end of file
<template>
<v-app-bar app elevation="24" color="teal lighten-3">
<v-toolbar-title class="red--text">{{$t('AppHeader.appName')}}</v-toolbar-title>
<v-spacer></v-spacer>
<v-btn text color="red red--text" :to="btnTo">
<v-icon left>{{ btnIconName }}</v-icon>
<strong>{{$t(btnLabel)}}</strong>
</v-btn>
</v-app-bar>
</template>
<script>
export default {
name: "app-header",
data() {
return {
btnTo: null
};
},
props: ["btnToProp", "btnLabel", "btnIconName"],
created() {
this.btnTo = "/" + this.btnToProp;
}
};
</script>
\ No newline at end of file
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<title>کارنامه</title>
</head>
<body>
<div id="app"></div>
</body>
\ No newline at end of file
import Vue from 'vue';
import App from './App.vue';
import { Meteor } from 'meteor/meteor';
import vuetify from './plugins/vuetify';
import VueMeteorTracker from 'vue-meteor-tracker';
Vue.use(VueMeteorTracker);
import VueRouter from 'vue-router';
Vue.use(VueRouter);
import routes from './plugins/routes';
const router = new VueRouter({
mode: 'history',
routes
});
import { store } from './store/store';
import i18n from './plugins/i18n';
Meteor.startup(() => {
new Vue({
i18n,
router,
vuetify,
store,
el: "#app",
render: h => h(App)
});
});
\ No newline at end of file
import Vue from 'vue';
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);
const messages = {
'en': {
Login: {
loginHeader: 'Login Form',
registerBtn: 'Register',
username: 'username',
password: 'password',
loginBtn: 'login',
passwordHint: 'At Least 8 characters',
required: 'Required',
min8Character: 'Min 8 Characters'
},
Register: {
registerHeader: 'Signup',
loginBtn: 'login',
username: 'username',
password: 'password',
repeatPassword: 'repeat password',
registerBtn: 'Register And Login',
required: 'Required',
min8Character: 'Min 8 Characters',
matchPass: "password and repeat passwords must be the same"
},
AppHeader: {
appName: 'Karname',
},
AppFooter: {
appLang: 'en',
}
},
'fa': {
Login: {
loginHeader: 'ورود کاربر',
registerBtn: 'ثبت نام',
username: 'نام کاربری',
password: 'رمز ورود',
loginBtn: 'ورود',
passwordHint: 'حداقل 8 کاراکتر',
required: 'مورد نیاز',
min8Character: 'حداقل 8 کاراکتر'
},
Register: {
registerHeader: 'ثبت نام کاربر',
loginBtn: 'ورود',
username: 'نام کاربری',
password: 'رمز ورود',
repeatPassword: 'تکرار رمز ورود',
registerBtn: 'ثبت نام و ورود',
required: 'مورد نیاز',
min8Character: 'حداقل 8 کاراکتر',
matchPass: "رمز عبور و تکرار آن باید مشابه باشند"
},
AppHeader: {
appName: 'کارنامه',
},
AppFooter: {
appLang: 'فا',
}
}
};
const i18n = new VueI18n({
locale: 'fa', // set locale
fallbackLocale: 'en', // set fallback locale
messages, // set locale messages
});
export default i18n;
\ No newline at end of file
import Login from '../views/Login.vue';
import Home from '../views/Home.vue';
import Register from '../views/Register.vue';
const routes = [{
path: '/',
component: Home,
name: 'Home'
},
{
path: '/login',
component: Login,
name: 'login'
},
{
path: '/register',
component: Register,
name: 'register'
}
];
export default routes;
\ No newline at end of file
// import '@mdi/font/css/materialdesignicons.css';
import 'vuetify/dist/vuetify.min.css';
import '@mdi/font/css/materialdesignicons.css';
import 'material-design-icons-iconfont/dist/material-design-icons.css';
import Vue from 'vue';
import Vuetify from 'vuetify';
import '../../public/fonts/font.css';
Vue.use(Vuetify);
import fa from 'vuetify/es5/locale/fa';
import en from 'vuetify/es5/locale/en';
import VueI18n from 'vue-i18n';
Vue.use(VueI18n);
import messages from './i18n';
const i18n = new VueI18n(
{
locale: 'fa', // set locale
fallbackLocale: 'en', // set fallback locale
messages, // set locale messages
}
);
export default new Vuetify({
lang: {
locales: { fa, en },
current: 'fa',
t: (key, ...params) => i18n.t(key, params),
},
icons: {
iconfont: 'mdi', // default - only for display purposes
},
rtl: true,
});
\ No newline at end of file
const state = {
lang: 'fa'
}
const mutations = {
'SET_LANG' (state, lang) {
state.lang = lang;
}
}
const actions = {
setLang({ commit }, lang) {
commit('SET_LANG', lang);
},
}
const getters = {
lang: state => {
return state.lang;
}
}
export default {
state,
mutations,
getters,
actions
};
\ No newline at end of file
const state = {
stocks: []
}
const mutations = {
'SET_STOCKS'(state, stocks) {
state.stocks = stocks;
},
'RND_STOCKS'(state) {
}
}
const actions = {
buyStock({ commit }, order) {
commit('BUY_STOCK', order);
},
initStocks: ({ commit }) => {
commit('SET_STOCKS');
},
randomizeStocks: ({ commit }) => {
commit('RND_STOCKS');
}
}
const getters = {
stocks: state => {
return state.stocks;
}
}
export default {
state,
mutations,
getters,
actions
};
\ No newline at end of file
import Vue from 'vue';
import Vuex from 'vuex';
import stocks from './modules/stocks';
import appSettings from './modules/appSetting';
Vue.use(Vuex);
export const store = new Vuex.Store({
modules: {
stocks,
appSettings
}
});
\ No newline at end of file
<template>
<div>Home Page</div>
</template>
<script>
export default {
beforeRouteEnter(to, from, next) {
next(vm => {
vm.$router.push('/login');
});
}
};
</script>
\ No newline at end of file
<template>
<div style="height:100%">
<app-header btnToProp="register" btnLabel="Login.registerBtn" btnIconName="mdi-account-plus"></app-header>
<v-container fluid class="align-start fill-height backgroundImg">
<img src="../../public/img/radio2.png" />
<v-row justify="center" class="loginCard">
<v-col xs="12" sm="8" md="4">
<v-card class="elevation-12" light elevation="24">
<v-toolbar color="light-green" dark>
<v-toolbar-title>{{$t('Login.loginHeader')}}</v-toolbar-title>
</v-toolbar>
<v-card-text>
<v-form>
<v-text-field
:label="$t('Login.username')"
prepend-icon="mdi-account-circle"
:rules="[rules.required]"
/>
<v-text-field
:type="!showPassword?'password' :'text'"
:label="$t('Login.password')"
prepend-icon="mdi-lock"
@click:append="showPassword = !showPassword"
:append-icon="showPassword ? 'mdi-eye': 'mdi-eye-off'"
:hint="$t('Login.passwordHint')"
:rules="[rules.required, rules.min]"
/>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="light-green white--text">
<v-icon left>mdi-login</v-icon>
<small>{{$t('Login.loginBtn')}}</small>
</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-container>
<app-footer></app-footer>
</div>
</template>
<script>
import AppFooter from "../components/AppFooter.vue";
import AppHeader from "../components/AppHeader.vue";
export default {
components: {
"app-footer": AppFooter,
"app-header": AppHeader
},
data() {
return {
showPassword: false,
rules: {
required: value => !!value || this.$t("Login.required"),
min: v => {
if (v==undefined)
return true
return v.length >= 8 || this.$t("Login.min8Character");
}
}
};
}
};
</script>
<style scoped>
.backgroundImg {
background-color: #abdae4ad;
}
img {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
overflow-y: hidden;
opacity: 0.6;
filter: grayscale(0.5) blur(2px);
z-index: 0;
}
.loginCard {
z-index: 10;
}
.backgroundImg {
overflow-y: hidden;
}
</style>
\ No newline at end of file
<template>
<div style="height:100%">
<app-header btnToProp="login" btnLabel="Register.loginBtn" btnIconName="mdi-login"></app-header>
<v-container fluid class="align-start fill-height backgroundImg">
<img src="../../public/img/radio2.png" />
<v-row justify="center" class="loginCard">
<v-col xs="12" sm="8" md="4">
<v-card class="elevation-12" light elevation="24">
<v-toolbar color="light-green" dark>
<v-toolbar-title>{{$t('Register.registerHeader')}}</v-toolbar-title>
</v-toolbar>
<v-card-text>
<v-form>
<v-text-field
:label="$t('Register.username')"
prepend-icon="mdi-account-circle"
:rules="[rules.required]" />
<v-text-field
:type="!showPassword1?'password' :'text'"
:label="$t('Register.password')"
prepend-icon="mdi-lock"
@click:append="showPassword1 = !showPassword1"
:append-icon="showPassword1 ? 'mdi-eye': 'mdi-eye-off'"
v-model="firstPass"
:rules="[rules.required, rules.min]"
/>
<v-text-field
:type="!showPassword2?'password' :'text'"
:label="$t('Register.repeatPassword')"
prepend-icon="mdi-lock"
@click:append="showPassword2 = !showPassword2"
:append-icon="showPassword2 ? 'mdi-eye': 'mdi-eye-off'"
v-model="secondPass"
:rules="[rules.required, rules.matchPass]"
/>
</v-form>
</v-card-text>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn color="light-green white--text">
<v-icon left>mdi-login</v-icon>
<small>{{$t('Register.registerBtn')}}</small>
</v-btn>
</v-card-actions>
</v-card>
</v-col>
</v-row>
</v-container>
<app-footer></app-footer>
</div>
</template>
<script>
import AppFooter from "../components/AppFooter.vue";
import AppHeader from "../components/AppHeader.vue";
export default {
components: {
"app-footer": AppFooter,
"app-header": AppHeader
},
data() {
return {
firstPass: undefined,
secondPass: undefined,
showPassword1: false,
showPassword2: false,
rules: {
required: value => !!value || this.$t("Register.required"),
min: v => {
if (v==undefined)
return true
return v.length >= 8 || this.$t("Register.min8Character");
},
matchPass: v => {
return (
this.firstPass === this.secondPass ||
this.$t('Register.matchPass')
);
}
}
};
}
};
</script>
<style scoped>
.backgroundImg {
background-color: #abdae4ad;
}
img {
position: absolute;
left: 0;
top: 0;
height: 100%;
width: 100%;
overflow-y: hidden;
opacity: 0.6;
filter: grayscale(0.5) blur(2px);
z-index: 0;
}
.loginCard {
z-index: 10;
}
.backgroundImg {
overflow-y: hidden;
}
</style>
\ No newline at end of file
This diff is collapsed.
{
"name": "karname",
"private": true,
"scripts": {
"start": "meteor run",
"test": "meteor test --once --driver-package meteortesting:mocha",
"test-app": "TEST_WATCH=1 meteor test --full-app --driver-package meteortesting:mocha",
"visualize": "meteor --production --extra-packages bundle-visualizer",
"build": "webpack"
},
"dependencies": {
"@babel/plugin-transform-runtime": "^7.5.5",
"@babel/runtime": "^7.5.5",
"bcrypt": "^3.0.6",
"connect-route": "^0.1.5",
"meteor-node-stubs": "^1.0.0",
"valid-url": "^1.0.9",
"vue": "^2.6.10",
"vue-i18n": "^8.14.0",
"vue-meta": "^2.2.1",
"vue-meteor-tracker": "^2.0.0-beta.5",
"vue-router": "^3.1.2",
"vue-template-compiler": "^2.6.10",
"vuetify": "^2.0.5",
"vuex": "^3.1.1"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/plugin-proposal-class-properties": "^7.5.5",
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
"@babel/plugin-transform-arrow-functions": "^7.2.0",
"@babel/plugin-transform-async-to-generator": "^7.5.0",
"@babel/preset-env": "^7.5.5",
"@babel/register": "^7.5.5",
"@mdi/font": "^3.9.97",
"babel-loader": "^8.0.6",
"cross-env": "^5.2.0",
"css-loader": "^3.2.0",
"deepmerge": "^4.0.0",
"file-loader": "^4.2.0",
"html-loader": "^0.5.5",
"html-webpack-plugin": "^3.2.0",
"material-design-icons-iconfont": "^5.0.1",
"sass": "^1.22.9",
"sass-loader": "^7.2.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"vue-loader": "^15.7.1",
"vue-style-loader": "^4.1.2",
"vuetify-loader": "^1.3.0",
"webpack": "^4.39.1",
"webpack-cli": "^3.3.6",
"webpack-dev-middleware": "^3.7.0",
"webpack-hot-middleware": "^2.25.0",
"webpack-meteor-externals": "0.0.5"
}
}
/* @font-face {
font-family: FontName;
src: url('FontName.eot');
src: url('FontName.eot?#iefix') format('FontName-opentype'),
url('FontName.woff') format('woff'),
url('FontName.ttf') format('truetype');
font-weight: normal;
font-style: normal;
} */
@font-face {
font-family: Vazir;
src: url('vazir-font-v18.0.0/Vazir.eot');
src: url('vazir-font-v18.0.0/Vazir.eot?#iefix') format('vazir-opentype'), url('vazir-font-v18.0.0/Vazir.woff') format('woff'), url('vazir-font-v18.0.0/Vazir.ttf') format('truetype');
font-weight: bold;
font-style: normal;
}
@font-face {
font-family: Yekan;
src: url('yekan-font/Yekan.eot');
src: url('yekan-font/Yekan.eot?#iefix') format('vazir-opentype'), url('yekan-font/Yekan.woff') format('woff'), url('yekan-font/Yekan.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: yekan-regular;
src: url('yekan-font/yekan-regular.eot');
src: url('yekan-font/yekan-regular.eot?#iefix') format('vazir-opentype'), url('yekan-font/yekan-regular.woff') format('woff'), url('yekan-font/yekan-regular.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment