Skip to content

Commit

Permalink
rename a few loki to session
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilb committed Feb 18, 2022
1 parent d66716d commit 3fed220
Show file tree
Hide file tree
Showing 28 changed files with 98 additions and 181 deletions.
3 changes: 0 additions & 3 deletions _locales/en/messages.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"privacyPolicy": "Terms & Privacy Policy",
"copyErrorAndQuit": "Copy error and quit",
"unknown": "Unknown",
"databaseError": "Database Error",
Expand All @@ -17,15 +16,13 @@
"editMenuCut": "Cut",
"editMenuCopy": "Copy",
"editMenuPaste": "Paste",
"editMenuPasteAndMatchStyle": "Paste and Match Style",
"editMenuDelete": "Delete",
"editMenuDeleteContact": "Delete Contact",
"editMenuDeleteGroup": "Delete Group",
"editMenuSelectAll": "Select all",
"windowMenuClose": "Close Window",
"windowMenuMinimize": "Minimize",
"windowMenuZoom": "Zoom",
"windowMenuBringAllToFront": "Bring All to Front",
"viewMenuResetZoom": "Actual Size",
"viewMenuZoomIn": "Zoom In",
"viewMenuZoomOut": "Zoom Out",
Expand Down
1 change: 0 additions & 1 deletion app/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ let environment;
// In production mode, NODE_ENV cannot be customized by the user
if (isDevelopment) {
environment = process.env.NODE_ENV || 'development';
process.env.LOKI_DEV = 1;
} else {
environment = 'production';
}
Expand Down
11 changes: 0 additions & 11 deletions app/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ exports.createTemplate = (options, messages) => {
role: 'paste',
label: messages.editMenuPaste,
},
{
role: 'pasteandmatchstyle',
label: messages.editMenuPasteAndMatchStyle,
},
{
role: 'delete',
label: messages.editMenuDelete,
Expand Down Expand Up @@ -242,13 +238,6 @@ function updateForMac(template, messages, options) {
label: messages.show,
click: showWindow,
},
{
type: 'separator',
},
{
role: 'front',
label: messages.windowMenuBringAllToFront,
},
];

return template;
Expand Down
7 changes: 0 additions & 7 deletions app/spell_check.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,6 @@ exports.setup = (browserWindow, messages) => {
template.push({ label: messages.editMenuPaste, role: 'paste' });
}

if (editFlags.canPaste) {
template.push({
label: messages.editMenuPasteAndMatchStyle,
role: 'pasteAndMatchStyle',
});
}

