This commit is contained in:
2026-04-07 14:50:23 +09:00
commit b4e485502b
4778 changed files with 2017091 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
export default defineNuxtPlugin((nuxtApp) => {
// _utils.log('defineNuxtPlugin() of !.ts executed...');
_crossCtl.setConfig(useRuntimeConfig().public);
/*
nuxtApp.hook('app:created', () => {
_utils.log('nuxtApp.hook, app:created');
});
nuxtApp.hook('app:beforeMount', () => {
_utils.log('nuxtApp.hook, app:beforeMount');
});
nuxtApp.hook('app:mounted', () => {
_utils.log('nuxtApp.hook, app:mounted');
});
nuxtApp.hook('vue:error', (..._args) => {
console.log('vue:error');
// if (process.client) {
// console.log(..._args)
// }
});
nuxtApp.hook('app:error', (..._args) => {
console.log('app:error');
// if (process.client) {
// console.log(..._args)
// }
});
nuxtApp.vueApp.config.errorHandler = (..._args) => {
console.log('global error handler');
// if (process.client) {
// console.log(..._args);
// }
return true;
};
*/
});

View File

@@ -0,0 +1,44 @@
export default defineNuxtPlugin((/* nuxtApp */) => {
// _utils.log('defineNuxtPlugin() of customDateTimeFormat.ts executed...');
return {
provide: {
customFormat: (rawtime) => {
const date: any = new Date(rawtime);
const year = date.getFullYear();
const month = date.getMonth() + 1;
const day = date.getDate();
let hh = date.getHours();
const mm = date.getMinutes();
const AmOrPm = hh <= 12 ? '오전' : '오후';
hh = hh % 12 || 12;
const diffInSec = Math.floor((Date.now() - date) / 1000);
if (diffInSec < 30) {
return '조금 전';
}
if (diffInSec < 59) {
return diffInSec + '초 전';
}
const diffInMin = Math.floor(diffInSec / 60);
if (diffInMin < 59) {
return diffInMin + '분 전';
}
return (
year +
'년 ' +
month +
'월' +
' ' +
day +
'일, ' +
AmOrPm +
' ' +
hh +
':' +
mm
);
},
},
};
});

View File

@@ -0,0 +1,17 @@
import dayjs from 'dayjs';
import relativeTime from 'dayjs/plugin/relativeTime.js';
import 'dayjs/locale/ko';
dayjs.locale('ko');
dayjs.extend(relativeTime);
export default defineNuxtPlugin((/* nuxtApp */) => {
// _utils.log('defineNuxtPlugin() of dayjs.ts executed...');
return {
provide: {
dayjs: (rawDateTime) => {
return dayjs(rawDateTime);
},
},
};
});

View File

@@ -0,0 +1,9 @@
import { defineNuxtPlugin } from '#app';
import { QuillEditor } from '@vueup/vue-quill';
import '@vueup/vue-quill/dist/vue-quill.snow.css';
export default defineNuxtPlugin((nuxtApp) => {
nuxtApp.vueApp.component('QuillEditor', QuillEditor);
});

View File

@@ -0,0 +1,10 @@
import VueGoogleMaps from '@fawmi/vue-google-maps';
export default defineNuxtPlugin((nuxtApp) => {
const config = useRuntimeConfig().public;
nuxtApp.vueApp.use(VueGoogleMaps, {
load: {
key: config.GOOGLE_MAPS_API_KEY,
},
});
});

View File

@@ -0,0 +1,12 @@
import VueJsonPretty from 'vue-json-pretty';
export default defineNuxtPlugin((/* nuxtApp */) => {
// _utils.log('defineNuxtPlugin() of dayjs.ts executed...');
return {
provide: {
vueJsonPretty: () => {
return new VueJsonPretty();
},
},
};
});