mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-26 08:00:48 +08:00
Compare commits
8 Commits
codex/add-
...
feature/me
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
720031770d | ||
|
|
eb7a25434f | ||
|
|
bda4b24cf0 | ||
|
|
4dedb70d54 | ||
|
|
aea4f59af7 | ||
|
|
84ed778dc0 | ||
|
|
b3ea41ad1e | ||
|
|
80ecb1620d |
@@ -7,6 +7,7 @@ import lombok.Setter;
|
|||||||
import org.hibernate.annotations.CreationTimestamp;
|
import org.hibernate.annotations.CreationTimestamp;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.EnumSet;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@@ -68,7 +69,10 @@ public class User {
|
|||||||
@CollectionTable(name = "user_disabled_notification_types", joinColumns = @JoinColumn(name = "user_id"))
|
@CollectionTable(name = "user_disabled_notification_types", joinColumns = @JoinColumn(name = "user_id"))
|
||||||
@Column(name = "notification_type")
|
@Column(name = "notification_type")
|
||||||
@Enumerated(EnumType.STRING)
|
@Enumerated(EnumType.STRING)
|
||||||
private Set<NotificationType> disabledNotificationTypes = new HashSet<>();
|
private Set<NotificationType> disabledNotificationTypes = EnumSet.of(
|
||||||
|
NotificationType.POST_VIEWED,
|
||||||
|
NotificationType.USER_ACTIVITY
|
||||||
|
);
|
||||||
|
|
||||||
@CreationTimestamp
|
@CreationTimestamp
|
||||||
@Column(nullable = false, updatable = false,
|
@Column(nullable = false, updatable = false,
|
||||||
|
|||||||
@@ -37,8 +37,8 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { computed } from 'vue'
|
import { computed } from 'vue'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { getToken } from '../utils/auth'
|
import { getToken } from '~/utils/auth'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
medals: {
|
medals: {
|
||||||
|
|||||||
@@ -14,15 +14,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted, computed, watch, onUnmounted, useId } from 'vue'
|
import { computed, onMounted, onUnmounted, ref, useId, watch } from 'vue'
|
||||||
import { themeState } from '../utils/theme'
|
import { clearVditorStorage } from '~/utils/clearVditorStorage'
|
||||||
|
import { themeState } from '~/utils/theme'
|
||||||
import {
|
import {
|
||||||
createVditor,
|
createVditor,
|
||||||
getEditorTheme as getEditorThemeUtil,
|
getEditorTheme as getEditorThemeUtil,
|
||||||
getPreviewTheme as getPreviewThemeUtil,
|
getPreviewTheme as getPreviewThemeUtil,
|
||||||
} from '../utils/vditor'
|
} from '~/utils/vditor'
|
||||||
import LoginOverlay from './LoginOverlay.vue'
|
import LoginOverlay from '~/components/LoginOverlay.vue'
|
||||||
import { clearVditorStorage } from '../utils/clearVditorStorage'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'CommentEditor',
|
name: 'CommentEditor',
|
||||||
|
|||||||
@@ -89,19 +89,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, watch, computed, nextTick } from 'vue'
|
import { computed, ref, watch } from 'vue'
|
||||||
import VueEasyLightbox from 'vue-easy-lightbox'
|
import VueEasyLightbox from 'vue-easy-lightbox'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import CommentEditor from './CommentEditor.vue'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { renderMarkdown, handleMarkdownClick } from '../utils/markdown'
|
import { authState, getToken } from '~/utils/auth'
|
||||||
import { getMedalTitle } from '../utils/medal'
|
import { handleMarkdownClick, renderMarkdown } from '~/utils/markdown'
|
||||||
import TimeManager from '../utils/time'
|
import { getMedalTitle } from '~/utils/medal'
|
||||||
import BaseTimeline from './BaseTimeline.vue'
|
import TimeManager from '~/utils/time'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import BaseTimeline from '~/components/BaseTimeline.vue'
|
||||||
import { getToken, authState } from '../utils/auth'
|
import CommentEditor from '~/components/CommentEditor.vue'
|
||||||
import ReactionsGroup from './ReactionsGroup.vue'
|
import DropdownMenu from '~/components/DropdownMenu.vue'
|
||||||
import DropdownMenu from './DropdownMenu.vue'
|
import LoginOverlay from '~/components/LoginOverlay.vue'
|
||||||
import LoginOverlay from './LoginOverlay.vue'
|
import ReactionsGroup from '~/components/ReactionsGroup.vue'
|
||||||
|
|
||||||
const CommentItem = {
|
const CommentItem = {
|
||||||
name: 'CommentItem',
|
name: 'CommentItem',
|
||||||
|
|||||||
@@ -32,12 +32,12 @@ export default {
|
|||||||
},
|
},
|
||||||
async mounted() {
|
async mounted() {
|
||||||
await this.checkMilkTeaActivity()
|
await this.checkMilkTeaActivity()
|
||||||
if (!this.showMilkTeaPopup) {
|
if (this.showMilkTeaPopup) return
|
||||||
await this.checkNotificationSetting()
|
|
||||||
if (!this.showNotificationPopup) {
|
await this.checkNotificationSetting()
|
||||||
await this.checkNewMedals()
|
if (this.showNotificationPopup) return
|
||||||
}
|
|
||||||
}
|
await this.checkNewMedals()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async checkMilkTeaActivity() {
|
async checkMilkTeaActivity() {
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ProgressBar from './ProgressBar.vue'
|
import { prevLevelExp } from '~/utils/level'
|
||||||
import { prevLevelExp } from '../utils/level'
|
import ProgressBar from '~/components/ProgressBar.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'LevelProgress',
|
name: 'LevelProgress',
|
||||||
components: { ProgressBar },
|
components: { ProgressBar },
|
||||||
|
|||||||
@@ -58,12 +58,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ProgressBar from './ProgressBar.vue'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import LevelProgress from './LevelProgress.vue'
|
import { fetchCurrentUser, getToken } from '~/utils/auth'
|
||||||
import BaseInput from './BaseInput.vue'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
import BasePopup from './BasePopup.vue'
|
import BasePopup from '~/components/BasePopup.vue'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import LevelProgress from '~/components/LevelProgress.vue'
|
||||||
import { getToken, fetchCurrentUser } from '../utils/auth'
|
import ProgressBar from '~/components/ProgressBar.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MilkTeaActivityComponent',
|
name: 'MilkTeaActivityComponent',
|
||||||
@@ -218,24 +218,30 @@ export default {
|
|||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.redeem-submit-button:disabled {
|
.redeem-submit-button:disabled {
|
||||||
background-color: var(--primary-color-disabled);
|
background-color: var(--primary-color-disabled);
|
||||||
cursor: not-allowed;
|
cursor: not-allowed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.redeem-submit-button:hover {
|
.redeem-submit-button:hover {
|
||||||
background-color: var(--primary-color-hover);
|
background-color: var(--primary-color-hover);
|
||||||
}
|
}
|
||||||
|
|
||||||
.redeem-submit-button:disabled:hover {
|
.redeem-submit-button:disabled:hover {
|
||||||
background-color: var(--primary-color-disabled);
|
background-color: var(--primary-color-disabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
.redeem-cancel-button {
|
.redeem-cancel-button {
|
||||||
color: var(--primary-color);
|
color: var(--primary-color);
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.redeem-cancel-button:hover {
|
.redeem-cancel-button:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-level-text {
|
.user-level-text {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { useIsMobile } from '../utils/screen'
|
import { useIsMobile } from '~/utils/screen'
|
||||||
export default {
|
export default {
|
||||||
name: 'NotificationContainer',
|
name: 'NotificationContainer',
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<BasePopup :visible="visible" @close="close">
|
<BasePopup :visible="visible" @close="close">
|
||||||
<div class="notification-popup">
|
<div class="notification-popup">
|
||||||
<div class="notification-popup-title">通知设置上线啦</div>
|
<div class="notification-popup-title">🎉 通知设置上线啦</div>
|
||||||
<div class="notification-popup-text">现在可以调整通知类型</div>
|
<div class="notification-popup-text">现在可以在消息 -> 消息设置中调整通知类型</div>
|
||||||
<div class="notification-popup-actions">
|
<div class="notification-popup-actions">
|
||||||
<div class="notification-popup-close" @click="close">知道了</div>
|
<div class="notification-popup-close" @click="close">知道了</div>
|
||||||
<div class="notification-popup-button" @click="gotoSetting">去看看</div>
|
<div class="notification-popup-button" @click="gotoSetting">去看看</div>
|
||||||
@@ -47,6 +47,7 @@ export default {
|
|||||||
.notification-popup-title {
|
.notification-popup-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.notification-popup-actions {
|
.notification-popup-actions {
|
||||||
|
|||||||
@@ -8,14 +8,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted, watch, onUnmounted, useId } from 'vue'
|
import { onMounted, onUnmounted, ref, useId, watch } from 'vue'
|
||||||
import { themeState } from '../utils/theme'
|
import { clearVditorStorage } from '~/utils/clearVditorStorage'
|
||||||
|
import { themeState } from '~/utils/theme'
|
||||||
import {
|
import {
|
||||||
createVditor,
|
createVditor,
|
||||||
getEditorTheme as getEditorThemeUtil,
|
getEditorTheme as getEditorThemeUtil,
|
||||||
getPreviewTheme as getPreviewThemeUtil,
|
getPreviewTheme as getPreviewThemeUtil,
|
||||||
} from '../utils/vditor'
|
} from '~/utils/vditor'
|
||||||
import { clearVditorStorage } from '../utils/clearVditorStorage'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PostEditor',
|
name: 'PostEditor',
|
||||||
|
|||||||
@@ -47,10 +47,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, computed, watch, onMounted } from 'vue'
|
import { computed, onMounted, ref, watch } from 'vue'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { getToken, authState } from '../utils/auth'
|
import { authState, getToken } from '~/utils/auth'
|
||||||
import { reactionEmojiMap } from '../utils/reactions'
|
import { reactionEmojiMap } from '~/utils/reactions'
|
||||||
|
|
||||||
let cachedTypes = null
|
let cachedTypes = null
|
||||||
const fetchTypes = async () => {
|
const fetchTypes = async () => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BasePlaceholder from './BasePlaceholder.vue'
|
import BasePlaceholder from '~/components/BasePlaceholder.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'UserList',
|
name: 'UserList',
|
||||||
|
|||||||
13
frontend_nuxt/jsconfig.json
Normal file
13
frontend_nuxt/jsconfig.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2020",
|
||||||
|
"module": "ESNext",
|
||||||
|
"moduleResolution": "node",
|
||||||
|
"baseUrl": ".",
|
||||||
|
"paths": {
|
||||||
|
"~/*": ["./*"]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"include": ["./**/*.js", "./**/*.vue"],
|
||||||
|
"exclude": ["node_modules"]
|
||||||
|
}
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted } from 'vue'
|
import { onMounted, ref } from 'vue'
|
||||||
import { renderMarkdown, handleMarkdownClick } from '../utils/markdown'
|
import { handleMarkdownClick, renderMarkdown } from '~/utils/markdown'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AboutPageView',
|
name: 'AboutPageView',
|
||||||
|
|||||||
@@ -30,19 +30,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted } from 'vue'
|
|
||||||
import VChart from 'vue-echarts'
|
|
||||||
import { use } from 'echarts/core'
|
|
||||||
import { LineChart } from 'echarts/charts'
|
import { LineChart } from 'echarts/charts'
|
||||||
import {
|
import {
|
||||||
|
DataZoomComponent,
|
||||||
|
GridComponent,
|
||||||
TitleComponent,
|
TitleComponent,
|
||||||
TooltipComponent,
|
TooltipComponent,
|
||||||
GridComponent,
|
|
||||||
DataZoomComponent,
|
|
||||||
} from 'echarts/components'
|
} from 'echarts/components'
|
||||||
|
import { use } from 'echarts/core'
|
||||||
import { CanvasRenderer } from 'echarts/renderers'
|
import { CanvasRenderer } from 'echarts/renderers'
|
||||||
import { API_BASE_URL } from '../main'
|
import { onMounted, ref } from 'vue'
|
||||||
import { getToken } from '../utils/auth'
|
import VChart from 'vue-echarts'
|
||||||
|
import { API_BASE_URL } from '~/main'
|
||||||
|
import { getToken } from '~/utils/auth'
|
||||||
|
|
||||||
use([LineChart, TitleComponent, TooltipComponent, GridComponent, DataZoomComponent, CanvasRenderer])
|
use([LineChart, TitleComponent, TooltipComponent, GridComponent, DataZoomComponent, CanvasRenderer])
|
||||||
|
|
||||||
|
|||||||
@@ -30,9 +30,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { API_BASE_URL } from '../main'
|
import { API_BASE_URL } from '~/main'
|
||||||
import TimeManager from '../utils/time'
|
import TimeManager from '~/utils/time'
|
||||||
import MilkTeaActivityComponent from '../components/MilkTeaActivityComponent.vue'
|
import MilkTeaActivityComponent from '~/components/MilkTeaActivityComponent.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ActivityListPageView',
|
name: 'ActivityListPageView',
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CallbackPage from '../components/CallbackPage.vue'
|
import CallbackPage from '~/components/CallbackPage.vue'
|
||||||
import { discordExchange } from '../utils/discord'
|
import { discordExchange } from '~/utils/discord'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DiscordCallbackPageView',
|
name: 'DiscordCallbackPageView',
|
||||||
|
|||||||
@@ -24,8 +24,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import BaseInput from '../components/BaseInput.vue'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
export default {
|
export default {
|
||||||
name: 'ForgotPasswordPageView',
|
name: 'ForgotPasswordPageView',
|
||||||
components: { BaseInput },
|
components: { BaseInput },
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CallbackPage from '../components/CallbackPage.vue'
|
import CallbackPage from '~/components/CallbackPage.vue'
|
||||||
import { githubExchange } from '../utils/github'
|
import { githubExchange } from '~/utils/github'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GithubCallbackPageView',
|
name: 'GithubCallbackPageView',
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CallbackPage from '../components/CallbackPage.vue'
|
import CallbackPage from '~/components/CallbackPage.vue'
|
||||||
import { googleAuthWithToken } from '../utils/google'
|
import { googleAuthWithToken } from '~/utils/google'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'GoogleCallbackPageView',
|
name: 'GoogleCallbackPageView',
|
||||||
|
|||||||
@@ -52,14 +52,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { setToken, loadCurrentUser } from '../utils/auth'
|
import { setToken, loadCurrentUser } from '~/utils/auth'
|
||||||
import { googleAuthorize } from '../utils/google'
|
import { googleAuthorize } from '~/utils/google'
|
||||||
import { githubAuthorize } from '../utils/github'
|
import { githubAuthorize } from '~/utils/github'
|
||||||
import { discordAuthorize } from '../utils/discord'
|
import { discordAuthorize } from '~/utils/discord'
|
||||||
import { twitterAuthorize } from '../utils/twitter'
|
import { twitterAuthorize } from '~/utils/twitter'
|
||||||
import BaseInput from '../components/BaseInput.vue'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
import { registerPush } from '../utils/push'
|
import { registerPush } from '~/utils/push'
|
||||||
export default {
|
export default {
|
||||||
name: 'LoginPageView',
|
name: 'LoginPageView',
|
||||||
components: { BaseInput },
|
components: { BaseInput },
|
||||||
|
|||||||
@@ -480,23 +480,17 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted, computed } from 'vue'
|
import { ref, onMounted, computed } from 'vue'
|
||||||
import { useRouter, useRoute } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { API_BASE_URL } from '../main'
|
import { API_BASE_URL } from '~/main'
|
||||||
import BaseTimeline from '../components/BaseTimeline.vue'
|
import BaseTimeline from '~/components/BaseTimeline.vue'
|
||||||
import BasePlaceholder from '../components/BasePlaceholder.vue'
|
import BasePlaceholder from '~/components/BasePlaceholder.vue'
|
||||||
import NotificationContainer from '../components/NotificationContainer.vue'
|
import NotificationContainer from '~/components/NotificationContainer.vue'
|
||||||
import { getToken, authState } from '../utils/auth'
|
import { getToken, authState } from '~/utils/auth'
|
||||||
import {
|
import { markNotificationsRead, fetchUnreadCount, notificationState } from '~/utils/notification'
|
||||||
markNotificationsRead,
|
import { toast } from '~/main'
|
||||||
fetchUnreadCount,
|
import { stripMarkdownLength } from '~/utils/markdown'
|
||||||
notificationState,
|
import TimeManager from '~/utils/time'
|
||||||
fetchNotificationPreferences,
|
import { reactionEmojiMap } from '~/utils/reactions'
|
||||||
updateNotificationPreference,
|
|
||||||
} from '../utils/notification'
|
|
||||||
import { toast } from '../main'
|
|
||||||
import { stripMarkdownLength } from '../utils/markdown'
|
|
||||||
import TimeManager from '../utils/time'
|
|
||||||
import { reactionEmojiMap } from '../utils/reactions'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'MessagePageView',
|
name: 'MessagePageView',
|
||||||
|
|||||||
@@ -78,18 +78,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ref, onMounted, computed, watch } from 'vue'
|
|
||||||
import PostEditor from '../components/PostEditor.vue'
|
|
||||||
import CategorySelect from '../components/CategorySelect.vue'
|
|
||||||
import TagSelect from '../components/TagSelect.vue'
|
|
||||||
import PostTypeSelect from '../components/PostTypeSelect.vue'
|
|
||||||
import AvatarCropper from '../components/AvatarCropper.vue'
|
|
||||||
import FlatPickr from 'vue-flatpickr-component'
|
|
||||||
import 'flatpickr/dist/flatpickr.css'
|
import 'flatpickr/dist/flatpickr.css'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { computed, onMounted, ref, watch } from 'vue'
|
||||||
import { getToken, authState } from '../utils/auth'
|
import FlatPickr from 'vue-flatpickr-component'
|
||||||
import LoginOverlay from '../components/LoginOverlay.vue'
|
import AvatarCropper from '~/components/AvatarCropper.vue'
|
||||||
import BaseInput from '../components/BaseInput.vue'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
|
import CategorySelect from '~/components/CategorySelect.vue'
|
||||||
|
import LoginOverlay from '~/components/LoginOverlay.vue'
|
||||||
|
import PostEditor from '~/components/PostEditor.vue'
|
||||||
|
import PostTypeSelect from '~/components/PostTypeSelect.vue'
|
||||||
|
import TagSelect from '~/components/TagSelect.vue'
|
||||||
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
|
import { authState, getToken } from '~/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'NewPostPageView',
|
name: 'NewPostPageView',
|
||||||
|
|||||||
@@ -38,12 +38,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ref, onMounted, computed } from 'vue'
|
import { ref, onMounted, computed } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import PostEditor from '../../../components/PostEditor.vue'
|
import PostEditor from '~/components/PostEditor.vue'
|
||||||
import CategorySelect from '../../../components/CategorySelect.vue'
|
import CategorySelect from '~/components/CategorySelect.vue'
|
||||||
import TagSelect from '../../../components/TagSelect.vue'
|
import TagSelect from '~/components/TagSelect.vue'
|
||||||
import { API_BASE_URL, toast } from '../../../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { getToken, authState } from '../../../utils/auth'
|
import { getToken, authState } from '~/utils/auth'
|
||||||
import LoginOverlay from '../../../components/LoginOverlay.vue'
|
import LoginOverlay from '~/components/LoginOverlay.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'EditPostPageView',
|
name: 'EditPostPageView',
|
||||||
|
|||||||
@@ -234,21 +234,21 @@
|
|||||||
import { ref, computed, onMounted, onBeforeUnmount, nextTick, watch } from 'vue'
|
import { ref, computed, onMounted, onBeforeUnmount, nextTick, watch } from 'vue'
|
||||||
import VueEasyLightbox from 'vue-easy-lightbox'
|
import VueEasyLightbox from 'vue-easy-lightbox'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import CommentItem from '../../../components/CommentItem.vue'
|
import CommentItem from '~/components/CommentItem.vue'
|
||||||
import CommentEditor from '../../../components/CommentEditor.vue'
|
import CommentEditor from '~/components/CommentEditor.vue'
|
||||||
import BaseTimeline from '../../../components/BaseTimeline.vue'
|
import BaseTimeline from '~/components/BaseTimeline.vue'
|
||||||
import ArticleTags from '../../../components/ArticleTags.vue'
|
import ArticleTags from '~/components/ArticleTags.vue'
|
||||||
import ArticleCategory from '../../../components/ArticleCategory.vue'
|
import ArticleCategory from '~/components/ArticleCategory.vue'
|
||||||
import ReactionsGroup from '../../../components/ReactionsGroup.vue'
|
import ReactionsGroup from '~/components/ReactionsGroup.vue'
|
||||||
import DropdownMenu from '../../../components/DropdownMenu.vue'
|
import DropdownMenu from '~/components/DropdownMenu.vue'
|
||||||
import { renderMarkdown, handleMarkdownClick, stripMarkdownLength } from '../../../utils/markdown'
|
import { renderMarkdown, handleMarkdownClick, stripMarkdownLength } from '~/utils/markdown'
|
||||||
import { getMedalTitle } from '../../../utils/medal'
|
import { getMedalTitle } from '~/utils/medal'
|
||||||
import { API_BASE_URL, toast } from '../../../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { getToken, authState } from '../../../utils/auth'
|
import { getToken, authState } from '~/utils/auth'
|
||||||
import TimeManager from '../../../utils/time'
|
import TimeManager from '~/utils/time'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useIsMobile } from '../../../utils/screen'
|
import { useIsMobile } from '~/utils/screen'
|
||||||
import Dropdown from '../../../components/Dropdown.vue'
|
import Dropdown from '~/components/Dropdown.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'PostPageView',
|
name: 'PostPageView',
|
||||||
|
|||||||
@@ -65,11 +65,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import AvatarCropper from '~/components/AvatarCropper.vue'
|
||||||
import { getToken, fetchCurrentUser, setToken } from '../utils/auth'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
import BaseInput from '../components/BaseInput.vue'
|
import Dropdown from '~/components/Dropdown.vue'
|
||||||
import Dropdown from '../components/Dropdown.vue'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import AvatarCropper from '../components/AvatarCropper.vue'
|
import { fetchCurrentUser, getToken, setToken } from '~/utils/auth'
|
||||||
export default {
|
export default {
|
||||||
name: 'SettingsPageView',
|
name: 'SettingsPageView',
|
||||||
components: { BaseInput, Dropdown, AvatarCropper },
|
components: { BaseInput, Dropdown, AvatarCropper },
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import BaseInput from '../components/BaseInput.vue'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignupReasonPageView',
|
name: 'SignupReasonPageView',
|
||||||
|
|||||||
@@ -70,19 +70,19 @@
|
|||||||
|
|
||||||
<div class="other-signup-page-content">
|
<div class="other-signup-page-content">
|
||||||
<div class="signup-page-button" @click="googleAuthorize">
|
<div class="signup-page-button" @click="googleAuthorize">
|
||||||
<img class="signup-page-button-icon" src="../assets/icons/google.svg" alt="Google Logo" />
|
<img class="signup-page-button-icon" src="~/assets/icons/google.svg" alt="Google Logo" />
|
||||||
<div class="signup-page-button-text">Google 注册</div>
|
<div class="signup-page-button-text">Google 注册</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signup-page-button" @click="signupWithGithub">
|
<div class="signup-page-button" @click="signupWithGithub">
|
||||||
<img class="signup-page-button-icon" src="../assets/icons/github.svg" alt="GitHub Logo" />
|
<img class="signup-page-button-icon" src="~/assets/icons/github.svg" alt="GitHub Logo" />
|
||||||
<div class="signup-page-button-text">GitHub 注册</div>
|
<div class="signup-page-button-text">GitHub 注册</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signup-page-button" @click="signupWithDiscord">
|
<div class="signup-page-button" @click="signupWithDiscord">
|
||||||
<img class="signup-page-button-icon" src="../assets/icons/discord.svg" alt="Discord Logo" />
|
<img class="signup-page-button-icon" src="~/assets/icons/discord.svg" alt="Discord Logo" />
|
||||||
<div class="signup-page-button-text">Discord 注册</div>
|
<div class="signup-page-button-text">Discord 注册</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="signup-page-button" @click="signupWithTwitter">
|
<div class="signup-page-button" @click="signupWithTwitter">
|
||||||
<img class="signup-page-button-icon" src="../assets/icons/twitter.svg" alt="Twitter Logo" />
|
<img class="signup-page-button-icon" src="~/assets/icons/twitter.svg" alt="Twitter Logo" />
|
||||||
<div class="signup-page-button-text">Twitter 注册</div>
|
<div class="signup-page-button-text">Twitter 注册</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -90,12 +90,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import BaseInput from '~/components/BaseInput.vue'
|
||||||
import { googleAuthorize } from '../utils/google'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { githubAuthorize } from '../utils/github'
|
import { discordAuthorize } from '~/utils/discord'
|
||||||
import { discordAuthorize } from '../utils/discord'
|
import { githubAuthorize } from '~/utils/github'
|
||||||
import { twitterAuthorize } from '../utils/twitter'
|
import { googleAuthorize } from '~/utils/google'
|
||||||
import BaseInput from '../components/BaseInput.vue'
|
import { twitterAuthorize } from '~/utils/twitter'
|
||||||
export default {
|
export default {
|
||||||
name: 'SignupPageView',
|
name: 'SignupPageView',
|
||||||
components: { BaseInput },
|
components: { BaseInput },
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CallbackPage from '../components/CallbackPage.vue'
|
import CallbackPage from '~/components/CallbackPage.vue'
|
||||||
import { twitterExchange } from '../utils/twitter'
|
import { twitterExchange } from '~/utils/twitter'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TwitterCallbackPageView',
|
name: 'TwitterCallbackPageView',
|
||||||
|
|||||||
@@ -299,16 +299,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import { ref, computed, onMounted, watch } from 'vue'
|
import { ref, computed, onMounted, watch } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { API_BASE_URL, toast } from '../main'
|
import { API_BASE_URL, toast } from '~/main'
|
||||||
import { getToken, authState } from '../../utils/auth'
|
import { getToken, authState } from '~/utils/auth'
|
||||||
import BaseTimeline from '../components/BaseTimeline.vue'
|
import BaseTimeline from '~/components/BaseTimeline.vue'
|
||||||
import UserList from '../components/UserList.vue'
|
import UserList from '~/components/UserList.vue'
|
||||||
import BasePlaceholder from '../components/BasePlaceholder.vue'
|
import BasePlaceholder from '~/components/BasePlaceholder.vue'
|
||||||
import LevelProgress from '../components/LevelProgress.vue'
|
import LevelProgress from '~/components/LevelProgress.vue'
|
||||||
import { stripMarkdown, stripMarkdownLength } from '../utils/markdown'
|
import { stripMarkdown, stripMarkdownLength } from '~/utils/markdown'
|
||||||
import TimeManager from '../utils/time'
|
import TimeManager from '~/utils/time'
|
||||||
import { prevLevelExp } from '../utils/level'
|
import { prevLevelExp } from '~/utils/level'
|
||||||
import AchievementList from '../components/AchievementList.vue'
|
import AchievementList from '~/components/AchievementList.vue'
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
alias: ['/users/:id/'],
|
alias: ['/users/:id/'],
|
||||||
|
|||||||
Reference in New Issue
Block a user