// Only enable select all in editors because select all in non-editors
// results in all the UI being selected
if (editFlags.canSelectAll && params.isEditable) {
Expand Down
77 changes: 38 additions & 39 deletions debug_log.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<html>
<head>
<meta http-equiv="Content-Security-Policy"
content="default-src 'none';
<head>
<meta
http-equiv="Content-Security-Policy"
content="default-src 'none';
child-src 'self';
connect-src 'self' https: wss:;
font-src 'self';
Expand All @@ -12,42 +13,40 @@
object-src 'none';
script-src 'self';
style-src 'self' 'unsafe-inline';"
>
<link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" />
<style>
</style>
</head>
<body class='debug-log-window'>
</body>
<script type='text/x-tmpl-mustache' id='debug-log'>
<div class='content'>
<div>
<a class='x close' alt='close debug log' href='#'></a>
<h1> {{ title }} </h1>
<p> {{ debugLogExplanation }}</p>
/>
<link href="stylesheets/manifest.css" rel="stylesheet" type="text/css" />
<style></style>
</head>
<body class="debug-log-window"></body>
<script type="text/x-tmpl-mustache" id="debug-log">
<div class='content'>
<div>
<a class='x close' alt='close debug log' href='#'></a>
<h1> {{ title }} </h1>
<p> {{ debugLogExplanation }}</p>
</div>
<textarea spellcheck='false' rows='5'></textarea>
<div class='buttons'>
<button class='grey submit'>{{ submit }}</button>
</div>
<div class='result'>
</div>
</div>
<textarea spellcheck='false' rows='5'></textarea>
<div class='buttons'>
<button class='grey submit'>{{ submit }}</button>
</script>
<script type="text/x-tmpl-mustache" id="debug-log-link">
<div class='input-group clearfix'>
<input type='text' class='link' readonly value='{{ url }}' />
<a class='open' alt='open in a new browser tab' target='_blank' href='{{ url }}'></a>
</div>
<div class='result'>
</div>
</div>
</script>
<script type='text/x-tmpl-mustache' id='debug-log-link'>
<div class='input-group clearfix'>
<input type='text' class='link' readonly value='{{ url }}' />
<a class='open' alt='open in a new browser tab' target='_blank' href='{{ url }}'></a>
</div>
<p>
<a class='report-link' target='_blank'
href='https://github.com/loki-project/session-desktop/issues/new/'>
{{ reportIssue }}
</a>
</p>
</script>
<script type='text/javascript' src='js/components.js'></script>
<script type='text/javascript' src='js/views/whisper_view.js'></script>
<script type='text/javascript' src='js/views/debug_log_view.js'></script>
<script type='text/javascript' src='js/debug_log_start.js'></script>
<p>
<a class='report-link' target='_blank'
href='https://github.com/oxen-io/session-desktop/issues/new/'>
{{ reportIssue }}
</a>
</p>
</script>
<script type="text/javascript" src="js/components.js"></script>
<script type="text/javascript" src="js/views/whisper_view.js"></script>
<script type="text/javascript" src="js/views/debug_log_view.js"></script>
<script type="text/javascript" src="js/debug_log_start.js"></script>
</html>
2 changes: 1 addition & 1 deletion fix_broken_perms.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set -e
find release/linux -type d | xargs chmod 755
find release/linux -type f | xargs chmod 644
chmod +x release/linux/loki-messenger*
chmod +x release/linux/session-desktop*
8 changes: 0 additions & 8 deletions js/modules/signal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ const { SessionInboxView } = require('../../ts/components/SessionInboxView');
// Types
const SettingsType = require('../../ts/types/Settings');

// Views
const Initialization = require('./views/initialization');

exports.setup = () => {
Data.init();

Expand All @@ -35,10 +32,6 @@ exports.setup = () => {
Settings: SettingsType,
};

const Views = {
Initialization,
};

return {
Components,
Crypto,
Expand All @@ -49,6 +42,5 @@ exports.setup = () => {
Settings,
Types,
Util,
Views,
};
};
47 changes: 0 additions & 47 deletions js/modules/views/initialization.js

This file was deleted.

4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const {
systemPreferences,
} = electron;

// FIXME Hardcoding appId to prevent build failrues on release.
// FIXME Hardcoding appId to prevent build failures on release.
// const appUserModelId = packageJson.build.appId;
const appUserModelId = 'com.loki-project.messenger-desktop';
console.log('Set Windows Application User Model ID (AUMID)', {
Expand Down Expand Up @@ -986,7 +986,7 @@ ipc.on('set-call-media-permissions', (event, value) => {
event.sender.send('set-success-call-media-permissions', null);
});

// Loki - Auto updating
// Session - Auto updating
ipc.on('get-auto-update-setting', event => {
const configValue = userConfig.get('autoUpdate');
// eslint-disable-next-line no-param-reassign
Expand Down
2 changes: 1 addition & 1 deletion preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ window.isDev = () => config.environment === 'development';
window.getCommitHash = () => config.commitHash;
window.getNodeVersion = () => config.node_version;

window.lokiFeatureFlags = {
window.sessionFeatureFlags = {
useOnionRequests: true,
useMessageRequests: false,
useCallMessage: true,
Expand Down
2 changes: 1 addition & 1 deletion ts/components/conversation/ConversationHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ const CallButton = () => {
isMe ||
!selectedConvoKey ||
isBlocked ||
!window.lokiFeatureFlags.useCallMessage
!window.sessionFeatureFlags.useCallMessage
) {
return null;
}
Expand Down
2 changes: 1 addition & 1 deletion ts/components/leftpane/LeftPaneMessageSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class LeftPaneMessageSection extends React.Component<Props> {
return (
<div className="module-conversations-list-content">
<SessionSearchInput />
{window.lokiFeatureFlags.useMessageRequests ? (
{window.sessionFeatureFlags.useMessageRequests ? (
<MessageRequestsBanner
handleOnClick={() => {
window.inboxStore?.dispatch(setOverlayMode('message-requests'));
Expand Down
2 changes: 1 addition & 1 deletion ts/components/leftpane/overlay/OverlayMessageRequest.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import useKey from 'react-use/lib/useKey';
*/
async function handleBlockAllRequestsClick(messageRequestSetting: boolean) {
const messageRequestsEnabled =
messageRequestSetting && window?.lokiFeatureFlags?.useMessageRequests;
messageRequestSetting && window?.sessionFeatureFlags?.useMessageRequests;

if (!messageRequestsEnabled) {
return;
Expand Down
4 changes: 2 additions & 2 deletions ts/components/settings/section/CategoryPrivacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export const SettingsCategoryPrivacy = (props: {
const forceUpdate = useUpdate();
const dispatch = useDispatch();

const hasMessageRequestFlag = window.lokiFeatureFlags.useMessageRequests;
const hasMessageRequestFlag = window.sessionFeatureFlags.useMessageRequests;

if (props.hasPassword !== null) {
return (
Expand All @@ -71,7 +71,7 @@ export const SettingsCategoryPrivacy = (props: {
description={window.i18n('mediaPermissionsDescription')}
active={Boolean(window.getSettingValue('media-permissions'))}
/>
{window.lokiFeatureFlags.useCallMessage && (
{window.sessionFeatureFlags.useCallMessage && (
<SessionToggleWithDescription
onClickToggle={async () => {
await toggleCallMediaPermissions(forceUpdate);
Expand Down
4 changes: 2 additions & 2 deletions ts/models/conversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1438,7 +1438,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {

if (
isMe &&
window.lokiFeatureFlags.useMessageRequests &&
window.sessionFeatureFlags.useMessageRequests &&
window.inboxStore?.getState().userConfig.messageRequests
) {
await this.setIsApproved(true);
Expand Down Expand Up @@ -1491,7 +1491,7 @@ export class ConversationModel extends Backbone.Model<ConversationAttributes> {
return false;
}
const msgRequestsEnabled =
window.lokiFeatureFlags.useMessageRequests &&
window.sessionFeatureFlags.useMessageRequests &&
window.inboxStore?.getState().userConfig.messageRequests;

// if msg requests are unused, we have to send typing (this is already a private active unblocked convo)
Expand Down
2 changes: 1 addition & 1 deletion ts/receiver/configMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const handleContactReceived = async (
}

if (
window.lokiFeatureFlags.useMessageRequests &&
window.sessionFeatureFlags.useMessageRequests &&
window.inboxStore?.getState().userConfig.messageRequests
) {
if (contactReceived.isApproved) {
Expand Down
2 changes: 1 addition & 1 deletion ts/receiver/contentMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ export async function innerHandleSwarmContentMessage(
if (content.unsendMessage) {
await handleUnsendMessage(envelope, content.unsendMessage as SignalService.Unsend);
}
if (content.callMessage && window.lokiFeatureFlags?.useCallMessage) {
if (content.callMessage && window.sessionFeatureFlags?.useCallMessage) {
await handleCallMessage(envelope, content.callMessage as SignalService.CallMessage);
}
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion ts/receiver/queuedJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ async function handleRegularMessage(
if (type === 'outgoing') {
await handleSyncedReceipts(message, conversation);

if (window.lokiFeatureFlags.useMessageRequests) {
if (window.sessionFeatureFlags.useMessageRequests) {
// assumes sync receipts are always from linked device outgoings
await conversation.setIsApproved(true);
}
Expand Down
2 changes: 1 addition & 1 deletion ts/session/apis/seed_node_api/SeedNodeAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export async function fetchSnodePoolFromSeedNodeWithRetries(
return fetchSnodePool;
} catch (e) {
window?.log?.warn(
'LokiSnodeAPI::fetchSnodePoolFromSeedNodeWithRetries - error',
'SessionSnodeAPI::fetchSnodePoolFromSeedNodeWithRetries - error',
e.code,
e.message
);
Expand Down
Loading

0 comments on commit 3fed220

Please sign in to comment.