Skip to content

Commit

Permalink
chore: move constants file
Browse files Browse the repository at this point in the history
  • Loading branch information
moughxyz committed Feb 18, 2022
1 parent 0369d03 commit 12f4d5f
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/ApplicationView.tsx
Expand Up @@ -7,7 +7,7 @@ import {
PermissionDialog,
removeFromArray,
} from '@standardnotes/snjs';
import { PANEL_NAME_NOTES, PANEL_NAME_NAVIGATION } from '@/views/constants';
import { PANEL_NAME_NOTES, PANEL_NAME_NAVIGATION } from '@/constants';
import { STRING_DEFAULT_FILE_ERROR } from '@/strings';
import { alertDialog } from '@/services/alertService';
import { WebAppEvent, WebApplication } from '@/ui_models/application';
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/ChangeEditorButton.tsx
@@ -1,6 +1,6 @@
import { WebApplication } from '@/ui_models/application';
import { AppState } from '@/ui_models/app_state';
import { MENU_MARGIN_FROM_APP_BORDER } from '@/views/constants';
import { MENU_MARGIN_FROM_APP_BORDER } from '@/constants';
import {
Disclosure,
DisclosureButton,
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/Navigation.tsx
@@ -1,7 +1,7 @@
import { SmartTagsSection } from '@/components/Tags/SmartTagsSection';
import { TagsSection } from '@/components/Tags/TagsSection';
import { WebApplication } from '@/ui_models/application';
import { PANEL_NAME_NAVIGATION } from '@/views/constants';
import { PANEL_NAME_NAVIGATION } from '@/constants';
import { ApplicationEvent, PrefKey } from '@standardnotes/snjs';
import { observer } from 'mobx-react-lite';
import { FunctionComponent } from 'preact';
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/NotesList.tsx
Expand Up @@ -9,7 +9,7 @@ import { NotesListItem } from './NotesListItem';
import {
FOCUSABLE_BUT_NOT_TABBABLE,
NOTES_LIST_SCROLL_THRESHOLD,
} from '@/views/constants';
} from '@/constants';

type Props = {
application: WebApplication;
Expand Down
Expand Up @@ -4,7 +4,7 @@ import { AppState } from '@/ui_models/app_state';
import {
MENU_MARGIN_FROM_APP_BORDER,
MAX_MENU_SIZE_MULTIPLIER,
} from '@/views/constants';
} from '@/constants';
import {
Disclosure,
DisclosureButton,
Expand Down
Expand Up @@ -17,7 +17,7 @@ import {
MENU_MARGIN_FROM_APP_BORDER,
MAX_MENU_SIZE_MULTIPLIER,
BYTES_IN_ONE_MEGABYTE,
} from '@/views/constants';
} from '@/constants';

export type NotesOptionsProps = {
application: WebApplication;
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/NotesView.tsx
@@ -1,7 +1,7 @@
import { KeyboardKey, KeyboardModifier } from '@/services/ioService';
import { WebApplication } from '@/ui_models/application';
import { AppState } from '@/ui_models/app_state';
import { PANEL_NAME_NOTES } from '@/views/constants';
import { PANEL_NAME_NOTES } from '@/constants';
import { PrefKey } from '@standardnotes/snjs';
import { observer } from 'mobx-react-lite';
import { FunctionComponent } from 'preact';
Expand Down
@@ -1,4 +1,4 @@
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/views/constants';
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/constants';
import { FunctionComponent } from 'preact';

type HistoryListItemProps = {
Expand Down
@@ -1,4 +1,4 @@
import { DAYS_IN_A_WEEK, DAYS_IN_A_YEAR } from '@/views/constants';
import { DAYS_IN_A_WEEK, DAYS_IN_A_YEAR } from '@/constants';
import {
HistoryEntry,
NoteHistoryEntry,
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/menu/MenuItem.tsx
Expand Up @@ -4,7 +4,7 @@ import { JSXInternal } from 'preact/src/jsx';
import { Icon } from '../Icon';
import { Switch, SwitchProps } from '../Switch';
import { IconType } from '@standardnotes/snjs';
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/views/constants';
import { FOCUSABLE_BUT_NOT_TABBABLE } from '@/constants';

export enum MenuItemType {
IconButton,
Expand Down
5 changes: 1 addition & 4 deletions app/assets/javascripts/components/utils.ts
@@ -1,8 +1,5 @@
import { KeyboardKey } from '@/services/ioService';
import {
FOCUSABLE_BUT_NOT_TABBABLE,
MILLISECONDS_IN_A_DAY,
} from '@/views/constants';
import { FOCUSABLE_BUT_NOT_TABBABLE, MILLISECONDS_IN_A_DAY } from '@/constants';
import {
StateUpdater,
useCallback,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion app/assets/javascripts/ui_models/app_state/notes_state.ts
@@ -1,7 +1,7 @@
import { confirmDialog } from '@/services/alertService';
import { KeyboardModifier } from '@/services/ioService';
import { StringEmptyTrash, Strings, StringUtils } from '@/strings';
import { MENU_MARGIN_FROM_APP_BORDER } from '@/views/constants';
import { MENU_MARGIN_FROM_APP_BORDER } from '@/constants';
import {
UuidString,
SNNote,
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/utils/index.ts
@@ -1,6 +1,6 @@
import { Platform, platformFromString } from '@standardnotes/snjs';
import { IsDesktopPlatform, IsWebPlatform } from '@/version';
import { EMAIL_REGEX } from '@Views/constants';
import { EMAIL_REGEX } from '../constants';
export { isMobile } from './isMobile';

declare const process: {
Expand Down

0 comments on commit 12f4d5f

Please sign in to comment.