Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
671eecb
Initial commit
mnt3710 Dec 21, 2023
10b72e4
oparation ok
Feb 1, 2024
ffc623f
add: readme
Feb 8, 2024
4aa8906
update: readme
Feb 9, 2024
2bcbd6c
update: readme
Feb 9, 2024
3b462b3
update: readme
Feb 9, 2024
30fa5cd
Update README.md
mnt3710 Feb 11, 2024
25a0406
Update README.md
mnt3710 Feb 12, 2024
ad9d4c9
delete: node_modules
Feb 14, 2024
db9a8fb
add: some setting file
Feb 15, 2024
215daf8
delete: .gitignore copy
Feb 15, 2024
de52c4e
change: package.json to yarn.lock
Feb 15, 2024
181e9f4
add: engines in package.json
Feb 20, 2024
a35cc4b
Update README.md
mnt3710 Feb 22, 2024
b489249
fix: format
Mar 3, 2024
893dde2
update: readme
Mar 3, 2024
d1309c9
Merge remote-tracking branch 'origin'
Mar 3, 2024
b16454f
Update README.md
mnt3710 Mar 24, 2024
9f775bd
Update README.md
mnt3710 Mar 24, 2024
2da057a
Create main.yml
mnt3710 Jul 27, 2024
6ba2b73
Update main.yml
mnt3710 Jul 27, 2024
9b730fc
Update main.yml
mnt3710 Jul 27, 2024
14dfe34
Update main.yml
mnt3710 Jul 27, 2024
fab3eec
Update main.yml
mnt3710 Jul 27, 2024
53e9689
Update main.yml
mnt3710 Jul 27, 2024
6f36f29
Update main.yml
mnt3710 Jul 27, 2024
c056c1b
Update main.yml
mnt3710 Jul 27, 2024
cb575d5
Update main.yml
mnt3710 Jul 27, 2024
824494c
Update main.yml
mnt3710 Jul 27, 2024
ce48e04
add: firebase setting
Jul 27, 2024
fa63312
Update main.yml
mnt3710 Jul 27, 2024
b3691f1
Update main.yml
mnt3710 Jul 27, 2024
3e03ab8
Update main.yml
mnt3710 Jul 27, 2024
84169f1
fix: engines node version
Jul 27, 2024
24662a0
Merge remote-tracking branch 'origin'
Jul 27, 2024
ac97f41
Update main.yml
mnt3710 Jul 27, 2024
6434130
Update main.yml
mnt3710 Jul 27, 2024
9afcf9a
fix: version error
Jul 27, 2024
dd85ae5
Merge branch 'main' of https://github.com/TheDesignium/dezban-fronten…
Jul 27, 2024
b285bd5
fix: version error
Jul 27, 2024
5646cde
空コミット
Jul 27, 2024
3564cd2
fix: style
Jul 29, 2024
da9048b
add: pr preview
Jul 29, 2024
64b70c2
空コミット
Jul 29, 2024
c48c3ae
Merge branch 'main' of https://github.com/TheDesignium/dezban-fronten…
Jul 29, 2024
e2f0993
merge
Jul 29, 2024
a09b586
merge
Jul 29, 2024
23e8939
delete: main.yml
Jul 29, 2024
82efb8d
空コミット
Jul 29, 2024
29fe410
add: main.yml
Jul 29, 2024
0b0aa8b
fix: yarn.lock
Jul 30, 2024
dff05f3
fix: hosting yaml file
Aug 9, 2024
3ba5714
fix: hosting yaml file
Aug 9, 2024
7300f9b
delete: main.yml
Aug 10, 2024
f01fd0a
fix: readme
Sep 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@ module.exports = {
root: true,
env: {
browser: true,
node: true
node: true,
},
extends: [
'@nuxtjs/eslint-config-typescript',
'plugin:nuxt/recommended',
'prettier'
],
plugins: [
'prettier',
],
plugins: [],
// add your custom rules here
rules: {}
rules: {},
}
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "dezban-frontend-skill-check"
}
}
20 changes: 20 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on merge
on:
push:
branches:
- main
jobs:
build_and_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEZBAN_FRONTEND_SKILL_CHECK }}
channelId: live
projectId: dezban-frontend-skill-check
21 changes: 21 additions & 0 deletions .github/workflows/firebase-hosting-pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# This file was auto-generated by the Firebase CLI
# https://github.com/firebase/firebase-tools

name: Deploy to Firebase Hosting on PR
on: pull_request
permissions:
checks: write
contents: read
pull-requests: write
jobs:
build_and_preview:
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install && npm run build
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: ${{ secrets.GITHUB_TOKEN }}
firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_DEZBAN_FRONTEND_SKILL_CHECK }}
projectId: dezban-frontend-skill-check
211 changes: 211 additions & 0 deletions .nuxt/App.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
import Vue from 'vue'
import { decode, parsePath, withoutBase, withoutTrailingSlash, normalizeURL } from 'ufo'

