Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AlekSIS-Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AlekSIS®
Official
AlekSIS-Core
Commits
5484072f
Commit
5484072f
authored
2 years ago
by
Hangzhi Yu
Browse files
Options
Downloads
Patches
Plain Diff
Start including apollo
parent
59191820
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!1045
Introduce Vuetify and GraphQL
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
aleksis/core/settings.py
+13
-1
13 additions, 1 deletion
aleksis/core/settings.py
aleksis/core/static/js/vue/app.js
+12
-0
12 additions, 0 deletions
aleksis/core/static/js/vue/app.js
aleksis/core/templates/core/vue_base.html
+9
-3
9 additions, 3 deletions
aleksis/core/templates/core/vue_base.html
with
34 additions
and
4 deletions
aleksis/core/settings.py
+
13
−
1
View file @
5484072f
...
...
@@ -586,6 +586,9 @@ YARN_INSTALLED_APPS = [
"
vue@^2.6.14
"
,
"
vuetify@^2.6.5
"
,
"
@mdi/font
"
,
"
vue-apollo@^3
"
,
"
apollo-boost
"
,
"
graphql
"
,
]
merge_app_settings
(
"
YARN_INSTALLED_APPS
"
,
YARN_INSTALLED_APPS
,
True
)
...
...
@@ -627,7 +630,16 @@ ANY_JS = {
"
css_url
"
:
JS_URL
+
"
/vuetify/dist/vuetify.min.css
"
,
"
js_url
"
:
JS_URL
+
"
/vuetify/dist/vuetify.min.js
"
,
},
"
mdi-font
"
:
{
"
css_url
"
:
JS_URL
+
"
/@mdi/font/css/materialdesignicons.css
"
}
"
vue-apollo
"
:
{
"
js_url
"
:
JS_URL
+
"
/vue-apollo/dist/vue-apollo.min.js
"
,
},
"
apollo-boost
"
:
{
"
js_url
"
:
JS_URL
+
"
/apollo-boost/lib/bundle.cjs.js
"
,
},
"
graphql
"
:
{
"
js_url
"
:
JS_URL
+
"
/graphql/index.mjs
"
,
},
"
mdi-font
"
:
{
"
css_url
"
:
JS_URL
+
"
/@mdi/font/css/materialdesignicons.css
"
},
}
merge_app_settings
(
"
ANY_JS
"
,
ANY_JS
,
True
)
...
...
This diff is collapsed.
Click to expand it.
aleksis/core/static/js/vue/app.js
+
12
−
0
View file @
5484072f
...
...
@@ -38,6 +38,10 @@ const vuetify = new Vuetify({
}
})
const
apolloClient
=
new
ApolloClient
({
uri
:
JSON
.
parse
(
document
.
getElementById
(
"
graphql-url
"
).
textContent
)
})
import
CacheNotification
from
"
./components/core/CacheNotification.js
"
;
import
LanguageForm
from
"
./components/core/LanguageForm.js
"
;
...
...
@@ -49,6 +53,8 @@ Vue.component(MessageBox.name, MessageBox); // Load MessageBox globally as other
const
app
=
new
Vue
({
el
:
'
#app
'
,
apolloProvider
,
render
:
h
=>
h
(
App
),
vuetify
:
vuetify
,
// delimiters: ["<%","%>"] // FIXME: discuss new delimiters, [[ <% [{ {[ <[ (( …
data
:
()
=>
({
...
...
@@ -65,3 +71,9 @@ const app = new Vue({
"
sidenav-search
"
:
SidenavSearch
,
},
})
Vue
.
use
(
VueApollo
)
const
apolloProvider
=
new
VueApollo
({
defaultClient
:
apolloClient
,
})
This diff is collapsed.
Click to expand it.
aleksis/core/templates/core/vue_base.html
+
9
−
3
View file @
5484072f
{# -*- engine:django -*- #}
{% load i18n menu_generator static sass_tags any_js rules %}
{% load i18n menu_generator static sass_tags any_js rules
html_helpers
%}
{% get_current_language as LANGUAGE_CODE %}
{% get_available_languages as LANGUAGES %}
...
...
@@ -169,13 +169,13 @@
</v-container>
</v-main>
<v-footer
app
absolute
inset
color=
"primary"
class=
"white--text"
>
<v-footer
app
absolute
inset
class=
"white--text"
>
<v-container>
<v-row>
<v-col
cols=
"12"
lg=
"6"
>
{% include "core/partials/vue_footer_menu.html" %}
</v-col>
<v-col
cols=
"12"
class=
"text-white-darken-1"
>
<v-col
cols=
"12"
>
<v-row>
<v-btn
plain
rounded
href=
"{% url "
about_aleksis
"
%}"
color=
"white"
>
{% trans "About AlekSIS® — The Free School Information System" %}
...
...
@@ -208,9 +208,15 @@
{#{% include_js "materialize" %}#}
{% include_js "vue" %}
{% include_js "vuetify" %}
<script
type=
"module"
src=
"{% static 'apollo-boost/lib/bundle.esm.js' %}"
></script>
<script
type=
"module"
src=
"{% static 'vue-apollo/dist/vue-apollo.esm.js' %}"
></script>
<script
type=
"module"
src=
"{% static 'graphql-tag/lib/index.js' %}"
></script>
<script
type=
"module"
src=
"{% static 'graphql/index.mjs' %}"
></script>
{% include_js "sortablejs" %}
{# Fixme: das muss weg ↓ #}
{% include_js "jquery-sortablejs" %}
{% absolute_url "graphql" as GRAPHQL_URL %}
{{ GRAPHQL_URL|json_script:"graphql-url" }}
{{ request.user.person.preferences.theme__design|json_script:"design-mode" }}
{{ request.site.preferences.theme__primary|json_script:"primary-color" }}
{{ request.site.preferences.theme__secondary|json_script:"secondary-color" }}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment