Skip to content

Commit e0cbc24

Browse files
authored
Merge pull request #1485 from pateljannat/release-conflicts
chore: merge to 'main'
2 parents 8b91323 + a2c8a82 commit e0cbc24

90 files changed

Lines changed: 12260 additions & 7048 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/make_release_pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
name: Create weekly release
22
on:
33
schedule:
4-
# 13:00 UTC -> 7pm IST on every Wednesday
5-
- cron: '30 4 * * 3'
4+
- cron: '30 4 15 * *'
65
workflow_dispatch:
76

87
jobs:

.github/workflows/ui-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ jobs:
100100
bench --site lms.test execute frappe.utils.install.complete_setup_wizard
101101
bench --site lms.test execute frappe.tests.ui_test_helpers.create_test_user
102102
bench --site lms.test set-password frappe@example.com admin
103+
bench --site lms.test execute lms.lms.utils.persona_captured
103104
104105
- name: cypress pre-requisites
105106
run: |

cypress.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ module.exports = defineConfig({
1313
openMode: 0,
1414
},
1515
e2e: {
16-
baseUrl: "http://testui:8000",
16+
baseUrl: "http://pertest:8000",
1717
},
1818
});

frappe-ui

Submodule frappe-ui updated 212 files

frontend/components.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ declare module 'vue' {
1616
AssessmentPlugin: typeof import('./src/components/AssessmentPlugin.vue')['default']
1717
Assessments: typeof import('./src/components/Assessments.vue')['default']
1818
Assignment: typeof import('./src/components/Assignment.vue')['default']
19+
AssignmentForm: typeof import('./src/components/Modals/AssignmentForm.vue')['default']
1920
AudioBlock: typeof import('./src/components/AudioBlock.vue')['default']
2021
Autocomplete: typeof import('./src/components/Controls/Autocomplete.vue')['default']
2122
BatchCard: typeof import('./src/components/BatchCard.vue')['default']
@@ -70,6 +71,7 @@ declare module 'vue' {
7071
NotPermitted: typeof import('./src/components/NotPermitted.vue')['default']
7172
PageModal: typeof import('./src/components/Modals/PageModal.vue')['default']
7273
PaymentSettings: typeof import('./src/components/PaymentSettings.vue')['default']
74+
Play: typeof import('./src/components/Icons/Play.vue')['default']
7375
ProgressBar: typeof import('./src/components/ProgressBar.vue')['default']
7476
Question: typeof import('./src/components/Modals/Question.vue')['default']
7577
Quiz: typeof import('./src/components/Quiz.vue')['default']

frontend/index.html

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,8 @@ <h1>{{ meta.title }}</h1>
2626
<a href="{{ meta.link }}">Know More</a>
2727
</div>
2828
</div>
29-
<div id="modals"></div>
30-
<div id="popovers"></div>
31-
3229
<script>
3330
document.getElementById('seo-content').style.display = 'none';
34-
window.csrf_token = '{{ csrf_token }}'
3531
</script>
3632
<script type="module" src="/src/main.js"></script>
3733
</body>

frontend/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@
2626
"codemirror-editor-vue3": "^2.8.0",
2727
"dayjs": "^1.11.6",
2828
"feather-icons": "^4.28.0",
29-
"frappe-ui": "^0.1.122",
29+
"frappe-ui": "^0.1.134",
3030
"highlight.js": "^11.11.1",
3131
"lucide-vue-next": "^0.383.0",
3232
"markdown-it": "^14.0.0",
3333
"pinia": "^2.0.33",
34+
"plyr": "^3.7.8",
3435
"socket.io-client": "^4.7.2",
3536
"tailwindcss": "3.4.15",
3637
"typescript": "^5.7.2",

frontend/src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ const router = useRouter()
2424
const noSidebar = ref(false)
2525
2626
router.beforeEach((to, from, next) => {
27-
if (to.query.fromLesson) {
27+
if (to.query.fromLesson || to.path === '/persona') {
2828
noSidebar.value = true
2929
} else {
3030
noSidebar.value = false

frontend/src/components/AppSidebar.vue

Lines changed: 83 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@
3939
{{ __('More') }}
4040
</span>
4141
</div>
42-
<Button v-if="isModerator" variant="ghost" @click="openPageModal()">
42+
<Button
43+
v-if="isModerator && !readOnlyMode"
44+
variant="ghost"
45+
@click="openPageModal()"
46+
>
4347
<template #icon>
4448
<Plus class="h-4 w-4 text-ink-gray-7 stroke-1.5" />
4549
</template>
@@ -63,6 +67,16 @@
6367
</div>
6468
</div>
6569
<div class="m-2 flex flex-col gap-1">
70+
<div
71+
v-if="readOnlyMode && !sidebarStore.isSidebarCollapsed"
72+
class="z-10 m-2 bg-surface-modal py-2.5 px-3 text-xs text-ink-gray-7 leading-5 rounded-md"
73+
>
74+
{{
75+
__(
76+
'This site is being updated. You will not be able to make any changes. Full access will be restored shortly.'
77+
)
78+
}}
79+
</div>
6680
<TrialBanner
6781
v-if="
6882
userResource.data?.is_system_manager && userResource.data?.is_fc_site
@@ -74,43 +88,69 @@
7488
:isSidebarCollapsed="sidebarStore.isSidebarCollapsed"
7589
appName="learning"
7690
/>
77-
<SidebarLink
78-
v-if="isOnboardingStepsCompleted"
79-
:link="{
80-
label: __('Help'),
81-
}"
82-
:isCollapsed="sidebarStore.isSidebarCollapsed"
83-
@click="
84-
() => {
85-
showHelpModal = minimize ? true : !showHelpModal
86-
minimize = !showHelpModal
87-
}
91+
92+
<div
93+
class="flex items-center mt-4"
94+
:class="
95+
sidebarStore.isSidebarCollapsed ? 'flex-col space-y-3' : 'flex-row'
8896
"
8997
>
90-
<template #icon>
91-
<span class="grid h-5 w-6 flex-shrink-0 place-items-center">
92-
<CircleHelp class="h-4 w-4 stroke-1.5" />
93-
</span>
94-
</template>
95-
</SidebarLink>
96-
<SidebarLink
97-
:link="{
98-
label: sidebarStore.isSidebarCollapsed ? 'Expand' : 'Collapse',
99-
}"
100-
:isCollapsed="sidebarStore.isSidebarCollapsed"
101-
@click="toggleSidebar()"
102-
>
103-
<template #icon>
104-
<span class="grid h-5 w-6 flex-shrink-0 place-items-center">
105-
<CollapseSidebar
106-
class="h-4 w-4 text-ink-gray-7 duration-300 ease-in-out"
107-
:class="{
108-
'[transform:rotateY(180deg)]': sidebarStore.isSidebarCollapsed,
109-
}"
98+
<div
99+
class="flex items-center flex-1"
100+
:class="
101+
sidebarStore.isSidebarCollapsed
102+
? 'flex-col space-y-3'
103+
: 'flex-row space-x-3'
104+
"
105+
>
106+
<Tooltip v-if="readOnlyMode && sidebarStore.isSidebarCollapsed">
107+
<CircleAlert
108+
class="size-4 stroke-1.5 text-ink-gray-7 cursor-pointer"
110109
/>
111-
</span>
112-
</template>
113-
</SidebarLink>
110+
<template #body>
111+
<div
112+
class="max-w-[30ch] rounded bg-surface-gray-7 px-2 py-1 text-center text-p-xs text-ink-white shadow-xl"
113+
>
114+
{{
115+
__(
116+
'This site is being updated. You will not be able to make any changes. Full access will be restored shortly.'
117+
)
118+
}}
119+
</div>
120+
</template>
121+
</Tooltip>
122+
<Tooltip :text="__('Powered by Learning')">
123+
<Zap
124+
class="size-4 stroke-1.5 text-ink-gray-7 cursor-pointer"
125+
@click="redirectToWebsite()"
126+
/>
127+
</Tooltip>
128+
<Tooltip :text="__('Help')">
129+
<CircleHelp
130+
class="size-4 stroke-1.5 text-ink-gray-7 cursor-pointer"
131+
@click="
132+
() => {
133+
showHelpModal = minimize ? true : !showHelpModal
134+
minimize = !showHelpModal
135+
}
136+
"
137+
/>
138+
</Tooltip>
139+
</div>
140+
<Tooltip
141+
:text="
142+
sidebarStore.isSidebarCollapsed ? __('Expand') : __('Collapse')
143+
"
144+
>
145+
<CollapseSidebar
146+
class="size-4 text-ink-gray-7 duration-300 stroke-1.5 ease-in-out cursor-pointer"
147+
:class="{
148+
'[transform:rotateY(180deg)]': sidebarStore.isSidebarCollapsed,
149+
}"
150+
@click="toggleSidebar()"
151+
/>
152+
</Tooltip>
153+
</div>
114154
</div>
115155
<HelpModal
116156
v-if="showOnboarding && showHelpModal"
@@ -148,14 +188,15 @@ import { usersStore } from '@/stores/user'
148188
import { sessionStore } from '@/stores/session'
149189
import { useSidebar } from '@/stores/sidebar'
150190
import { useSettings } from '@/stores/settings'
151-
import { Button, createResource } from 'frappe-ui'
191+
import { Button, createResource, Tooltip } from 'frappe-ui'
152192
import PageModal from '@/components/Modals/PageModal.vue'
153193
import { capture } from '@/telemetry'
154194
import LMSLogo from '@/components/Icons/LMSLogo.vue'
155195
import { useRouter } from 'vue-router'
156196
import InviteIcon from './Icons/InviteIcon.vue'
157197
import {
158198
BookOpen,
199+
CircleAlert,
159200
ChevronRight,
160201
Plus,
161202
CircleHelp,
@@ -164,6 +205,7 @@ import {
164205
UserPlus,
165206
Users,
166207
BookText,
208+
Zap,
167209
} from 'lucide-vue-next'
168210
import {
169211
TrialBanner,
@@ -192,6 +234,7 @@ const currentStep = ref({})
192234
const router = useRouter()
193235
let onboardingDetails
194236
let isOnboardingStepsCompleted = false
237+
const readOnlyMode = window.read_only_mode
195238
const iconProps = {
196239
strokeWidth: 1.5,
197240
width: 16,
@@ -578,4 +621,8 @@ watch(userResource, () => {
578621
setUpOnboarding()
579622
}
580623
})
624+
625+
const redirectToWebsite = () => {
626+
window.open('https://frappe.io/learning', '_blank')
627+
}
581628
</script>

frontend/src/components/Assessments.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<div class="text-lg font-semibold text-ink-gray-9">
55
{{ __('Assessments') }}
66
</div>
7-
<Button v-if="canSeeAddButton()" @click="showModal = true">
7+
<Button v-if="canAddAssessments()" @click="showModal = true">
88
<template #prefix>
99
<Plus class="h-4 w-4" />
1010
</template>
@@ -100,6 +100,7 @@ import { Plus, Trash2 } from 'lucide-vue-next'
100100
101101
const user = inject('$user')
102102
const showModal = ref(false)
103+
const readOnlyMode = window.read_only_mode
103104
104105
const props = defineProps({
105106
batch: {
@@ -181,7 +182,8 @@ const getRowRoute = (row) => {
181182
}
182183
}
183184
184-
const canSeeAddButton = () => {
185+
const canAddAssessments = () => {
186+
if (readOnlyMode) return false
185187
return user.data?.is_moderator || user.data?.is_evaluator
186188
}
187189

0 commit comments

Comments
 (0)