Skip to content

Instantly share code, notes, and snippets.

View spiritbroski's full-sized avatar
🍞
bismillah

ꦫꦶꦤꦺꦴ spiritbroski

🍞
bismillah
View GitHub Profile
yarn create nuxt-app frontend
type = s3
provider = IBMCOS
env_auth = false
access_key_id = xxxxxx
secret_access_key = xxxxxxxxx
endpoint = s3.ap.cloud-object-storage.appdomain.cloud
location_constraint = ap-standard
acl = private
...
<v-btn @click="login_github"><v-icon class="mx-2 my-2">fab fa-github</v-icon>LOGIN</v-btn>
...
export default class MyStore extends Vue {
login_github(){
window.location.href="https://github.com/login/oauth/authorize?client_id="+process.env.github_client_id
}
}
<template>
<v-row justify="center" align="center" :class="['text-h1']">REDIRECTING...</v-row>
</template>
<script lang="ts">
import Cookies from 'js-cookie'
import { Component, Vue } from 'nuxt-property-decorator'
@Component
export default class MyStore extends Vue {
mounted(){
Cookies.set('token', this.$route.query.token)
// pages/index.vue
<template>
<Home :login="login" />
</template>
<script lang="ts">
import Cookies from 'js-cookie'
import Home from '@/components/Home.vue'
import { Component, Vue } from 'nuxt-property-decorator'
@Component({
components: {
@spiritbroski
spiritbroski / Home.vue
Created December 5, 2020 02:26
Home.vue
// components/Home.vue
<template>
...
<v-btn :class="['my-2']" color="info" elevation="2" v-show="login"
>DASHBOARD</v-btn
>
<v-btn
:class="['my-2']"
color="info"
elevation="2"
yarn generate
cd dist
rclone copy ./ <remote name>:<bucket name>
<template>
...
<v-btn
:class="['my-2']"
color="info"
elevation="2"
v-show="login"
href="/dashboard"
>DASHBOARD</v-btn
>
<template>
<v-container>
<v-row justify="space-between">
<v-col cols="4" class="text-h4 font-weight-bold">Dashboard</v-col>
<v-col cols="4" class="d-flex justify-end"
><v-btn @click="logout">LOGOUT</v-btn></v-col
>
</v-row>
<DashboardInfo :username="username" :profilePhoto="profilePhoto" />
<v-row justify="space-between">