slcing registrasi awal
This commit is contained in:
118
auth-code/index.html
Normal file
118
auth-code/index.html
Normal file
@@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Authentication</title>
|
||||
<!-- Vuetify CSS -->
|
||||
<link href="../css/vuetify.css" rel="stylesheet" />
|
||||
<!-- Local Stylesheet for Fonts -->
|
||||
<link rel="stylesheet" href="../css/styles.css" />
|
||||
<link href="../css/materialdesignicon.css" rel="stylesheet" />
|
||||
<script src="https://code.iconify.design/iconify-icon/2.1.0/iconify-icon.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
<!-- Moment -->
|
||||
<script src="../libraries/moment.js"></script>
|
||||
<!-- Vue.js -->
|
||||
<!-- DEV -->
|
||||
<script src="https://unpkg.com/vue@3/dist/vue.global.js"></script>
|
||||
<!-- PROD -->
|
||||
<!-- <script src="../libraries/vue3.4.36.global.prod.js"></script> -->
|
||||
<!-- Vuex -->
|
||||
<script src="../libraries/vuex.js"></script>
|
||||
<!-- Vuetify -->
|
||||
<script src="../libraries/vuetify3.js"></script>
|
||||
<!-- vue-i18n -->
|
||||
<script src="../libraries/vue-i18n.global.js"></script>
|
||||
<!-- Axios -->
|
||||
<script src="../libraries/axios.js"></script>
|
||||
|
||||
<script src="../globalscript/theme.js"></script>
|
||||
<script src="../globalscript/global.js"></script>
|
||||
<!-- loader single file component -->
|
||||
<script src="../libraries/vue3-sfc-loader.js"></script>
|
||||
<script src="./language.js"></script>
|
||||
|
||||
<script type="module">
|
||||
const { loadModule } = window["vue3-sfc-loader"];
|
||||
import system from "../globalstore/globalstore.js";
|
||||
import auth from "./modules/auth.js"
|
||||
|
||||
const options = {
|
||||
moduleCache: {
|
||||
vue: Vue,
|
||||
},
|
||||
getFile(url) {
|
||||
return fetch(url).then((response) =>
|
||||
response.ok ? response.text() : Promise.reject(response)
|
||||
);
|
||||
},
|
||||
addStyle(textContent) {
|
||||
const style = document.createElement("style");
|
||||
style.textContent = textContent;
|
||||
const ref = document.head.getElementsByTagName("style")[0] || null;
|
||||
document.head.insertBefore(style, ref)
|
||||
},
|
||||
};
|
||||
|
||||
const messages = CustomMessages;
|
||||
const browserLocale = navigator.language || navigator.languages[0]
|
||||
const i18n = VueI18n.createI18n({
|
||||
locale: browserLocale.startsWith("id") ? "id" : "en",
|
||||
fallbackLocale: "en",
|
||||
messages,
|
||||
});
|
||||
window.i18n = i18n;
|
||||
|
||||
moment.locale(browserLocale.startsWith("id") ? "id" : "en");
|
||||
const store = Vuex.createStore({
|
||||
modules: {
|
||||
system: system,
|
||||
auth: auth,
|
||||
},
|
||||
});
|
||||
|
||||
const app = Vue.createApp({
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
bg_src: "",
|
||||
loading: false
|
||||
};
|
||||
},
|
||||
|
||||
template : `<main-component></main-component>`,
|
||||
});
|
||||
|
||||
const vuetify = Vuetify.createVuetify({
|
||||
theme: {
|
||||
themes: CustomTheme,
|
||||
},
|
||||
});
|
||||
|
||||
app.use(store);
|
||||
app.use(vuetify);
|
||||
app.use(i18n);
|
||||
|
||||
const components = {
|
||||
"main-component": "./components/authentication.vue",
|
||||
};
|
||||
|
||||
Promise.all(
|
||||
Object.entries(components).map(([name, path]) => {
|
||||
return loadModule(path, options).then((component) => {
|
||||
app.component(name, component);
|
||||
});
|
||||
})
|
||||
)
|
||||
.then(() => {
|
||||
app.mount("#app");
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log("Error loading components: ", error);
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user