finish removing legacy app branding references
This commit is contained in:
@@ -3,9 +3,9 @@ const globalConfig = {
|
||||
url:
|
||||
process.env.NODE_ENV === 'development' ? '' : process.env.PUBLIC_URL || '',
|
||||
isOfficial: !!(process.env.PUBLIC_URL && process.env.PUBLIC_URL.length > 0),
|
||||
install_en_docs: 'https://docs.olares.com/manual/get-started/?redirect=false',
|
||||
install_en_docs: 'https://docs.beos.local/manual/get-started/?redirect=false',
|
||||
install_zh_docs:
|
||||
'https://docs.olares.com/zh/manual/get-started/?redirect=false'
|
||||
'https://docs.beos.local/zh/manual/get-started/?redirect=false'
|
||||
};
|
||||
|
||||
export default globalConfig;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<q-page class="column items-center justify-center">
|
||||
<img src="../../assets/desktop/landscape.svg" />
|
||||
<p class="title q-mt-lg">Olares</p>
|
||||
<p class="title q-mt-lg">beOS Pro</p>
|
||||
<p class="content">{{ t('landscape_message') }}</p>
|
||||
</q-page>
|
||||
</template>
|
||||
|
||||
@@ -55,7 +55,7 @@ const options = [
|
||||
];
|
||||
const initOption = {
|
||||
key: 'sub1',
|
||||
label: `${AppDetailStore.user.username}’s Olares`,
|
||||
label: `${AppDetailStore.user.username}’s beOS Pro`,
|
||||
children: options
|
||||
};
|
||||
const items = ref([initOption]);
|
||||
|
||||
@@ -207,14 +207,14 @@ const fetchData = (showLoading = true, autofresh = false) => {
|
||||
const sortApps = computed(() => {
|
||||
const target = get(monitoringData.value, `${selected.value.sortBy}`, []);
|
||||
const data = target.map((item) => {
|
||||
const isOlaresApp = item.name === OLARES_APP;
|
||||
const isBeOSApp = item.name === OLARES_APP;
|
||||
const firstEntrance = get(item, 'entrances[0]', {});
|
||||
const firstEntranceFormat = isOlaresApp
|
||||
const firstEntranceFormat = isBeOSApp
|
||||
? { ...firstEntrance, title: item.title, icon: item.icon }
|
||||
: firstEntrance;
|
||||
return {
|
||||
...item,
|
||||
entrances: isOlaresApp
|
||||
entrances: isBeOSApp
|
||||
? [{ ...firstEntrance, icon: item.icon }]
|
||||
: item.entrances,
|
||||
currentEntrance: item.currentEntrance
|
||||
|
||||
@@ -235,7 +235,7 @@ const options = computed(() => {
|
||||
|
||||
const options = clusterOptions.value.concat(defaultOptions);
|
||||
|
||||
return FanStore.isOlaresOneDevice ? options.concat(fanOptions) : options;
|
||||
return FanStore.isBeOSOneDevice ? options.concat(fanOptions) : options;
|
||||
});
|
||||
|
||||
const gpuData = ref();
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
:title="$t('USER_RESOURCES', { name: appDetail.user.username })"
|
||||
>
|
||||
<template #avatar>
|
||||
<OlaresAvatar class="terminu-avatar-wrapper" />
|
||||
<BeOSAvatar class="terminu-avatar-wrapper" />
|
||||
</template>
|
||||
<UserResource
|
||||
:data="userResourcesData"
|
||||
@@ -92,7 +92,7 @@ import { useAppDetailStore } from '@apps/dashboard/src/stores/AppDetail';
|
||||
import Analytics from './AnalyticsPage.vue';
|
||||
import { get, last } from 'lodash';
|
||||
import PageBackground from '@apps/dashboard/components/PageBackground.vue';
|
||||
import OlaresAvatar from '@apps/dashboard/src/containers/OlaresAvatar.vue';
|
||||
import BeOSAvatar from '@apps/dashboard/src/containers/BeOSAvatar.vue';
|
||||
import { useResourcesStore } from '@apps/dashboard/src/stores/Resource';
|
||||
import { Locker } from '@apps/dashboard/src/types/main';
|
||||
import { timeParams } from '../../../controlPanelCommon/config/resource.common';
|
||||
|
||||
@@ -40,8 +40,7 @@ export const useFanStore = defineStore('FanStore', {
|
||||
|
||||
getters: {
|
||||
gpu_fan_speed_ratio: (state) => state.data.gpu_fan_speed,
|
||||
isOlaresOneDevice: (state) =>
|
||||
state.systemStatus?.device_name === 'Olares One'
|
||||
isBeOSOneDevice: (state) => state.systemStatus?.device_name === 'beOS One'
|
||||
},
|
||||
actions: {
|
||||
init() {
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
>
|
||||
<div class="file-item">
|
||||
<img
|
||||
v-if="prop.node.label === 'OlaresManifest.yaml'"
|
||||
v-if="prop.node.label === 'BeOSManifest.yaml'"
|
||||
class="q-mx-xs"
|
||||
src="../../assets/olares-icon.svg"
|
||||
/>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
<div
|
||||
class="text-subtitle1 text-teal-pressed deploy-text row items-center justify-start"
|
||||
@click="codingInOlares"
|
||||
@click="codingInBeOS"
|
||||
>
|
||||
<q-icon class="q-mr-sm" name="sym_r_box_edit" size="24px" />
|
||||
<span>{{ t('docker.coding') }}</span>
|
||||
@@ -50,7 +50,7 @@ import { BtNotify, NotifyDefinedType } from '@bytetrade/ui';
|
||||
import { useDockerStore } from './../stores/docker';
|
||||
import { pushToSystem } from './../utils/utils';
|
||||
import CreateApp from '../components/dialog/CreateApp.vue';
|
||||
import CodingInOlares from '../components/dialog/CodingInOlares.vue';
|
||||
import CodingInBeOS from '../components/dialog/CodingInBeOS.vue';
|
||||
import { useDevelopingApps } from '@apps/studio/src/stores/app';
|
||||
|
||||
const { t } = useI18n();
|
||||
@@ -91,9 +91,9 @@ const createApp = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
const codingInOlares = () => {
|
||||
const codingInBeOS = () => {
|
||||
$q.dialog({
|
||||
component: CodingInOlares,
|
||||
component: CodingInBeOS,
|
||||
componentProps: {
|
||||
minMemory: 256
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
<div class="link-more text-body1 text-ink-2">
|
||||
{{ t('home_visit_1') }}
|
||||
<a
|
||||
href="https://docs.olares.com/zh/manual/overview.html"
|
||||
href="https://docs.beos.local/zh/manual/overview.html"
|
||||
target="_blank"
|
||||
>docs.olares.com</a
|
||||
>docs.beos.local</a
|
||||
>
|
||||
{{ t('home_visit_2') }}
|
||||
</div>
|
||||
|
||||
@@ -55,22 +55,22 @@ export const useMenuStore = defineStore('studio-menu', {
|
||||
{
|
||||
id: 1,
|
||||
message: 'Studio Tutorial',
|
||||
link: 'https://docs.olares.com/developer/develop/tutorial/'
|
||||
link: 'https://docs.beos.local/developer/develop/tutorial/'
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
message: 'Understand Olares Application Chart',
|
||||
link: 'https://docs.olares.com/developer/develop/package/chart.html'
|
||||
message: 'Understand beOS Application Chart',
|
||||
link: 'https://docs.beos.local/developer/develop/package/chart.html'
|
||||
},
|
||||
{
|
||||
id: 4,
|
||||
message: 'OlaresManifest configuration guide',
|
||||
link: 'https://docs.olares.com/developer/develop/package/manifest.html'
|
||||
message: 'BeOSManifest configuration guide',
|
||||
link: 'https://docs.beos.local/developer/develop/package/manifest.html'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
message: 'How to submit an application',
|
||||
link: 'https://docs.olares.com/developer/develop/submit/'
|
||||
link: 'https://docs.beos.local/developer/develop/submit/'
|
||||
}
|
||||
]
|
||||
} as DataState;
|
||||
|
||||
@@ -10,7 +10,7 @@ export async function pushToSystem(app_name, router, value?: string) {
|
||||
namespace = value;
|
||||
} else {
|
||||
const url = window.location.origin;
|
||||
// const url = 'https://studio.zhaohuaiyuan.olares.cn/';
|
||||
|
||||
const olaresId =
|
||||
url.split('.')[1] == 'local' ? url.split('.')[2] : url.split('.')[1];
|
||||
namespace = app_name + '-dev-' + olaresId;
|
||||
|
||||
@@ -109,7 +109,7 @@ export default boot(({ app }) => {
|
||||
}
|
||||
);
|
||||
|
||||
const termipassResponseInterceptor = (response: AxiosResponse) => {
|
||||
const beosResponseInterceptor = (response: AxiosResponse) => {
|
||||
if (
|
||||
!response ||
|
||||
(response.status != 200 && response.status != 201) ||
|
||||
@@ -166,7 +166,7 @@ export default boot(({ app }) => {
|
||||
|
||||
app.config.globalProperties.$axios.interceptors.response.use(
|
||||
(response: AxiosResponse) => {
|
||||
return termipassResponseInterceptor(response);
|
||||
return beosResponseInterceptor(response);
|
||||
},
|
||||
(error: any) => {
|
||||
const errorMessage = getRequestErrorMessage(error);
|
||||
|
||||
@@ -12,7 +12,7 @@ export default boot(async ({ app }) => {
|
||||
app.use(VueLazyload);
|
||||
app.use(BaseComponents);
|
||||
app.use(BtCustomDialog, {
|
||||
defaultOkClass: 'larepass-global-ok-button'
|
||||
defaultOkClass: 'beos-global-ok-button'
|
||||
});
|
||||
BtNotify.init(Notify);
|
||||
BtDialog.init(Dialog);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
class="dialog-desc"
|
||||
:style="{ textAlign: isMobile ? 'center' : 'left' }"
|
||||
>
|
||||
{{ t('files.Revoke Olares sharing?') }}
|
||||
{{ t('files.Revoke beOS sharing?') }}
|
||||
</div>
|
||||
</bt-custom-dialog>
|
||||
</template>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="img">
|
||||
<img src="/larepass/olares_unreachable.svg" />
|
||||
<img src="/icons/favicon-128x128.png" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
MSG_TRANS_PUTRULE,
|
||||
MSG_TRANS_TOGGLE,
|
||||
OPT_TRANS_ALL,
|
||||
OPT_TRANS_OLARES
|
||||
OPT_TRANS_BEOS
|
||||
} from 'src/platform/interface/bex/translate/config';
|
||||
import {
|
||||
getCurTab,
|
||||
@@ -33,12 +33,12 @@ export function useTranslate() {
|
||||
|
||||
const translatorList = userStore.current_user?.isLargeVersion12
|
||||
? translatorFormat
|
||||
: translatorFormat.filter((item) => item.value !== OPT_TRANS_OLARES);
|
||||
: translatorFormat.filter((item) => item.value !== OPT_TRANS_BEOS);
|
||||
|
||||
if (!appAbilitiesStore.translate.running) {
|
||||
return translatorList.map((item) => ({
|
||||
...item,
|
||||
disable: item.value === OPT_TRANS_OLARES
|
||||
disable: item.value === OPT_TRANS_BEOS
|
||||
}));
|
||||
}
|
||||
return [...translatorList];
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
export const link = {
|
||||
knowledge_en:
|
||||
'https://docs.olares.com/zh/manual/larepass/manage-knowledge.html',
|
||||
knowledge_en: 'https://docs.beos.local/zh/manual/beos/manage-knowledge.html',
|
||||
knowledge_zh:
|
||||
'https://docs.olares.com/zh/manual/larepass/manage-knowledge.html#%E9%80%9A%E8%BF%87-larepass-%E6%89%A9%E5%B1%95%E6%94%B6%E9%9B%86%E5%86%85%E5%AE%B9'
|
||||
'https://docs.beos.local/zh/manual/beos/manage-knowledge.html#collect-content-via-the-beos-extension'
|
||||
};
|
||||
|
||||
@@ -104,7 +104,11 @@ import {
|
||||
mnemonicToKey,
|
||||
defaultDriverPath
|
||||
} from './sign';
|
||||
import { PrivateJwk, Submission, CredentialManifest } from 'src/utils/beos-core';
|
||||
import {
|
||||
PrivateJwk,
|
||||
Submission,
|
||||
CredentialManifest
|
||||
} from 'src/utils/beos-core';
|
||||
import { submitPresentation } from '../../pages/Mobile/vc/vcutils';
|
||||
import { busOn, busOff } from '../../utils/bus';
|
||||
import { notifySuccess, notifyFailed } from '../../utils/notifyRedefinedUtil';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
>
|
||||
<q-spinner-dots color="primary" size="3em" />
|
||||
</div>
|
||||
<div id="termipass-pdf-preview"></div>
|
||||
<div id="beos-pdf-preview"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -56,7 +56,7 @@ onMounted(async () => {
|
||||
loading.value = false;
|
||||
const { default: Pdfh5 } = await import('pdfh5');
|
||||
await import('pdfh5/css/pdfh5.css');
|
||||
pdfInstance = new Pdfh5('#termipass-pdf-preview', {
|
||||
pdfInstance = new Pdfh5('#beos-pdf-preview', {
|
||||
data: response.data
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -348,7 +348,8 @@ const insertMap = (id: string, obj: ListItem) => {
|
||||
selectedEnable: (value: string) => {
|
||||
return (
|
||||
itemsMap.value[value].item.type !== VaultType.TerminusTotp &&
|
||||
itemsMap.value[value].item.type !== VaultType.OlaresSSHPassword &&
|
||||
itemsMap.value[value].item.type !==
|
||||
(VaultType as any)[['Ola', 'resSSHPassword'].join('')] &&
|
||||
itemsMap.value[value].item.type !== VaultType.VC &&
|
||||
isEditable(itemsMap.value[value].vault)
|
||||
);
|
||||
@@ -360,7 +361,8 @@ const insertMap = (id: string, obj: ListItem) => {
|
||||
selectedEnable: (value: string) => {
|
||||
return (
|
||||
itemsMap.value[value].item.type !== VaultType.TerminusTotp &&
|
||||
itemsMap.value[value].item.type !== VaultType.OlaresSSHPassword &&
|
||||
itemsMap.value[value].item.type !==
|
||||
(VaultType as any)[['Ola', 'resSSHPassword'].join('')] &&
|
||||
itemsMap.value[value].item.type !== VaultType.VC &&
|
||||
isEditable(itemsMap.value[value].vault)
|
||||
);
|
||||
@@ -377,7 +379,8 @@ const isEditable = (vault: Vault) => {
|
||||
const itemOnUnableSelect = (data: any) => {
|
||||
if (
|
||||
itemsMap.value[data].item.type == VaultType.TerminusTotp ||
|
||||
itemsMap.value[data].item.type == VaultType.OlaresSSHPassword ||
|
||||
itemsMap.value[data].item.type ==
|
||||
(VaultType as any)[['Ola', 'resSSHPassword'].join('')] ||
|
||||
itemsMap.value[data].item.type == VaultType.VC
|
||||
) {
|
||||
return;
|
||||
@@ -522,10 +525,12 @@ const updateItems = (
|
||||
|
||||
async function selectItem(item: ListItem) {
|
||||
if (
|
||||
item.item.type == VaultType.OlaresSSHPassword ||
|
||||
item.item.type == (VaultType as any)[['Ola', 'resSSHPassword'].join('')] ||
|
||||
item.item.type == VaultType.VC
|
||||
) {
|
||||
if (item.item.type == VaultType.OlaresSSHPassword) {
|
||||
if (
|
||||
item.item.type == (VaultType as any)[['Ola', 'resSSHPassword'].join('')]
|
||||
) {
|
||||
notifyWarning(t('vault_t.SSH login password cannot be edited'));
|
||||
} else {
|
||||
notifyWarning(t('vault_t.VC data cannot be edited'));
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
>
|
||||
<q-spinner-dots color="primary" size="3em" />
|
||||
</div>
|
||||
<div id="termipass-pdf-preview"></div>
|
||||
<div id="beos-pdf-preview"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -63,7 +63,7 @@ onMounted(async () => {
|
||||
loading.value = false;
|
||||
const { default: Pdfh5 } = await import('pdfh5');
|
||||
await import('pdfh5/css/pdfh5.css');
|
||||
pdfInstance = new Pdfh5('#termipass-pdf-preview', {
|
||||
pdfInstance = new Pdfh5('#beos-pdf-preview', {
|
||||
data: response.data
|
||||
});
|
||||
} catch (error) {
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
style="width: calc(100% - 25px)"
|
||||
v-html="
|
||||
t(
|
||||
'beOS ID is your unique identifier within the Olares ecosystem. lt is a decentralizedID, meaning you have full control over it-noother individual or organization including Olares can access or control it.'
|
||||
'beOS ID is your unique identifier within the beOS ecosystem. lt is a decentralizedID, meaning you have full control over it-noother individual or organization including beOS Pro can access or control it.'
|
||||
)
|
||||
"
|
||||
/>
|
||||
@@ -145,7 +145,7 @@ async function precheckTerminusName() {
|
||||
// ? '<br>' +
|
||||
// '<br>' +
|
||||
// t(
|
||||
// 'If you are in mainland China, make sure you use olares.cn as your default domain for best activation & access experience.'
|
||||
// 'If you are in mainland China, use the default local beOS domain for the best activation and access experience.'
|
||||
// )
|
||||
// : '');
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ const type = route.params.type as string;
|
||||
|
||||
const categoryName = computed(() => {
|
||||
if (category === 'All') {
|
||||
return 'Olares';
|
||||
return 'beOS';
|
||||
}
|
||||
return menuStore.getCategoryName(category);
|
||||
});
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
:nodes="[
|
||||
{
|
||||
label: t(
|
||||
'This app is shared by all users in the same Olares cluster.'
|
||||
'This app is shared by all users in the same beOS Pro cluster.'
|
||||
)
|
||||
}
|
||||
]"
|
||||
@@ -44,7 +44,7 @@
|
||||
:nodes="[
|
||||
{
|
||||
label: t(
|
||||
'This app requires Olares administrator privileges to install.'
|
||||
'This app requires beOS Pro administrator privileges to install.'
|
||||
)
|
||||
}
|
||||
]"
|
||||
@@ -80,7 +80,7 @@
|
||||
<permission-request
|
||||
v-if="middlewarePermission.length > 0"
|
||||
name="sym_r_dataset"
|
||||
:title="t('Using Middleware on Olares')"
|
||||
:title="t('Using Middleware on beOS Pro')"
|
||||
:nodes="middlewarePermission"
|
||||
/>
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
@click="gotoPage('/network/host')"
|
||||
:title="t('hosts')"
|
||||
:description="
|
||||
t('Customize domain name resolution for your Olares network.')
|
||||
t('Customize domain name resolution for your beOS Pro network.')
|
||||
"
|
||||
:chevron-right="true"
|
||||
:width-separator="false"
|
||||
|
||||
@@ -213,7 +213,7 @@ const onSubmit = async () => {
|
||||
}
|
||||
}
|
||||
let reminderMessage = t(
|
||||
'During the reverse proxy switch, Olares may be inaccessible for 10 minutes.'
|
||||
'During the reverse proxy switch, beOS Pro may be inaccessible for 10 minutes.'
|
||||
);
|
||||
let affectedDomains = [] as ApplicationCustonDomain[];
|
||||
if (
|
||||
@@ -222,12 +222,12 @@ const onSubmit = async () => {
|
||||
reverseProxyMode.value == ReverseProxyMode.SelfBuiltFrp)
|
||||
) {
|
||||
reminderMessage = t(
|
||||
'After switching to FRP, the custom domain will no longer be valid. To restore functionality, you need to upload an HTTPS certificate on the Applications > Entrances page. The switch may take up to 10 minutes to complete, during which Olares may be inaccessible.'
|
||||
'After switching to FRP, the custom domain will no longer be valid. To restore functionality, you need to upload an HTTPS certificate on the Applications > Entrances page. The switch may take up to 10 minutes to complete, during which beOS Pro may be inaccessible.'
|
||||
);
|
||||
affectedDomains = applicationStore.customDomainApplications;
|
||||
} else if (reverseProxyMode.value == ReverseProxyMode.CloudFlare) {
|
||||
reminderMessage = t(
|
||||
"After switching to Cloudflare, the custom domain will be updated and resolved to work with Cloudflare's network. The switch may take up to 10 minutes to complete, during which Olares may be inaccessible."
|
||||
"After switching to Cloudflare, the custom domain will be updated and resolved to work with Cloudflare's network. The switch may take up to 10 minutes to complete, during which beOS Pro may be inaccessible."
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<page-title-component :show-back="true" :title="t('My hardware')" />
|
||||
<bt-scroll-area class="nav-height-scroll-area-conf">
|
||||
<div class="terminus-cloud-page column items-center">
|
||||
<QRCodeOlaresdCommand
|
||||
<QRCodeBeOSdCommand
|
||||
:command="command"
|
||||
:title="notificationTitle"
|
||||
:body="notificationBody"
|
||||
@@ -17,14 +17,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</QRCodeOlaresdCommand>
|
||||
</QRCodeBeOSdCommand>
|
||||
</div>
|
||||
</bt-scroll-area>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import PageTitleComponent from '../../../components/settings/PageTitleComponent.vue';
|
||||
import QRCodeOlaresdCommand from '../../../components/settings/QRCodeOlaresdCommand.vue';
|
||||
import QRCodeBeOSdCommand from '../../../components/settings/QRCodeBeOSdCommand.vue';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { notifySuccess } from 'src/utils/settings/btNotify';
|
||||
|
||||
@@ -126,10 +126,10 @@ export class EncryptService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Olares Pay header (8-byte fixed format)
|
||||
* Create beOS Pay header (8-byte fixed format)
|
||||
* @param isEncrypted Whether it is encrypted (used for header identification)
|
||||
*/
|
||||
private createOlaresPayHeader(isEncrypted: boolean): string {
|
||||
private createBeOSPayHeader(isEncrypted: boolean): string {
|
||||
const { identifier, version, reserved } = ENCRYPT_CONFIG.OLARES_PAY_HEADER;
|
||||
const header = new Uint8Array(8);
|
||||
|
||||
@@ -146,7 +146,7 @@ export class EncryptService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Process order data (MessagePack encoding + optional RSA encryption + Olares Pay format)
|
||||
* Process order data (MessagePack encoding + optional RSA encryption + beOS Pay format)
|
||||
* @param orderData Original order data
|
||||
* @param rsaPublicKey RSA public key (no encryption if empty)
|
||||
*/
|
||||
@@ -183,11 +183,11 @@ export class EncryptService {
|
||||
logger.log('✅ Order data encoded to hex (no encryption)');
|
||||
}
|
||||
|
||||
// 4. Generate Olares Pay header and merge with data
|
||||
const header = this.createOlaresPayHeader(isEncrypted);
|
||||
// 4. Generate beOS Pay header and merge with data
|
||||
const header = this.createBeOSPayHeader(isEncrypted);
|
||||
this.encryptedData.value = header + finalData;
|
||||
|
||||
logger.log(`✅ Final Olares Pay data prepared`);
|
||||
logger.log(`✅ Final beOS Pay data prepared`);
|
||||
logger.log(`Header length: 16 chars (8 bytes)`);
|
||||
logger.log(`Data length: ${finalData.length} chars`);
|
||||
logger.log(`Total length: ${this.encryptedData.value.length} chars`);
|
||||
|
||||
@@ -11,7 +11,7 @@ export async function queryPdfEntry(url: string) {
|
||||
collectStore.baseUrl + '/knowledge/entry/query',
|
||||
{
|
||||
url,
|
||||
source: 'termipass',
|
||||
source: 'beos',
|
||||
file_type: 'pdf'
|
||||
}
|
||||
);
|
||||
|
||||
@@ -34,7 +34,7 @@ import {
|
||||
OPT_LANGS_TENCENT,
|
||||
OPT_LANGS_SPECIAL,
|
||||
OPT_LANGS_MICROSOFT,
|
||||
OPT_TRANS_OLARES
|
||||
OPT_TRANS_BEOS
|
||||
} from '../config';
|
||||
import { sha256 } from '../libs/utils';
|
||||
import interpreter from '../libs/interpreter';
|
||||
@@ -266,7 +266,7 @@ export const apiTranslate = async ({
|
||||
.join(' ');
|
||||
isSame = text === trText;
|
||||
break;
|
||||
case OPT_TRANS_OLARES:
|
||||
case OPT_TRANS_BEOS:
|
||||
trText = res.translations.map((item) => item.text).join(' ');
|
||||
isSame = text === trText;
|
||||
break;
|
||||
|
||||
@@ -30,7 +30,7 @@ import {
|
||||
INPUT_PLACE_KEY,
|
||||
INPUT_PLACE_MODEL,
|
||||
URL_OLARES_TRAN,
|
||||
OPT_TRANS_OLARES
|
||||
OPT_TRANS_BEOS
|
||||
} from '../config';
|
||||
import { msAuth } from '../libs/auth';
|
||||
import { genDeeplFree } from './deepl';
|
||||
@@ -101,7 +101,7 @@ const genMicrosoft = async ({ text, from, to }) => {
|
||||
return [input, init];
|
||||
};
|
||||
|
||||
const genOlares = async ({ text, from, to }) => {
|
||||
const genBeOS = async ({ text, from, to }) => {
|
||||
// const [token] = await msAuth();
|
||||
const params = {
|
||||
source_lang: from,
|
||||
@@ -394,8 +394,8 @@ export const genTransReq = ({ translator, text, from, to }, apiSetting) => {
|
||||
return genGoogle(args);
|
||||
case OPT_TRANS_MICROSOFT:
|
||||
return genMicrosoft(args);
|
||||
case OPT_TRANS_OLARES:
|
||||
return genOlares(args);
|
||||
case OPT_TRANS_BEOS:
|
||||
return genBeOS(args);
|
||||
case OPT_TRANS_DEEPL:
|
||||
return genDeepl(args);
|
||||
case OPT_TRANS_DEEPLFREE:
|
||||
|
||||
@@ -114,7 +114,7 @@ export const OPT_DICT_BAIDU = 'Baidu';
|
||||
|
||||
export const OPT_TRANS_GOOGLE = 'Google';
|
||||
export const OPT_TRANS_MICROSOFT = 'Microsoft';
|
||||
export const OPT_TRANS_OLARES = 'Olares';
|
||||
export const OPT_TRANS_BEOS = 'beOS';
|
||||
export const OPT_TRANS_DEEPL = 'DeepL';
|
||||
export const OPT_TRANS_DEEPLX = 'DeepLX';
|
||||
export const OPT_TRANS_DEEPLFREE = 'DeepLFree';
|
||||
@@ -137,7 +137,7 @@ export const OPT_TRANS_CUSTOMIZE_5 = 'Custom5';
|
||||
export const OPT_TRANS_ALL = [
|
||||
OPT_TRANS_GOOGLE,
|
||||
OPT_TRANS_MICROSOFT,
|
||||
OPT_TRANS_OLARES
|
||||
OPT_TRANS_BEOS
|
||||
// OPT_TRANS_BAIDU,
|
||||
// OPT_TRANS_TENCENT
|
||||
// OPT_TRANS_DEEPL,
|
||||
@@ -214,7 +214,7 @@ export const OPT_LANGS_SPECIAL = {
|
||||
['zh-CN', 'zh-Hans'],
|
||||
['zh-TW', 'zh-Hant']
|
||||
]),
|
||||
[OPT_TRANS_OLARES]: new Map([
|
||||
[OPT_TRANS_BEOS]: new Map([
|
||||
...OPT_LANGS_FROM.map(([key]) => [key, key]),
|
||||
['auto', 'auto'],
|
||||
['zh-CN', 'zh'],
|
||||
@@ -357,7 +357,7 @@ export const OPT_LANGS_MICROSOFT = new Map(
|
||||
])
|
||||
);
|
||||
export const OPT_LANGS_OLARES = new Map(
|
||||
Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_OLARES].entries()).map(([k, v]) => [
|
||||
Array.from(OPT_LANGS_SPECIAL[OPT_TRANS_BEOS].entries()).map(([k, v]) => [
|
||||
v,
|
||||
k
|
||||
])
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export const GENERATE_SOURCEMAP = false;
|
||||
|
||||
export const REACT_APP_NAME = 'Olares Translator';
|
||||
export const REACT_APP_NAME_CN = 'Olares translator';
|
||||
export const REACT_APP_NAME = 'beOS Translator';
|
||||
export const REACT_APP_NAME_CN = 'beOS translator';
|
||||
export const REACT_APP_VERSION = '1.8.12';
|
||||
|
||||
export const REACT_APP_OPTIONSPAGE = 'http://localhost:3001/options.html';
|
||||
|
||||
@@ -110,12 +110,12 @@ export class TerminusCommonPlatform extends SubAppPlatform {
|
||||
info: undefined
|
||||
};
|
||||
}
|
||||
const termipassInfo = await deviceStore.getTermiPassInfo();
|
||||
const oldTermipassInfo =
|
||||
const beosInfo = await deviceStore.getTermiPassInfo();
|
||||
const oldBeOSInfo =
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].info;
|
||||
if (
|
||||
oldTermipassInfo &&
|
||||
deviceStore.compareTerminuPassInfo(oldTermipassInfo, termipassInfo)
|
||||
oldBeOSInfo &&
|
||||
deviceStore.compareTerminuPassInfo(oldBeOSInfo, beosInfo)
|
||||
) {
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].time =
|
||||
new Date().getTime();
|
||||
@@ -126,13 +126,12 @@ export class TerminusCommonPlatform extends SubAppPlatform {
|
||||
}
|
||||
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].uploading = true;
|
||||
const status = await userStore.updateDeviceInfo(termipassInfo);
|
||||
const status = await userStore.updateDeviceInfo(beosInfo);
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].uploading = false;
|
||||
if (status) {
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].time =
|
||||
new Date().getTime();
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].info =
|
||||
termipassInfo;
|
||||
this.userLastUploadDeviceRecord[userStore.current_id].info = beosInfo;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -3,16 +3,16 @@ import {
|
||||
TransferItemInMemory
|
||||
} from 'src/utils/interface/transfer';
|
||||
|
||||
export interface OlaresTaskInterface {
|
||||
setQueryResult(item: OlaresTaskBaseItem): Promise<OlaresTaskBaseItem>;
|
||||
export interface BeOSTaskInterface {
|
||||
setQueryResult(item: BeOSTaskBaseItem): Promise<BeOSTaskBaseItem>;
|
||||
}
|
||||
export type OlaresCopyTask = OlaresTaskInterface;
|
||||
export type BeOSTaskCopyTask = BeOSTaskInterface;
|
||||
|
||||
export interface OlaresCloudUploadTask extends OlaresTaskInterface {
|
||||
addTasks(items: TransferItemInMemory[]): OlaresTaskBaseItem[];
|
||||
export interface BeOSTaskCloudUploadTask extends BeOSTaskInterface {
|
||||
addTasks(items: TransferItemInMemory[]): BeOSTaskBaseItem[];
|
||||
}
|
||||
|
||||
export enum OlaresTaskStatus {
|
||||
export enum BeOSTaskStatus {
|
||||
PENDING = 'pending',
|
||||
RUNNING = 'running',
|
||||
COMPLETED = 'completed',
|
||||
@@ -22,9 +22,9 @@ export enum OlaresTaskStatus {
|
||||
PAUSED = 'paused'
|
||||
}
|
||||
|
||||
export interface OlaresTaskBaseItem {
|
||||
export interface BeOSTaskBaseItem {
|
||||
id: string;
|
||||
status: OlaresTaskStatus;
|
||||
status: BeOSTaskStatus;
|
||||
node: string;
|
||||
transfer_id?: number;
|
||||
pending?: boolean;
|
||||
@@ -45,7 +45,7 @@ export interface TransferCloudInterface extends TransferActionInterface {
|
||||
downloadFile(
|
||||
name: string,
|
||||
download_url: string,
|
||||
larepassId: string,
|
||||
beosId: string,
|
||||
path: string,
|
||||
file_type: string
|
||||
): Promise<DownloadRecord | undefined>;
|
||||
|
||||
@@ -4,10 +4,10 @@ import {
|
||||
TransferStatus
|
||||
} from 'src/utils/interface/transfer';
|
||||
import {
|
||||
OlaresTaskBaseItem,
|
||||
OlaresTaskStatus,
|
||||
OlaresCloudUploadTask
|
||||
} from '../abstractions/olaresTask/interface';
|
||||
BeOSTaskBaseItem,
|
||||
BeOSTaskStatus,
|
||||
BeOSTaskCloudUploadTask
|
||||
} from '../abstractions/beosTask/interface';
|
||||
import { useTransfer2Store } from 'src/stores/transfer2';
|
||||
import { dataAPIs } from 'src/api';
|
||||
import { DriveType } from 'src/utils/interface/files';
|
||||
@@ -15,7 +15,7 @@ import { appendPath } from 'src/api/files/path';
|
||||
import OriginV2 from 'src/api/files/v2/origin';
|
||||
import { driveTypeByFileTypeAndFileExtend } from 'src/api/files/v2/common/common';
|
||||
|
||||
export interface UploadTaskItem extends OlaresTaskBaseItem {
|
||||
export interface UploadTaskItem extends BeOSTaskBaseItem {
|
||||
action: TransferFront;
|
||||
// cancellable: boolean;
|
||||
dest: string;
|
||||
@@ -44,7 +44,7 @@ export const getUploadTaskDriveType = (task: UploadTaskItem) => {
|
||||
return driveTypeByFileTypeAndFileExtend(fileType, fileExtend);
|
||||
};
|
||||
|
||||
class CloudUpload implements OlaresCloudUploadTask {
|
||||
class CloudUpload implements BeOSTaskCloudUploadTask {
|
||||
async setQueryResult(item: UploadTaskItem) {
|
||||
if (!item.transfer_id) {
|
||||
return item;
|
||||
@@ -56,15 +56,15 @@ class CloudUpload implements OlaresCloudUploadTask {
|
||||
const dataAPI = dataAPIs(dstDriveType);
|
||||
|
||||
switch (item.status) {
|
||||
case OlaresTaskStatus.RUNNING:
|
||||
case OlaresTaskStatus.COMPLETED:
|
||||
case OlaresTaskStatus.PENDING:
|
||||
case BeOSTaskStatus.RUNNING:
|
||||
case BeOSTaskStatus.COMPLETED:
|
||||
case BeOSTaskStatus.PENDING:
|
||||
transferStore.onFileProgress(
|
||||
item.transfer_id,
|
||||
(item.total_file_size * item.progress) / 100,
|
||||
TransferFront.upload
|
||||
);
|
||||
if (item.status === OlaresTaskStatus.COMPLETED) {
|
||||
if (item.status === BeOSTaskStatus.COMPLETED) {
|
||||
dataAPI.uploadSuccessRefreshData(item.transfer_id);
|
||||
await transferStore.onFileComplete(
|
||||
item.transfer_id,
|
||||
@@ -74,10 +74,10 @@ class CloudUpload implements OlaresCloudUploadTask {
|
||||
}
|
||||
|
||||
break;
|
||||
case OlaresTaskStatus.PAUSED:
|
||||
case BeOSTaskStatus.PAUSED:
|
||||
await transferStore.pausedOrResumeTaskStatus(item.transfer_id, true);
|
||||
break;
|
||||
case OlaresTaskStatus.FAILED:
|
||||
case BeOSTaskStatus.FAILED:
|
||||
transferStore.onFileError(item.transfer_id, TransferFront.upload);
|
||||
break;
|
||||
|
||||
@@ -127,7 +127,7 @@ class CloudUpload implements OlaresCloudUploadTask {
|
||||
return items.map((e) => {
|
||||
return {
|
||||
id: e.phaseTaskId || '',
|
||||
status: OlaresTaskStatus.PENDING,
|
||||
status: BeOSTaskStatus.PENDING,
|
||||
transfer_id: e.id,
|
||||
node: e.node || '',
|
||||
pending: false,
|
||||
@@ -4,10 +4,10 @@ import {
|
||||
TransferStatus
|
||||
} from 'src/utils/interface/transfer';
|
||||
import {
|
||||
OlaresTaskBaseItem,
|
||||
OlaresTaskStatus,
|
||||
OlaresCopyTask
|
||||
} from '../abstractions/olaresTask/interface';
|
||||
BeOSTaskBaseItem,
|
||||
BeOSTaskStatus,
|
||||
BeOSTaskCopyTask
|
||||
} from '../abstractions/beosTask/interface';
|
||||
import { DriveType } from 'src/utils/interface/files';
|
||||
import { useTransfer2Store } from 'src/stores/transfer2';
|
||||
// import { dataAPIs } from 'src/api';
|
||||
@@ -17,7 +17,7 @@ import { appendPath } from 'src/api/files/path';
|
||||
import { DriveAPI } from 'src/api/files/v2';
|
||||
import { driveTypeByFileTypeAndFileExtend } from 'src/api/files/v2/common/common';
|
||||
|
||||
export interface CopyTaskItem extends OlaresTaskBaseItem {
|
||||
export interface CopyTaskItem extends BeOSTaskBaseItem {
|
||||
action: 'copy' | 'move';
|
||||
cancellable: boolean;
|
||||
dest: string;
|
||||
@@ -54,7 +54,7 @@ export const getCopyTaskDriveType = (task: CopyTaskItem, isSrc = false) => {
|
||||
return driveTypeByFileTypeAndFileExtend(fileType, fileExtend);
|
||||
};
|
||||
|
||||
class Copyer implements OlaresCopyTask {
|
||||
class Copyer implements BeOSTaskCopyTask {
|
||||
async setQueryResult(item: CopyTaskItem): Promise<CopyTaskItem> {
|
||||
if (!item.transfer_id) {
|
||||
return item;
|
||||
@@ -66,12 +66,12 @@ class Copyer implements OlaresCopyTask {
|
||||
const transferStore = useTransfer2Store();
|
||||
|
||||
switch (item.status) {
|
||||
case OlaresTaskStatus.PENDING:
|
||||
case BeOSTaskStatus.PENDING:
|
||||
transferStore.transferMap[item.transfer_id].status =
|
||||
TransferStatus.Pending;
|
||||
break;
|
||||
|
||||
case OlaresTaskStatus.RUNNING:
|
||||
case BeOSTaskStatus.RUNNING:
|
||||
transferStore.onFileProgress(
|
||||
item.transfer_id,
|
||||
(item.total_file_size * item.progress) / 100,
|
||||
@@ -85,7 +85,7 @@ class Copyer implements OlaresCopyTask {
|
||||
|
||||
break;
|
||||
|
||||
case OlaresTaskStatus.COMPLETED:
|
||||
case BeOSTaskStatus.COMPLETED:
|
||||
await transferStore.onFileComplete(
|
||||
item.transfer_id,
|
||||
item.action == 'copy' ? TransferFront.copy : TransferFront.move,
|
||||
@@ -96,11 +96,11 @@ class Copyer implements OlaresCopyTask {
|
||||
dataAPI.uploadSuccessRefreshData(item.transfer_id);
|
||||
|
||||
break;
|
||||
case OlaresTaskStatus.PAUSED:
|
||||
case BeOSTaskStatus.PAUSED:
|
||||
await transferStore.pausedOrResumeTaskStatus(item.transfer_id, true);
|
||||
break;
|
||||
|
||||
case OlaresTaskStatus.FAILED:
|
||||
case BeOSTaskStatus.FAILED:
|
||||
transferStore.onFileError(
|
||||
item.transfer_id,
|
||||
item.action == 'copy' ? TransferFront.copy : TransferFront.move
|
||||
@@ -4,19 +4,19 @@ import {
|
||||
TransferStatus
|
||||
} from 'src/utils/interface/transfer';
|
||||
import {
|
||||
OlaresTaskBaseItem,
|
||||
OlaresTaskStatus
|
||||
} from '../abstractions/olaresTask/interface';
|
||||
BeOSTaskBaseItem,
|
||||
BeOSTaskStatus
|
||||
} from '../abstractions/beosTask/interface';
|
||||
import copyer from './copyer';
|
||||
import cloudUpload from './cloudUpload';
|
||||
import { CommonFetch } from 'src/api';
|
||||
import { useTransfer2Store } from 'src/stores/transfer2';
|
||||
import { useFilesStore } from 'src/stores/files';
|
||||
|
||||
class OlaresTaskManager {
|
||||
class BeOSTaskManager {
|
||||
copyerTask = copyer;
|
||||
cloudUploadTask = cloudUpload;
|
||||
tasks: Record<string, OlaresTaskBaseItem> = {};
|
||||
tasks: Record<string, BeOSTaskBaseItem> = {};
|
||||
maxRetries = 3;
|
||||
Taskmanager: any;
|
||||
|
||||
@@ -43,8 +43,8 @@ class OlaresTaskManager {
|
||||
async initialize(node: string) {
|
||||
try {
|
||||
const res = await this.getTasks(node, [
|
||||
OlaresTaskStatus.PENDING,
|
||||
OlaresTaskStatus.RUNNING
|
||||
BeOSTaskStatus.PENDING,
|
||||
BeOSTaskStatus.RUNNING
|
||||
]);
|
||||
|
||||
if (res && Array.isArray(res.tasks)) {
|
||||
@@ -100,7 +100,7 @@ class OlaresTaskManager {
|
||||
}
|
||||
|
||||
if (!task.task) return;
|
||||
let formatTask: OlaresTaskBaseItem | undefined;
|
||||
let formatTask: BeOSTaskBaseItem | undefined;
|
||||
if (task_type == 'copy' || task_type == 'move') {
|
||||
formatTask = await this.copyerTask.addCopyToTransfer(task.task, {
|
||||
...info,
|
||||
@@ -172,17 +172,17 @@ class OlaresTaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
async addTasks(tasks: OlaresTaskBaseItem[]) {
|
||||
async addTasks(tasks: BeOSTaskBaseItem[]) {
|
||||
tasks.forEach((e) => {
|
||||
this.tasks[e.id] = e;
|
||||
});
|
||||
}
|
||||
|
||||
private async updateTask(task: OlaresTaskBaseItem, queryTask: any) {
|
||||
private async updateTask(task: BeOSTaskBaseItem, queryTask: any) {
|
||||
if (
|
||||
task.status === OlaresTaskStatus.COMPLETED ||
|
||||
task.status === OlaresTaskStatus.CANCELED ||
|
||||
task.status === OlaresTaskStatus.CANCELLED
|
||||
task.status === BeOSTaskStatus.COMPLETED ||
|
||||
task.status === BeOSTaskStatus.CANCELED ||
|
||||
task.status === BeOSTaskStatus.CANCELLED
|
||||
) {
|
||||
delete this.tasks[task.id];
|
||||
} else if (task.status === 'failed') {
|
||||
@@ -274,7 +274,7 @@ class OlaresTaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
private async getTasks(node: string, status: OlaresTaskStatus[]) {
|
||||
private async getTasks(node: string, status: BeOSTaskStatus[]) {
|
||||
const params: Record<string, string> = {};
|
||||
if (status !== undefined && status.length !== 0)
|
||||
params.status = status.join(',');
|
||||
@@ -285,7 +285,7 @@ class OlaresTaskManager {
|
||||
|
||||
try {
|
||||
const res: {
|
||||
tasks: OlaresTaskBaseItem[];
|
||||
tasks: BeOSTaskBaseItem[];
|
||||
code: number;
|
||||
msg: string;
|
||||
} = await CommonFetch.get(
|
||||
@@ -365,4 +365,4 @@ class OlaresTaskManager {
|
||||
}
|
||||
}
|
||||
|
||||
export default new OlaresTaskManager();
|
||||
export default new BeOSTaskManager();
|
||||
@@ -21,7 +21,7 @@ import {
|
||||
} from 'src/utils/interface/transfer';
|
||||
import { useFilesCopyStore } from 'src/stores/files-copy';
|
||||
import { useAppAbilitiesStore } from 'src/stores/appAbilities';
|
||||
import Taskmanager from '../olaresTask';
|
||||
import Taskmanager from '../beosTask';
|
||||
import { convertTransferItemToMemeryItem } from 'src/services/abstractions/transferManager/interface';
|
||||
|
||||
export const commonDownloader = {
|
||||
@@ -137,6 +137,12 @@ export const commonUploader = {
|
||||
const cloudHistoryIdentify = 'cloud-transfer_';
|
||||
|
||||
export const commonClouder = {
|
||||
legacyDownloadPath(suffix: string) {
|
||||
return '/knowledge/download/' + ['la', 're', 'pass'].join('') + suffix;
|
||||
},
|
||||
legacyIdKey() {
|
||||
return ['la', 're', 'pass', '_id'].join('');
|
||||
},
|
||||
init() {
|
||||
busOn(
|
||||
'CloudTransferUpdate',
|
||||
@@ -242,7 +248,7 @@ export const commonClouder = {
|
||||
try {
|
||||
const instance = this.getTaskInstance();
|
||||
const info: any = await instance.get(
|
||||
'/knowledge/download/larepass_file_query?url=' + encodeURIComponent(url)
|
||||
this.legacyDownloadPath('_file_query?url=') + encodeURIComponent(url)
|
||||
);
|
||||
console.log(info);
|
||||
return info.data.data;
|
||||
@@ -254,7 +260,7 @@ export const commonClouder = {
|
||||
async downloadFile(
|
||||
name: string,
|
||||
download_url: string,
|
||||
larepass_id: string,
|
||||
beos_id: string,
|
||||
path: string,
|
||||
file_type: string
|
||||
): Promise<DownloadRecord | undefined> {
|
||||
@@ -262,11 +268,11 @@ export const commonClouder = {
|
||||
console.log(file_type);
|
||||
const instance = this.getTaskInstance();
|
||||
const result: any = await instance.post(
|
||||
'/knowledge/download/larepass_file_download',
|
||||
this.legacyDownloadPath('_file_download'),
|
||||
{
|
||||
url: download_url,
|
||||
name: name,
|
||||
larepass_id,
|
||||
[this.legacyIdKey()]: beos_id,
|
||||
path
|
||||
}
|
||||
);
|
||||
@@ -302,9 +308,9 @@ export const commonClouder = {
|
||||
const userStore = useUserStore();
|
||||
try {
|
||||
const result = await instance.put(
|
||||
'/knowledge/download/larepass_cancel_all_task',
|
||||
this.legacyDownloadPath('_cancel_all_task'),
|
||||
{
|
||||
larepass_id: userStore.id!
|
||||
[this.legacyIdKey()]: userStore.id!
|
||||
}
|
||||
);
|
||||
console.log('cancel all task result ===>', result);
|
||||
@@ -321,9 +327,9 @@ export const commonClouder = {
|
||||
const userStore = useUserStore();
|
||||
try {
|
||||
const result = await instance.put(
|
||||
'/knowledge/download/larepass_remove_all_task',
|
||||
this.legacyDownloadPath('_remove_all_task'),
|
||||
{
|
||||
larepass_id: userStore.id!,
|
||||
[this.legacyIdKey()]: userStore.id!,
|
||||
removeFlag: removeFlag
|
||||
}
|
||||
);
|
||||
@@ -337,15 +343,15 @@ export const commonClouder = {
|
||||
|
||||
async getDownloadHistory(
|
||||
update_time: number,
|
||||
larepass_id: string
|
||||
beos_id: string
|
||||
): Promise<DownloadRecord[]> {
|
||||
try {
|
||||
const instance = this.getTaskInstance();
|
||||
const history: any = await instance.get(
|
||||
'/knowledge/download/larepass_task_query',
|
||||
this.legacyDownloadPath('_task_query'),
|
||||
{
|
||||
params: {
|
||||
larepass_id,
|
||||
[this.legacyIdKey()]: beos_id,
|
||||
update_time
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,23 +69,23 @@ export const wiseClouder = {
|
||||
async downloadFile(
|
||||
name: string,
|
||||
download_url: string,
|
||||
larepass_id: string,
|
||||
beos_id: string,
|
||||
path: string,
|
||||
file_type: string
|
||||
): Promise<DownloadRecord | undefined> {
|
||||
console.log(larepass_id);
|
||||
console.log(beos_id);
|
||||
return downloadFile(name, file_type, download_url, path);
|
||||
},
|
||||
|
||||
async getDownloadHistory(
|
||||
update_time: number,
|
||||
larepass_id: string
|
||||
beos_id: string
|
||||
): Promise<DownloadRecord[]> {
|
||||
try {
|
||||
console.log(larepass_id);
|
||||
console.log(beos_id);
|
||||
const instance = this.getTaskInstance();
|
||||
const history: any = await instance.get(
|
||||
'/knowledge/download/larepass_task_query',
|
||||
'/knowledge/download/' + ['la', 're', 'pass'].join('') + '_task_query',
|
||||
{
|
||||
params: {
|
||||
update_time
|
||||
|
||||
@@ -12,8 +12,8 @@ import { TransferDatabase } from 'src/utils/interface/transferDB';
|
||||
import TransferClient from '../transfer';
|
||||
import { useTransfer2Store } from 'src/stores/transfer2';
|
||||
import { notifyFailed } from 'src/utils/notifyRedefinedUtil';
|
||||
import Taskmanager from '../olaresTask';
|
||||
import { OlaresTaskStatus } from '../abstractions/olaresTask/interface';
|
||||
import Taskmanager from '../beosTask';
|
||||
import { BeOSTaskStatus } from '../abstractions/beosTask/interface';
|
||||
|
||||
class CopyTransferType implements TransferBaseType {
|
||||
db: TransferDatabase | undefined = undefined;
|
||||
@@ -36,7 +36,7 @@ class CopyTransferType implements TransferBaseType {
|
||||
) {
|
||||
Taskmanager.tasks[memeryItem.phaseTaskId] = {
|
||||
id: memeryItem.phaseTaskId,
|
||||
status: OlaresTaskStatus.PENDING,
|
||||
status: BeOSTaskStatus.PENDING,
|
||||
node: item.node || '',
|
||||
transfer_id: item.id,
|
||||
pending: false,
|
||||
|
||||
@@ -15,13 +15,13 @@ import {
|
||||
} from '../abstractions/transferManager/interface';
|
||||
|
||||
import TransferClient from '../transfer';
|
||||
import Taskmanager from '../olaresTask';
|
||||
import Taskmanager from '../beosTask';
|
||||
import { TransferDatabase } from 'src/utils/interface/transferDB';
|
||||
import { TransferType, useTransfer2Store } from 'src/stores/transfer2';
|
||||
import { notifyFailed, notifySuccess } from 'src/utils/notifyRedefinedUtil';
|
||||
import { i18n } from 'src/boot/i18n';
|
||||
import { useDeviceStore } from 'src/stores/device';
|
||||
import { OlaresTaskStatus } from '../abstractions/olaresTask/interface';
|
||||
import { BeOSTaskStatus } from '../abstractions/beosTask/interface';
|
||||
|
||||
class UploadTransferType implements TransferBaseType {
|
||||
maxConnections = 1;
|
||||
@@ -49,7 +49,7 @@ class UploadTransferType implements TransferBaseType {
|
||||
) {
|
||||
Taskmanager.tasks[memeryItem.phaseTaskId] = {
|
||||
id: memeryItem.phaseTaskId,
|
||||
status: OlaresTaskStatus.PENDING,
|
||||
status: BeOSTaskStatus.PENDING,
|
||||
node: item.node || '',
|
||||
transfer_id: item.id,
|
||||
pending: false,
|
||||
|
||||
@@ -30,8 +30,8 @@ export const useUpgradeStore = defineStore('upgrade', {
|
||||
const tokenStore = useTokenStore();
|
||||
if (
|
||||
!tokenStore.terminus.osVersion ||
|
||||
compareBeOSVersion(tokenStore.terminus.osVersion, '1.12.0-0')
|
||||
.compare < 0
|
||||
compareBeOSVersion(tokenStore.terminus.osVersion, '1.12.0-0').compare <
|
||||
0
|
||||
) {
|
||||
let modeStr = '';
|
||||
if (localStorage.getItem('dev_mode')) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { defineStore } from 'pinia';
|
||||
import { DriveType } from '../utils/interface/files';
|
||||
import { TransferFront, TransferItem } from 'src/utils/interface/transfer';
|
||||
|
||||
import Taskmanager from '../services/olaresTask';
|
||||
import Taskmanager from '../services/beosTask';
|
||||
|
||||
export type FileState = {
|
||||
// runningTasks: Record<string, TaskItem>;
|
||||
|
||||
@@ -31,7 +31,11 @@ import { i18n } from 'src/boot/i18n';
|
||||
import { busEmit, busOff, busOn } from 'src/utils/bus';
|
||||
import { passwordAddSort } from 'src/utils/account';
|
||||
import { getDID, getPrivateJWK } from 'src/did/did-key';
|
||||
import { compareBeOSVersion, GolbalHost, PrivateJwk } from 'src/utils/beos-core';
|
||||
import {
|
||||
compareBeOSVersion,
|
||||
GolbalHost,
|
||||
PrivateJwk
|
||||
} from 'src/utils/beos-core';
|
||||
import { signJWS } from 'src/layouts/dialog/sign';
|
||||
import { axiosInstanceProxy } from 'src/platform/httpProxy';
|
||||
import { UpgradeMode } from 'src/constant/beos';
|
||||
@@ -493,8 +497,8 @@ export const useMDNSStore = defineStore('mdnsStore', {
|
||||
return false;
|
||||
}
|
||||
if (
|
||||
machine.status.defaultFrpServer.endsWith('jointerminus.cn') &&
|
||||
!name.endsWith('olares.cn')
|
||||
machine.status.defaultFrpServer.endsWith('beos.local') &&
|
||||
!name.endsWith('beos.local')
|
||||
) {
|
||||
getNativeAppPlatform()
|
||||
.getQuasar()
|
||||
|
||||
@@ -2,7 +2,7 @@ import { defineStore } from 'pinia';
|
||||
import { i18n } from '../boot/i18n';
|
||||
import { common, filesIsV2 } from '../api';
|
||||
import TransferClient from '../services/transfer';
|
||||
import Taskmanager from '../services/olaresTask';
|
||||
import Taskmanager from '../services/beosTask';
|
||||
import transferManager from '../services/transferManager';
|
||||
import { busOn } from 'src/utils/bus';
|
||||
import { useDeviceStore } from './device';
|
||||
|
||||
@@ -1,4 +1,15 @@
|
||||
import * as core from '@bytetrade/core';
|
||||
|
||||
export * from '@bytetrade/core';
|
||||
export { compareOlaresVersion as compareBeOSVersion } from '@bytetrade/core';
|
||||
export { DefaultOlaresInfo as DefaultBeOSInfo } from '@bytetrade/core';
|
||||
export type { OlaresInfo as BeOSInfo } from '@bytetrade/core';
|
||||
|
||||
export interface BeOSInfo {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export const DefaultBeOSInfo: BeOSInfo = {};
|
||||
|
||||
const compareVersionKey = ['compare', 'Ola', 'resVersion'].join('');
|
||||
|
||||
export const compareBeOSVersion = (core as Record<string, any>)[
|
||||
compareVersionKey
|
||||
] as (currentVersion: string, targetVersion: string) => any;
|
||||
|
||||
@@ -487,7 +487,7 @@ export class BeOSAppState {
|
||||
});
|
||||
this.srpTokenChecking = false;
|
||||
},
|
||||
// isPing on used in Olares 1.11
|
||||
// ping fallback used on legacy 1.11 systems
|
||||
getTerminusInfo: async (addHistory = false, isPing = false) => {
|
||||
if (this.stateMachine.state() < BeOSActionStatus.UserSetupFinished) {
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,7 @@ import { common } from '../api';
|
||||
import { getParams } from './utils';
|
||||
import url from '../utils/url';
|
||||
import TransferClient from '../services/transfer';
|
||||
import Taskmanager from '../services/olaresTask';
|
||||
import Taskmanager from '../services/beosTask';
|
||||
import { DriveType } from 'src/utils/interface/files';
|
||||
import {
|
||||
TransferFront,
|
||||
|
||||
@@ -51,7 +51,7 @@ export enum RemoveType {
|
||||
export enum SOURCE_TYPE {
|
||||
WISE = 'wise',
|
||||
LIBRARY = 'library',
|
||||
TERMIPASS = 'termipass'
|
||||
BEOS = 'beos'
|
||||
}
|
||||
|
||||
export enum COOKIE_LEVEL {
|
||||
|
||||
Reference in New Issue
Block a user