mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-11-09 16:50:28 +03:00
Remove old settings components (#2296)
This commit is contained in:
parent
82805dcfdd
commit
12ae94cd60
37 changed files with 6 additions and 3476 deletions
|
|
@ -1,13 +1,6 @@
|
|||
import appDispatcher from '../dispatcher';
|
||||
import cons from '../state/cons';
|
||||
|
||||
export function openSpaceSettings(roomId, tabText) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.OPEN_SPACE_SETTINGS,
|
||||
roomId,
|
||||
tabText,
|
||||
});
|
||||
}
|
||||
|
||||
export function openSpaceAddExisting(roomId, spaces = false) {
|
||||
appDispatcher.dispatch({
|
||||
|
|
@ -17,14 +10,6 @@ export function openSpaceAddExisting(roomId, spaces = false) {
|
|||
});
|
||||
}
|
||||
|
||||
export function toggleRoomSettings(roomId, tabText) {
|
||||
appDispatcher.dispatch({
|
||||
type: cons.actions.navigation.TOGGLE_ROOM_SETTINGS,
|
||||
roomId,
|
||||
tabText
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function openCreateRoom(isSpace = false, parentId = null) {
|
||||
appDispatcher.dispatch({
|
||||
|
|
|
|||
|
|
@ -6,22 +6,6 @@ const cons = {
|
|||
USER_ID: 'cinny_user_id',
|
||||
BASE_URL: 'cinny_hs_base_url',
|
||||
},
|
||||
DEVICE_DISPLAY_NAME: 'Cinny Web',
|
||||
IN_CINNY_SPACES: 'in.cinny.spaces',
|
||||
supportEventTypes: [
|
||||
'm.room.create',
|
||||
'm.room.message',
|
||||
'm.room.encrypted',
|
||||
'm.room.member',
|
||||
'm.sticker',
|
||||
],
|
||||
supportReceiptTypes: ['m.read', 'm.read.private'],
|
||||
notifs: {
|
||||
DEFAULT: 'default',
|
||||
ALL_MESSAGES: 'all_messages',
|
||||
MENTIONS_AND_KEYWORDS: 'mentions_and_keywords',
|
||||
MUTE: 'mute',
|
||||
},
|
||||
status: {
|
||||
PRE_FLIGHT: 'pre-flight',
|
||||
IN_FLIGHT: 'in-flight',
|
||||
|
|
@ -30,9 +14,7 @@ const cons = {
|
|||
},
|
||||
actions: {
|
||||
navigation: {
|
||||
OPEN_SPACE_SETTINGS: 'OPEN_SPACE_SETTINGS',
|
||||
OPEN_SPACE_ADDEXISTING: 'OPEN_SPACE_ADDEXISTING',
|
||||
TOGGLE_ROOM_SETTINGS: 'TOGGLE_ROOM_SETTINGS',
|
||||
OPEN_CREATE_ROOM: 'OPEN_CREATE_ROOM',
|
||||
OPEN_JOIN_ALIAS: 'OPEN_JOIN_ALIAS',
|
||||
OPEN_INVITE_USER: 'OPEN_INVITE_USER',
|
||||
|
|
@ -44,9 +26,7 @@ const cons = {
|
|||
},
|
||||
events: {
|
||||
navigation: {
|
||||
SPACE_SETTINGS_OPENED: 'SPACE_SETTINGS_OPENED',
|
||||
SPACE_ADDEXISTING_OPENED: 'SPACE_ADDEXISTING_OPENED',
|
||||
ROOM_SETTINGS_TOGGLED: 'ROOM_SETTINGS_TOGGLED',
|
||||
CREATE_ROOM_OPENED: 'CREATE_ROOM_OPENED',
|
||||
JOIN_ALIAS_OPENED: 'JOIN_ALIAS_OPENED',
|
||||
INVITE_USER_OPENED: 'INVITE_USER_OPENED',
|
||||
|
|
|
|||
|
|
@ -19,19 +19,9 @@ class Navigation extends EventEmitter {
|
|||
|
||||
navigate(action) {
|
||||
const actions = {
|
||||
[cons.actions.navigation.OPEN_SPACE_SETTINGS]: () => {
|
||||
this.emit(cons.events.navigation.SPACE_SETTINGS_OPENED, action.roomId, action.tabText);
|
||||
},
|
||||
[cons.actions.navigation.OPEN_SPACE_ADDEXISTING]: () => {
|
||||
this.emit(cons.events.navigation.SPACE_ADDEXISTING_OPENED, action.roomId, action.spaces);
|
||||
},
|
||||
[cons.actions.navigation.TOGGLE_ROOM_SETTINGS]: () => {
|
||||
this.emit(
|
||||
cons.events.navigation.ROOM_SETTINGS_TOGGLED,
|
||||
action.roomId,
|
||||
action.tabText
|
||||
);
|
||||
},
|
||||
[cons.actions.navigation.OPEN_CREATE_ROOM]: () => {
|
||||
this.emit(
|
||||
cons.events.navigation.CREATE_ROOM_OPENED,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue