Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
06c1686
add confirmation for deliting auth method
Jan 28, 2025
9d161b2
fix error for text label in vuetify modal window
Jan 28, 2025
20c85f8
change colours between buttons
Jan 30, 2025
e5ef817
add-confirmation-for-delete-auth-method. fix-auth-button-styles
Feb 15, 2025
abafc49
fix-close-bracket
Feb 15, 2025
cf31222
delete-extra-comments-fix-styles
Feb 15, 2025
f37c453
удалил явное вхождение переменых variant, size, class из применения I…
Feb 18, 2025
0355e21
изменил файл, добавил переменную location принимающую значение auth-e…
Feb 20, 2025
3b54336
заменил location -> на props.location, так как имя location зарезерви…
Feb 20, 2025
00a2840
поправил форматирование
Feb 20, 2025
d01195d
добавил редирект и считывание нужных параметров из вводимой url
Mar 2, 2025
d94099b
передача параметров исходной url через props. Изменение функции compo…
Mar 2, 2025
263527b
вся логика написана, но не работает, надо думать
Mar 2, 2025
8a0416b
данные считываются, но в props не пробрасывается значение relativePath
Mar 2, 2025
cd55fa9
По логам, relativePath и lecturer_id определяются, но на моменте проп…
Mar 3, 2025
badd233
добавлены изменения в функцию composeUrl. В случае налчия lecturer?le…
Mar 5, 2025
b3b116f
добавлены изменения в роутер, добавлена передача lecturer_id и relave…
Mar 5, 2025
f70b8dc
Merge branch 'main' into providing-links-for-miniapps
BatuevIO Mar 8, 2025
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
24 changes: 24 additions & 0 deletions src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,30 @@ const routes: RouteRecordRaw[] = [
{
path: '/apps/:id(\\d+)',
component: () => import('@/views/apps/ApplicationFrame.vue'),
props: route => ({
id: Number(route.params.id),
lecturer: route.query.lecturer_id,
relativePath: route.query.relativePath || '',
}),
beforeEnter: route => {
console.log(route.params, route.query);
},
},

{
path: '/apps/44/lecturer',
redirect: to => {
const query = to.query;
const relativePath = to.path.slice(to.path.lastIndexOf('/') + 1);

return {
path: '/apps/44',
query: {
lecturer_id: query.lecturer_id,
relativePath: relativePath,
},
};
},
},
{
path: '/timetable',
Expand Down
20 changes: 19 additions & 1 deletion src/views/apps/ApplicationFrame.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ const router = useRouter();
const profileStore = useProfileStore();
const appStore = useAppsStore();

router.replace({ query: undefined });

const props = defineProps({
lecturer: { type: String, required: false, default: null },
relativePath: { type: String, required: false, default: null },
});

const relPath = props.relativePath;
const lect_id = props.lecturer;

console.log('props: ', props.lecturer, props.relativePath);

enum AppState {
WaitLoad = 1,
Show = 2,
Expand All @@ -29,13 +41,18 @@ const appState = ref(AppState.WaitLoad);
const scopes: Ref<string[]> = ref([]);

const scopeNamesToRequest: Ref<string[]> = ref([]);
// const userScopeApproved: Ref<boolean | undefined> = ref();

toolbar.setup({
backUrl: '/apps',
});

const composeUrl = async (url: URL, token: string | null, scopes: string[]) => {
if (relPath) {
url = new URL(relPath, url);
}
if (lect_id) {
url = new URL(`?lecturer_id=${lect_id}`, url);
}
if (token !== null) {
url.searchParams.set('token', token);
}
Expand Down Expand Up @@ -125,6 +142,7 @@ const openApp = async (data: ServiceData) => {
appState.value = AppState.Error;
return;
}

url.value = new URL(data.link);
toolbar.title = data.name ?? 'Ошибка';

Expand Down