refactor(client): Use symbol
This commit is contained in:
@ -17,6 +17,7 @@ import * as os from '@client/os';
|
||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||
import { resolve } from '@client/router';
|
||||
import { url } from '@client/config';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -51,8 +52,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -22,6 +22,7 @@ import XNotes from '@client/components/notes.vue';
|
||||
import XHeader from '@client/ui/_common_/header.vue';
|
||||
import { deckStore } from '@client/ui/deck/deck-store';
|
||||
import * as os from '@client/os';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -51,8 +52,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -20,6 +20,7 @@ import * as os from '@client/os';
|
||||
import copyToClipboard from '@client/scripts/copy-to-clipboard';
|
||||
import { resolve } from '@client/router';
|
||||
import { url } from '@client/config';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -54,8 +55,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -63,6 +63,7 @@ import XCommon from './_common_/common.vue';
|
||||
import XHeader from './_common_/header.vue';
|
||||
import * as os from '@client/os';
|
||||
import { sidebarDef } from '@client/sidebar';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
const MOBILE_THRESHOLD = 600;
|
||||
@ -125,8 +126,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
document.title = `${this.pageInfo.title} | ${instanceName}`;
|
||||
}
|
||||
},
|
||||
|
@ -64,6 +64,7 @@ import XHeader from './_common_/header.vue';
|
||||
import XSide from './default.side.vue';
|
||||
import * as os from '@client/os';
|
||||
import { sidebarDef } from '@client/sidebar';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
||||
@ -144,8 +145,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
document.title = `${this.pageInfo.title} | ${instanceName}`;
|
||||
}
|
||||
},
|
||||
|
@ -49,6 +49,7 @@ import MkPagination from '@client/components/ui/pagination.vue';
|
||||
import MkButton from '@client/components/ui/button.vue';
|
||||
import XHeader from './header.vue';
|
||||
import { ColdDeviceStorage } from '@client/store';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
||||
@ -110,8 +111,8 @@ export default defineComponent({
|
||||
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -61,6 +61,7 @@ import MkButton from '@client/components/ui/button.vue';
|
||||
import XHeader from './header.vue';
|
||||
import XKanban from './kanban.vue';
|
||||
import { ColdDeviceStorage } from '@client/store';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
const DESKTOP_THRESHOLD = 1100;
|
||||
|
||||
@ -124,8 +125,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -28,6 +28,7 @@ import { faBell } from '@fortawesome/free-regular-svg-icons';
|
||||
import { host } from '@client/config';
|
||||
import XHeader from './_common_/header.vue';
|
||||
import XCommon from './_common_/common.vue';
|
||||
import * as symbols from '@client/symbols';
|
||||
|
||||
export default defineComponent({
|
||||
components: {
|
||||
@ -50,8 +51,8 @@ export default defineComponent({
|
||||
methods: {
|
||||
changePage(page) {
|
||||
if (page == null) return;
|
||||
if (page.INFO) {
|
||||
this.pageInfo = page.INFO;
|
||||
if (page[symbols.PAGE_INFO]) {
|
||||
this.pageInfo = page[symbols.PAGE_INFO];
|
||||
}
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user