Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #42647 Unnecessary 2FA UI message #44585

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions apps/files/css/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -348,18 +348,19 @@ table td.filename .thumbnail-wrapper.icon-loading-small {
}
}
table td.filename .thumbnail {
display: inline-block;
width: 32px;
height: 32px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-left: 9px;
margin-top: 9px;
border-radius: var(--border-radius);
cursor: pointer;
position: absolute;
z-index: 4;
display: inline-block;
width: 32px;
height: 32px;
background-size: contain;
background-position: center;
background-repeat: no-repeat;
margin-left: 9px;
margin-top: 9px;
border-radius: var(--border-radius);
cursor: pointer;
position: absolute;
z-index: 4;
background-color: var(--primary-color); /* Set the background color to the primary color */
}
table td.filename p.name .thumbnail {
cursor: default;
Expand Down
3 changes: 2 additions & 1 deletion apps/files/src/views/ReferenceFileWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
:href="richObject.link"
target="_blank"
@click="navigate">
<span class="widget-file__image" :class="filePreviewClass" :style="filePreviewStyle">
<span class="widget-file__image" :class="filePreviewClass" :style="{ backgroundColor: primaryColor }">
<template v-if="!previewUrl">
<FolderIcon v-if="isFolder" :size="88" />
<FileIcon v-else :size="88" />
Expand Down Expand Up @@ -141,6 +141,7 @@ export default defineComponent({
return {
previewUrl: null as string | null,
failedViewer: false,
primaryColor: 'var(--primary-color)'
}
},

Expand Down
58 changes: 21 additions & 37 deletions apps/files/src/views/Settings.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<!--
- @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>
- @copyright Copyright (c) 2024 Jed Boulahya <jed.boulahya@medtech.tn>
-
- @author John Molakvoæ <skjnldsv@protonmail.com>
-
Expand All @@ -20,79 +21,62 @@
-
-->
<template>
<NcAppSettingsDialog :open="open"
:show-navigation="true"
:name="t('files', 'Files settings')"
<NcAppSettingsDialog :open="open" :show-navigation="true" :name="t('files', 'Files settings')"
@update:open="onClose">
<!-- Settings API-->
<NcAppSettingsSection id="settings" :name="t('files', 'Files settings')">
<NcCheckboxRadioSwitch data-cy-files-settings-setting="sort_favorites_first"
:checked="userConfig.sort_favorites_first"
@update:checked="setConfig('sort_favorites_first', $event)">
:checked="userConfig.sort_favorites_first" @update:checked="setConfig('sort_favorites_first', $event)">
{{ t('files', 'Sort favorites first') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch data-cy-files-settings-setting="sort_folders_first"
:checked="userConfig.sort_folders_first"
@update:checked="setConfig('sort_folders_first', $event)">
:checked="userConfig.sort_folders_first" @update:checked="setConfig('sort_folders_first', $event)">
{{ t('files', 'Sort folders before files') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch data-cy-files-settings-setting="show_hidden"
:checked="userConfig.show_hidden"
<NcCheckboxRadioSwitch data-cy-files-settings-setting="show_hidden" :checked="userConfig.show_hidden"
@update:checked="setConfig('show_hidden', $event)">
{{ t('files', 'Show hidden files') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch data-cy-files-settings-setting="crop_image_previews"
:checked="userConfig.crop_image_previews"
@update:checked="setConfig('crop_image_previews', $event)">
:checked="userConfig.crop_image_previews" @update:checked="setConfig('crop_image_previews', $event)">
{{ t('files', 'Crop image previews') }}
</NcCheckboxRadioSwitch>
<NcCheckboxRadioSwitch v-if="enableGridView"
data-cy-files-settings-setting="grid_view"
:checked="userConfig.grid_view"
@update:checked="setConfig('grid_view', $event)">
<NcCheckboxRadioSwitch v-if="enableGridView" data-cy-files-settings-setting="grid_view"
:checked="userConfig.grid_view" @update:checked="setConfig('grid_view', $event)">
{{ t('files', 'Enable the grid view') }}
</NcCheckboxRadioSwitch>
</NcAppSettingsSection>

<!-- Settings API-->
<NcAppSettingsSection v-if="settings.length !== 0"
id="more-settings"
:name="t('files', 'Additional settings')">
<NcAppSettingsSection v-if="settings.length !== 0" id="more-settings" :name="t('files', 'Additional settings')">
<template v-for="setting in settings">
<Setting :key="setting.name" :el="setting.el" />
</template>
</NcAppSettingsSection>

<!-- Webdav URL-->
<NcAppSettingsSection id="webdav" :name="t('files', 'WebDAV')">
<NcInputField id="webdav-url-input"
:label="t('files', 'WebDAV URL')"
:show-trailing-button="true"
:success="webdavUrlCopied"
:trailing-button-label="t('files', 'Copy to clipboard')"
:value="webdavUrl"
readonly="readonly"
type="url"
@focus="$event.target.select()"
@trailing-button-click="copyCloudId">
<NcInputField id="webdav-url-input" :label="t('files', 'WebDAV URL')" :show-trailing-button="true"
:success="webdavUrlCopied" :trailing-button-label="t('files', 'Copy to clipboard')" :value="webdavUrl"
readonly="readonly" type="url" @focus="$event.target.select()" @trailing-button-click="copyCloudId">
<template #trailing-button-icon>
<Clipboard :size="20" />
</template>
</NcInputField>
<em>
<a class="setting-link"
:href="webdavDocs"
target="_blank"
rel="noreferrer noopener">
<a class="setting-link" :href="webdavDocs" target="_blank" rel="noreferrer noopener">
{{ t('files', 'Use this address to access your Files via WebDAV') }} ↗
</a>
</em>
<br>
<em>
<a class="setting-link" :href="appPasswordUrl">
{{ t('files', 'If you have enabled 2FA, you must create and use a new app password by clicking here.') }} ↗
</a>
</em>
<!-- Conditional rendering based on 2FA -->
<template v-if="isTwoFactorEnabled">
<em>
<a class="setting-link" :href="appPasswordUrl">
{{ t('files', 'If you have enabled 2FA, you must create and use a new app password by clicking here.') }} ↗
</a>
</em>
</template>
</NcAppSettingsSection>
</NcAppSettingsDialog>
</template>
Expand Down