Skip to content
Merged
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
1 change: 1 addition & 0 deletions frontend/src/views/website/ssl/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
fix
show-overflow-tooltip
prop="primaryDomain"
min-width="150px"
></el-table-column>
<el-table-column
:label="$t('website.otherDomains')"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an error in the provided code snippet that needs to be fixed. The line min-width="150px" should be removed due to it causing an issue with displaying text content on mobile devices.

Here's the corrected version of the code:

<style scoped>
    .no-mobile {
        display: none !important;
    }
</style>

<div class="app-container">
    <el-table :data="{list}" 
              tooltip-effect="dark"  
              @selection-change="
                  $emit("select", selected)
                "
            >
          <!-- ... -->

This change was made based on analyzing the code and understanding the requirement.

Expand Down
12 changes: 12 additions & 0 deletions frontend/src/views/website/website/domain-create/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@

<script lang="ts" setup>
import { Rules, checkNumberRange } from '@/global/form-rules';
import i18n from '@/lang';
import { MsgError } from '@/utils/message';
import { ref } from 'vue';

const props = defineProps({
Expand Down Expand Up @@ -105,10 +107,20 @@ const removeDomain = (index: number) => {
create.value.domains.splice(index, 1);
};

const checkDomain = (domain: string) => {
const reg =
/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})(:\d{1,5})?$/;
return reg.test(domain);
};

const gengerateDomains = () => {
const lines = create.value.domainStr.split(/\r?\n/);
lines.forEach((line) => {
const [domain, port] = line.split(':');
if (!checkDomain(domain)) {
MsgError(line + i18n.global.t('commons.rule.domain'));
return;
}
const exists = (domain: string, port: number): boolean => {
return create.value.domains.some((info) => info.domain === domain && info.port === port);
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The difference between import statement and other imports is that it is required to be inside a function with an "async" keyword, while others can appear at any place of the code without requiring such a keyword. This should be reviewed before deciding on its use.

Expand Down
Loading