import { getMatchedComponentsInstances, getChildrenComponentInstancesUsingFetch, promisify, globalHandleError, urlJoin, sanitizeComponent } from './utils'
import NuxtError from './components/nuxt-error.vue'
import NuxtLoading from './components/nuxt-loading.vue'
import NuxtBuildIndicator from './components/nuxt-build-indicator'

import '../node_modules/@nuxtjs/tailwindcss/dist/runtime/tailwind.css'

import _6f6c098b from './layouts/default.vue'

const layouts = { "_default": sanitizeComponent(_6f6c098b) }

export default {
render (h, props) {
const loadingEl = h('NuxtLoading', { ref: 'loading' })

const layoutEl = h(this.layout || 'nuxt')
const templateEl = h('div', {
domProps: {
id: '__layout'
},
key: this.layoutName
}, [layoutEl])

const transitionEl = h('transition', {
props: {
name: 'layout',
mode: 'out-in'
},
on: {
beforeEnter (el) {
// Ensure to trigger scroll event after calling scrollBehavior
window.$nuxt.$nextTick(() => {
window.$nuxt.$emit('triggerScroll')
})
}
}
}, [templateEl])

return h('div', {
domProps: {
id: '__nuxt'
}
}, [
loadingEl,
h(NuxtBuildIndicator),
transitionEl
])
},

data: () => ({
isOnline: true,

layout: null,
layoutName: '',

nbFetching: 0
}),

beforeCreate () {
Vue.util.defineReactive(this, 'nuxt', this.$options.nuxt)
},
created () {
// Add this.$nuxt in child instances
this.$root.$options.$nuxt = this

if (process.client) {
// add to window so we can listen when ready
window.$nuxt = this

this.refreshOnlineStatus()
// Setup the listeners
window.addEventListener('online', this.refreshOnlineStatus)
window.addEventListener('offline', this.refreshOnlineStatus)
}
// Add $nuxt.error()
this.error = this.nuxt.error
// Add $nuxt.context
this.context = this.$options.context
},

async mounted () {
this.$loading = this.$refs.loading
},

watch: {
'nuxt.err': 'errorChanged'
},

computed: {
isOffline () {
return !this.isOnline
},

isFetching () {
return this.nbFetching > 0
},
},

methods: {
refreshOnlineStatus () {
if (process.client) {
if (typeof window.navigator.onLine === 'undefined') {
// If the browser doesn't support connection status reports
// assume that we are online because most apps' only react
// when they now that the connection has been interrupted
this.isOnline = true
} else {
this.isOnline = window.navigator.onLine
}
}
},

async refresh () {
const pages = getMatchedComponentsInstances(this.$route)

if (!pages.length) {
return
}
this.$loading.start()

const promises = pages.map(async (page) => {
let p = []

// Old fetch
if (page.$options.fetch && page.$options.fetch.length) {
p.push(promisify(page.$options.fetch, this.context))
}

if (page.$options.asyncData) {
p.push(
promisify(page.$options.asyncData, this.context)
.then((newData) => {
for (const key in newData) {
Vue.set(page.$data, key, newData[key])
}
})
)
}

// Wait for asyncData & old fetch to finish
await Promise.all(p)
// Cleanup refs
p = []

if (page.$fetch) {
p.push(page.$fetch())
}
// Get all component instance to call $fetch
for (const component of getChildrenComponentInstancesUsingFetch(page.$vnode.componentInstance)) {
p.push(component.$fetch())
}

return Promise.all(p)
})
try {
await Promise.all(promises)
} catch (error) {
this.$loading.fail(error)
globalHandleError(error)
this.error(error)
}
this.$loading.finish()
},
errorChanged () {
if (this.nuxt.err) {
if (this.$loading) {
if (this.$loading.fail) {
this.$loading.fail(this.nuxt.err)
}
if (this.$loading.finish) {
this.$loading.finish()
}
}

let errorLayout = (NuxtError.options || NuxtError).layout;

if (typeof errorLayout === 'function') {
errorLayout = errorLayout(this.context)
}

this.setLayout(errorLayout)
}
},

setLayout (layout) {
if(layout && typeof layout !== 'string') {
throw new Error('[nuxt] Avoid using non-string value as layout property.')
}

if (!layout || !layouts['_' + layout]) {
layout = 'default'
}
this.layoutName = layout
this.layout = layouts['_' + layout]
return this.layout
},
loadLayout (layout) {
if (!layout || !layouts['_' + layout]) {
layout = 'default'
}
return Promise.resolve(layouts['_' + layout])
},
},

components: {
NuxtLoading
}
}
Loading