🔄 Rename all "twake" instances to "tdrive"

🔄 Rename all "twake" instances to "tdrive"
This commit is contained in:
Montassar Ghanmy
2023-04-10 14:12:00 +01:00
committed by GitHub
parent 88cba77421
commit d91a13e2cc
323 changed files with 1021 additions and 1023 deletions
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-empty-function */
/* eslint-disable @typescript-eslint/no-explicit-any */
import Globals from 'app/features/global/services/globals-twake-app-service';
import Globals from 'app/features/global/services/globals-tdrive-app-service';
import Requests from 'app/features/global/framework/requests-api-service';
class GroupedQueryApi {
@@ -1,5 +1,5 @@
export default class LocalStorage {
static prefix = 'twake:';
static prefix = 'tdrive:';
static setItem(key: string, value: unknown) {
window.localStorage.setItem(`${LocalStorage.prefix}${key}`, JSON.stringify(value));
@@ -28,7 +28,7 @@ export default class LocalStorage {
if (key) {
const depreciatedKeysRemove =
[
'twake-collections-db',
'tdrive-collections-db',
'm_input',
'language',
'jwt',
@@ -3,8 +3,8 @@ import ServiceRegistry from 'app/features/global/framework/registry-service';
const SERVICE_SUFFIX = 'ChannelServiceImpl';
export function TwakeService(name: string): ClassDecorator {
return function DecoratedTwakeService(target: any): any {
export function TdriveService(name: string): ClassDecorator {
return function DecoratedTdriveService(target: any): any {
const originalConstrutor = target;
const decorated: any = function (...args: any) {
@@ -1,6 +1,6 @@
import { useEffect, useState } from 'react';
import { Maybe } from 'app/features/global/types/global-types';
import Globals from '../services/globals-twake-app-service';
import Globals from '../services/globals-tdrive-app-service';
import JWTStorage from '../../auth/jwt-storage-service';
import Logger from '../framework/logger-service';
@@ -2,7 +2,7 @@
import { useEffect } from 'react';
import { useCurrentUser } from 'app/features/users/hooks/use-current-user';
import Globals from 'app/features/global/services/globals-twake-app-service';
import Globals from 'app/features/global/services/globals-tdrive-app-service';
import Logger from 'app/features/global/framework/logger-service';
let initiatedService = false;
@@ -2,7 +2,7 @@
import { Modal } from 'antd';
import Languages from 'app/features/global/services/languages-service';
import { TwakeService } from '../framework/registry-decorator-service';
import { TdriveService } from '../framework/registry-decorator-service';
const { confirm, info } = Modal;
@@ -10,7 +10,7 @@ type Options = {
title?: string;
text?: string;
};
@TwakeService('Alert')
@TdriveService('Alert')
class AlertServiceService {
alert(onClose: () => void, options?: Options) {
info({
@@ -24,7 +24,7 @@ availableFeaturesWithDefaults.set(FeatureNames.UNLIMITED_STORAGE, true);
availableFeaturesWithDefaults.set(FeatureNames.COMPANY_INVITE_MEMBER, true);
/**
* ChannelServiceImpl that allow you to manage feature flipping in Twake using react feature toggles
* ChannelServiceImpl that allow you to manage feature flipping in Tdrive using react feature toggles
*/
class FeatureTogglesService {
public activeFeatureNames: FeatureNames[];
@@ -31,7 +31,7 @@ document.body.addEventListener('dragover', e => e.preventDefault());
document.body.addEventListener('dragenter', e => e.preventDefault());
document.body.addEventListener('drop', e => e.preventDefault());
class TwakeApp {
class TdriveApp {
window: Window;
environment: EnvironmentType;
store_public_access_get_data: any;
@@ -67,6 +67,6 @@ class TwakeApp {
}
}
const app = new TwakeApp();
(window as any).TwakeApp = app;
const app = new TdriveApp();
(window as any).TdriveApp = app;
export default app;
@@ -6,7 +6,7 @@ import Collections from 'app/deprecated/CollectionsV1/Collections/Collections.js
import PseudoMarkdownDictionary from 'components/twacode/pseudo-markdown-dictionary';
import anchorme from 'anchorme';
import emojis_original_service from 'emojione';
import Globals from 'app/features/global/services/globals-twake-app-service';
import Globals from 'app/features/global/services/globals-tdrive-app-service';
class PseudoMarkdownCompiler {
saved_messages: { [key: string]: any } = {};
@@ -1,4 +1,4 @@
import Globals from './globals-twake-app-service';
import Globals from './globals-tdrive-app-service';
import Logger from '../framework/logger-service';
import JWT from '../../auth/jwt-storage-service';
import WebSocketService, { WebSocketOptions } from './websocket-service';
@@ -1,5 +1,5 @@
import environment from 'app/environment/environment';
import Globals from 'app/features/global/services/globals-twake-app-service';
import Globals from 'app/features/global/services/globals-tdrive-app-service';
export function addApiUrlIfNeeded(url: string, asCssUrl?: boolean): string {
function _wrap(url: string): string {
@@ -7,7 +7,7 @@ import 'moment/locale/es';
import Observable from 'app/deprecated/CollectionsV1/observable.js';
import UserService from 'app/features/users/services/current-user-service';
import Globals from 'app/features/global/services/globals-twake-app-service';
import Globals from 'app/features/global/services/globals-tdrive-app-service';
class DateTime extends Observable {
constructor() {
@@ -1,6 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { capitalize } from 'lodash';
import Globals from 'app/features/global/services/globals-twake-app-service';
import Globals from 'app/features/global/services/globals-tdrive-app-service';
class WindowState {
public readonly app_name: string = 'Tdrive';