Skip to content

Commit

Permalink
fix: fixed some bug in Vault (#163)
Browse files Browse the repository at this point in the history
  • Loading branch information
qq815776412 authored Sep 23, 2024
2 parents ea7ebca + 2551723 commit 07a3d81
Show file tree
Hide file tree
Showing 24 changed files with 273 additions and 291 deletions.
5 changes: 3 additions & 2 deletions packages/app/src/components/common/TerminusDialogBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ defineProps({
});
const $q = useQuasar();
const isMobile =
ref(process.env.PLATFORM == 'MOBILE' || $q.platform.is.mobile) && !isPad();
const isMobile = ref(
(process.env.PLATFORM == 'MOBILE' || $q.platform.is.mobile) && !isPad()
);
const emit = defineEmits(['close']);
const { t } = useI18n();
Expand Down
5 changes: 3 additions & 2 deletions packages/app/src/components/common/TerminusEdit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
: inputTypeRef === 'password' && !isMobile
? '22px'
: '12px'
}`
}`,
textIndent: '16px'
}"
:readonly="isReadOnly"
@update:model-value="onTextChange"
Expand Down Expand Up @@ -206,12 +207,12 @@ function changeInputType() {
width: 100%;
margin-top: 4px;
position: relative;
overflow: hidden;
&__input {
height: 100%;
width: calc(100% - 30px);
margin-top: -6px;
margin-left: 16px;
color: $ink-1;
}
}
Expand Down
19 changes: 5 additions & 14 deletions packages/app/src/components/files/BreadcrumbsComponent.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,9 @@ const items = computed(function () {
let parts = relativePath.split('/');
console.log('parts0', parts);
if (parts[0] === '') {
parts.shift();
}
console.log('parts1', parts);
if (
parts[0] === 'Files' ||
Expand All @@ -87,12 +84,10 @@ const items = computed(function () {
if (parts[0] === 'google' || parts[0] === 'dropbox') {
parts.shift();
}
console.log('parts2', parts);
if (parts[parts.length - 1] === '') {
parts.pop();
}
console.log('parts3', parts);
let breadcrumbs: any[] = [];
Expand Down Expand Up @@ -160,8 +155,6 @@ const formatBreadcrumbs = (parts) => {
const midParts = parts.slice(1, -1).reverse();
const midTemParts: any[] = [];
console.log('midParts', midParts);
for (let i = 0; i < midParts.length; i++) {
const part = midParts[i];
const midWidth = midTemParts.reduce((accumulator, currentValue: any) => {
Expand All @@ -172,11 +165,11 @@ const formatBreadcrumbs = (parts) => {
if (hasAbbrIndex > -1) {
midTemParts[hasAbbrIndex].children.unshift(part);
} else {
console.log('breadcrumbsWidth', breadcrumbsWidth.value);
console.log('part', getTextWidth(part.name));
console.log('firstPart', getTextWidth(firstPart.name));
console.log('lastPart', getTextWidth(lastPart.name));
console.log('midWidth', midWidth);
// console.log('breadcrumbsWidth', breadcrumbsWidth.value);
// console.log('part', getTextWidth(part.name));
// console.log('firstPart', getTextWidth(firstPart.name));
// console.log('lastPart', getTextWidth(lastPart.name));
// console.log('midWidth', midWidth);
if (
breadcrumbsWidth.value <
getTextWidth(firstPart.name) +
Expand All @@ -202,8 +195,6 @@ const formatBreadcrumbs = (parts) => {
newParts = [firstPart, ...midTemParts, lastPart];
}
console.log('newParts', newParts);
return newParts;
};
Expand Down
12 changes: 7 additions & 5 deletions packages/app/src/i18n/en-US/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ export default {
favorites: 'Favorites',
syncing: 'Syncing',
restore: 'Restore',
toggle: 'Toggle',
select_all: 'Select All',
return: 'Return',
import: 'Import',
about: 'About',
Expand Down Expand Up @@ -937,7 +937,7 @@ export default {
vault_name_is_null: 'Vault name missing',
having_the_same_vault_name: 'A vault with the same name already exists',
create_vault_success: 'Vault created successfully',
update_vault_access_success: 'Vault access updated successfully',
update_vault_access_success: 'Vault updated successfully',
add_vault: 'Add vault',
not_have_any_vaults_yet: 'No vaults yet',
not_have_any_members_yet: 'No members yet',
Expand Down Expand Up @@ -981,12 +981,12 @@ export default {
'A membership confirmation request was send to:',
an_invite_was_send_to: 'An invite was sent to:',
following_confirmation_code_shuould_communicate_to_them_separately:
'For members to complete confirmation, provide the following confirmation codes to them separately:',
'Send the following code to the member to finish the confirmation:',
add_member: 'Add member',

no_invite_selected: 'No invite selected',
this_invite_has_expired: 'Invite expired',
expires_date_0: 'Expire on {data_0}',
expires_date_0: 'Expire on {date_0}',
membe_was_successfully_added_to_your_organization:
"'{member}' is successfully added to your organization!",
do_not_have_any_invitees_yet: 'No invitees yet',
Expand Down Expand Up @@ -1119,7 +1119,7 @@ export default {
random_string: 'Random string',
word_separator: 'Word Separator',
words: 'words',
egenerate: 'Regenerate',
regenerate: 'Regenerate',

'Your Google account grants us the following permissions:':
'Your Google account grants us the following permissions:',
Expand Down Expand Up @@ -1159,6 +1159,8 @@ export default {
transport_pause_all: 'Pause all',
offline_message: "Can't perform this task in offline mode",

copied: 'Copied',

...termipass_en,
...wise_en
};
12 changes: 7 additions & 5 deletions packages/app/src/i18n/zh-CN/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export default {
favorites: '收藏夹',
syncing: '正在同步',
restore: '恢复',
toggle: '切换',
select_all: '全选',
return: '返回',
import: '导入',
about: '关于',
Expand Down Expand Up @@ -818,7 +818,7 @@ export default {
vault_name_is_null: '缺少 Vault 名称',
having_the_same_vault_name: '已经存在一个同名 Vault',
create_vault_success: 'Vault 创建成功',
update_vault_access_success: 'Vault 访问权限更新成功',
update_vault_access_success: 'Vault 更新成功',
add_vault: '添加 Vault',
not_have_any_vaults_yet: '暂无 Vault',
not_have_any_members_yet: '暂无成员',
Expand Down Expand Up @@ -859,11 +859,11 @@ export default {
a_membership_confirmation_request_was_send_to: '成员资格确认请求已发送至:',
an_invite_was_send_to: '邀请已发送至:',
following_confirmation_code_shuould_communicate_to_them_separately:
'为使成员完成确认,请分别向他们提供以下确认码:',
'向成员发送以下编码以完成确认:',
add_member: '添加成员',
no_invite_selected: '未选择邀请',
this_invite_has_expired: '邀请已过期',
expires_date_0: '到期日期:{data_0}',
expires_date_0: '到期日期:{date_0}',
membe_was_successfully_added_to_your_organization:
'“{member}”已成功添加到您的组织!',
do_not_have_any_invitees_yet: '暂无受邀者',
Expand Down Expand Up @@ -985,7 +985,7 @@ export default {
random_string: '随机字符串',
word_separator: '分隔符',
words: '个字',
egenerate: '重新生成',
regenerate: '重新生成',

'Your Google account grants us the following permissions:':
'您的 Google 账户授权我们使用以下权限:',
Expand Down Expand Up @@ -1026,6 +1026,8 @@ export default {
transport_pause_all: '暂停所有',
offline_message: '无法在离线模式下执行此操作',

copied: '已拷贝',

...termipass_cn,
...wise_cn
};
2 changes: 1 addition & 1 deletion packages/app/src/pages/Files/common-files/FilesHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class="row items-center justify-between header-content drag-content-header q-pl-md"
>
<div
class="row items-center justify-start"
class="row items-center justify-start items-no-drag"
style="width: calc(100% - 220px)"
>
<NavigationComponent />
Expand Down
12 changes: 9 additions & 3 deletions packages/app/src/pages/Items/ItemList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@
text-color="ink-2"
@click="toggleCheckbox"
>
<q-tooltip>{{ t('toggle') }}</q-tooltip>
<q-tooltip>{{
selectAll ? t('cancel') : t('select_all')
}}</q-tooltip>
</q-btn>
</div>
<div class="row items-center text-h7">
Expand Down Expand Up @@ -277,7 +279,7 @@

<q-scroll-area
ref="vaultItemRef"
:thumb-style="contentStyle as any"
:thumb-style="scrollBarStyle.thumbStyle"
:visible="true"
style="height: 54px; width: 100%"
@scroll="scrollItem($event, item.item.id)"
Expand Down Expand Up @@ -318,7 +320,7 @@
size="16px"
class="q-mr-xs"
/>
Copied!
{{ t('copied') }}
</div>
</div>

Expand Down Expand Up @@ -495,6 +497,7 @@ export default defineComponent({
const filterInput = ref('');
const filterShowing = ref('default');
const selectAll = ref(false);
// const accountName = ref(app.account!.name);
Expand Down Expand Up @@ -1113,12 +1116,14 @@ export default defineComponent({
const toggleCheckbox = () => {
if (checkBoxArr.value.length === itemList.value.length) {
resetCheckbox();
selectAll.value = false;
} else {
resetCheckbox();
for (let i = 0; i < itemList.value.length; i++) {
const item = itemList.value[i];
checkBoxArr.value.push(item.item.id);
}
selectAll.value = true;
}
};
Expand Down Expand Up @@ -1222,6 +1227,7 @@ export default defineComponent({
isBex,
termipassStore,
isPad,
selectAll,
translate
};
}
Expand Down
Loading

0 comments on commit 07a3d81

Please sign in to comment.