Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
fix: setchunkrequest after page update
Browse files Browse the repository at this point in the history
  • Loading branch information
hibig committed Aug 19, 2023
1 parent d59770b commit 1d08437
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
9 changes: 7 additions & 2 deletions src/views/application-management/projects/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ export default [
PROJECT.ConnectorProviderDetail,
PROJECT.ConnectorCustomDetail,
PROJECT.EnvDetail,
PROJECT.EnvEdit
PROJECT.EnvEdit,
PROJECT.EnvClone
],
icon: 'icon-apps'
}
Expand All @@ -70,7 +71,11 @@ export default [
type: permissionKey.projectRoles,
actions: ['GET']
},
cachePages: [PROJECT.ServiceEdit, PROJECT.ServiceDetail],
cachePages: [
PROJECT.ServiceEdit,
PROJECT.ServiceDetail,
PROJECT.ServiceClone
],
icon: 'icon-apps'
}
},
Expand Down
6 changes: 4 additions & 2 deletions src/views/application-management/services/pages/list.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
import { Resources, Actions } from '@/permissions/config';
import _, { get, pickBy, filter } from 'lodash';
import dayjs from 'dayjs';
import { reactive, ref, onBeforeUnmount, onMounted } from 'vue';
import { reactive, ref, onBeforeUnmount, onMounted, nextTick } from 'vue';
import {
useSetChunkRequest,
createAxiosToken
Expand Down Expand Up @@ -500,7 +500,9 @@
});
onMounted(() => {
setActionHandler();
createServiceChunkRequest();
nextTick(() => {
createServiceChunkRequest();
});
});
init();
</script>
Expand Down
17 changes: 12 additions & 5 deletions src/views/login/components/login-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,10 @@
const { loading, setLoading } = useLoading();
const userStore = useUserStore();
const rememberPassword = ref<boolean>(false);
const settingsInfo = ref({});
const settingsInfo = ref<any>({
ServeUrl: window.location.origin,
EnableTelemetry: 'true'
});
const showModify = ref<boolean>(false);
const userInfo = reactive({
username: '',
Expand Down Expand Up @@ -213,9 +216,6 @@
removeLocalLoginInfo();
}
await userStore.login(values);
// if (isNotFirstLogin()) {
// await userStore.info();
// }
// help to get serverURL id
const userSetting = _.get(userStore, 'userInfo.userSetting');
userStore.setInfo({
Expand Down Expand Up @@ -244,7 +244,13 @@
const setRememberPassword = (val) => {
rememberPassword.value = val;
};
const checkShowModify = () => {
if (userStore?.isFirstLogin() && userStore.name) {
showModify.value = true;
emits('update:hideTips', true);
emits('loginSuccess');
}
};
const getLocalSetting = async () => {
const res = await readLocalLoginInfo();
userInfo.username = res?.username || '';
Expand All @@ -253,6 +259,7 @@
};
onMounted(async () => {
getLocalSetting();
checkShowModify();
});
</script>

Expand Down
6 changes: 2 additions & 4 deletions src/views/login/components/modify-password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
import { updateUserSettingBatch } from '@/views/system/api/setting';
import { urlReg } from '@/utils/validate';
const cllectionLink = 'https://seal-io.github.io/docs/quickstart';
const cllectionLink = 'https://seal-io.github.io/docs/telemetry';
const { t } = useI18n();
const userStore = useUserStore();
const router = useRouter();
Expand Down Expand Up @@ -158,9 +158,7 @@
serverUrl: window.location.origin,
enableTelemetry: true
});
const handleCancel = () => {
router.back();
};
const validateConfirmPassword = (value, callback) => {
if (!value) {
callback(t('user.password.rules.confirmpassword'));
Expand Down
2 changes: 1 addition & 1 deletion src/views/login/locale/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export default {
'search "Bootstrap Admin Password" from the logs of walrus process',
'login.config.user.action':
'Allows collection of <a href={link} target="_blank" class="a-link">anonymous statistics</a>, to help us improve walrus',
'login.config.join.improvement': 'Participate in improvement plans'
'login.config.join.improvement': 'Participate in improvement plan'
};

0 comments on commit 1d08437

Please sign in to comment.