mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-04-09 16:03:06 +00:00
refactor: migrate to material symbols icon set
This commit is contained in:
@@ -58,6 +58,7 @@ lint:
|
||||
unit:
|
||||
stage: test
|
||||
script:
|
||||
- npm run check-icons
|
||||
- npm run test -- --watch=false --no-progress --code-coverage
|
||||
artifacts:
|
||||
paths:
|
||||
|
||||
@@ -44,6 +44,7 @@ RUN apt-get update && \
|
||||
gradle \
|
||||
ca-certificates-java \
|
||||
python \
|
||||
python3-pip \
|
||||
software-properties-common \
|
||||
ssh \
|
||||
unzip \
|
||||
|
||||
74
ICONS.md
Normal file
74
ICONS.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Icons
|
||||
|
||||
A few notes to our icon set, for users and future maintainers.
|
||||
|
||||
## Usage
|
||||
|
||||
To find icon names, visit the
|
||||
[Google Material Symbols Page](https://fonts.google.com/icons?icon.style=Rounded)
|
||||
|
||||
We have extended the `ion-icon` element via a directive. **Make sure your
|
||||
module imports the `IonIconModule`**, you can then proceed using `ion-icon`s
|
||||
as usual.
|
||||
|
||||
The modified `ion-icon` comes with a few extra features:
|
||||
|
||||
* `[fill]` controls the fill color of the icon.
|
||||
* `[weight]` controls the font weight of the icon.
|
||||
* `[size]` controls the font size of the icon.
|
||||
* `[grade]` controls the font grade of the icon.
|
||||
|
||||
All of these attributes are animated as described
|
||||
[here](https://developers.google.com/fonts/docs/material_symbols).
|
||||
|
||||

|
||||
|
||||
You can also control these attributes via css:
|
||||
|
||||
```scss
|
||||
ion-icon ::ng-deep stapps-icon {
|
||||
--fill: 1;
|
||||
--grade: 0;
|
||||
--weight: 400;
|
||||
}
|
||||
```
|
||||
|
||||
Sometimes icon code points cannot be determined automatically, for whatever
|
||||
reason. In this case, you will need to specify the code point manually in
|
||||
the config file.
|
||||
|
||||
### Icon Font Minification
|
||||
|
||||
Icon font minification is done automatically, but requires you to
|
||||
follow a few simple rules:
|
||||
|
||||
1. Use the tagged template literal for referencing icon names in
|
||||
TypeScript files and code
|
||||
```ts
|
||||
SCIcon`icon_name`
|
||||
```
|
||||
2. When using `ion-icon` in HTML, reference either icons that went through
|
||||
the `SCIcon` tag or write them as one of the following:
|
||||
```html
|
||||
<!-- do -->
|
||||
<ion-icon name="icon_name"></ion-icon>
|
||||
<ion-icon [name]="'icon_name'"></ion-icon>
|
||||
<!-- don't -->
|
||||
<ion-icon name="icon_name"/> <!-- self-closing -->
|
||||
<ion-icon [name]="condition ? 'icon_name' : 'other_icon_name'"></ion-icon>
|
||||
```
|
||||
|
||||
Icons that are unknown at compile time can be specified in the
|
||||
`additionalIcons` property of the `icons.config.ts` file.
|
||||
|
||||
The minification can then be done by running
|
||||
```shell
|
||||
npm run minify-icons
|
||||
```
|
||||
|
||||
Unfortunately, I was unable to find a JS package that could to the job,
|
||||
and had to rely on the Python module [fonttools](https://github.com/fonttools/fonttools).
|
||||
|
||||
That means that you might run into additional issues when running the
|
||||
above-mentioned command.
|
||||
|
||||
25
angular.json
25
angular.json
@@ -25,30 +25,10 @@
|
||||
"input": "src/assets",
|
||||
"output": "assets"
|
||||
},
|
||||
{
|
||||
"glob": "**/*.svg",
|
||||
"input": "node_modules/ionicons/dist/ionicons/svg",
|
||||
"output": "./svg"
|
||||
},
|
||||
{
|
||||
"glob": "**/*.svg",
|
||||
"input": "src/assets/custom-ionicons",
|
||||
"output": "./svg"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "./node_modules/leaflet/dist/images",
|
||||
"output": "assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*.svg",
|
||||
"input": "src/assets/custom-ion-icons",
|
||||
"output": "./svg"
|
||||
},
|
||||
{
|
||||
"glob": "**/*.svg",
|
||||
"input": "src/assets/tabler-icons",
|
||||
"output": "./svg"
|
||||
}
|
||||
],
|
||||
"styles": [
|
||||
@@ -159,11 +139,6 @@
|
||||
"glob": "**/*",
|
||||
"input": "./node_modules/leaflet/dist/images",
|
||||
"output": "assets/"
|
||||
},
|
||||
{
|
||||
"glob": "**/*.svg",
|
||||
"input": "src/assets/tabler-icons",
|
||||
"output": "./svg"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
46
icons.config.ts
Normal file
46
icons.config.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import type {IconConfig} from './scripts/icon-config';
|
||||
|
||||
const config: IconConfig = {
|
||||
inputPath: 'node_modules/material-symbols/material-symbols-rounded.woff2',
|
||||
outputPath: 'src/assets/icons.min.woff2',
|
||||
htmlGlob: 'src/**/*.html',
|
||||
scriptGlob: 'src/**/*.ts',
|
||||
additionalIcons: {
|
||||
about: ['copyright', 'campaign', 'policy', 'description', 'text_snippet'],
|
||||
navigation: [
|
||||
'home',
|
||||
'newspaper',
|
||||
'search',
|
||||
'calendar_month',
|
||||
'local_cafe',
|
||||
'local_library',
|
||||
'inventory_2',
|
||||
'map',
|
||||
'grade',
|
||||
'account_circle',
|
||||
'settings',
|
||||
'info',
|
||||
'rate_review',
|
||||
],
|
||||
},
|
||||
codePoints: {
|
||||
ios_share: 'e6b8',
|
||||
fact_check: 'f0c5',
|
||||
},
|
||||
};
|
||||
|
||||
export default config;
|
||||
23808
package-lock.json
generated
23808
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,8 @@
|
||||
"documentation": "compodoc -p tsconfig.json -d docs",
|
||||
"e2e": "ng e2e",
|
||||
"licenses": "license-checker --json > src/assets/about/licenses.json && ts-node ./scripts/accumulate-licenses.ts",
|
||||
"minify-icons": "ts-node scripts/minify-icon-font.ts",
|
||||
"check-icons": "ts-node scripts/check-icon-correctness.ts",
|
||||
"lint": "ng lint",
|
||||
"lint:fix": "eslint --fix -c .eslintrc.json --ignore-path .eslintignore --ext .ts,.html src/",
|
||||
"ng": "ng",
|
||||
@@ -97,6 +99,7 @@
|
||||
"jsonpath-plus": "6.0.1",
|
||||
"leaflet": "1.8.0",
|
||||
"leaflet.markercluster": "1.5.3",
|
||||
"material-symbols": "0.2.8",
|
||||
"moment": "2.29.3",
|
||||
"ngx-logger": "4.3.3",
|
||||
"ngx-markdown": "13.1.0",
|
||||
@@ -128,6 +131,8 @@
|
||||
"@cypress/schematic": "1.7.0",
|
||||
"@ionic/angular-toolkit": "6.1.0",
|
||||
"@ionic/cli": "6.19.1",
|
||||
"@types/fontkit": "1.8.0",
|
||||
"@types/glob": "7.2.0",
|
||||
"@types/jasmine": "4.0.3",
|
||||
"@types/jasminewd2": "2.0.10",
|
||||
"@types/jsonpath": "0.2.0",
|
||||
@@ -144,6 +149,8 @@
|
||||
"eslint-plugin-jsdoc": "39.3.2",
|
||||
"eslint-plugin-prettier": "4.0.0",
|
||||
"eslint-plugin-unicorn": "42.0.0",
|
||||
"fontkit": "2.0.2",
|
||||
"glob": "8.0.3",
|
||||
"is-docker": "2.2.1",
|
||||
"jasmine-core": "4.1.1",
|
||||
"jasmine-spec-reporter": "7.0.0",
|
||||
|
||||
BIN
readme-resources/fill-axis.gif
Normal file
BIN
readme-resources/fill-axis.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
73
scripts/check-icon-correctness.ts
Normal file
73
scripts/check-icon-correctness.ts
Normal file
@@ -0,0 +1,73 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import fontkit, {Font} from 'fontkit';
|
||||
import config from '../icons.config';
|
||||
import {existsSync} from 'fs';
|
||||
import {getUsedIconsHtml, getUsedIconsTS} from './gather-used-icons';
|
||||
|
||||
const commandName = '"npm run minify-icons"';
|
||||
const originalFont = fontkit.openSync(config.inputPath);
|
||||
if (!existsSync(config.outputPath)) {
|
||||
console.error(`Minified font not found. Run ${commandName} first.`);
|
||||
process.exit(-1);
|
||||
}
|
||||
const modifiedFont = fontkit.openSync(config.outputPath);
|
||||
|
||||
let success = true;
|
||||
|
||||
checkAll().then(() => {
|
||||
console.log();
|
||||
if (success) {
|
||||
console.log('All icons are present in both fonts.');
|
||||
} else {
|
||||
console.error('Errors occurred.');
|
||||
process.exit(-1);
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function checkAll() {
|
||||
check(config.additionalIcons || {});
|
||||
check(await getUsedIconsTS(config.scriptGlob));
|
||||
check(await getUsedIconsHtml(config.htmlGlob));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function check(icons: Record<string, string[]>) {
|
||||
for (const [purpose, iconSet] of Object.entries(icons)) {
|
||||
for (const icon of iconSet) {
|
||||
if (!hasIcon(originalFont, icon)) {
|
||||
success = false;
|
||||
console.error(`${purpose}: ${icon} does not exist. Typo?`);
|
||||
} else if (!hasIcon(modifiedFont, icon)) {
|
||||
success = false;
|
||||
console.error(
|
||||
`${purpose}: ${icon} not found in minified font. Run ${commandName} to regenerate it.`,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
function hasIcon(font: Font, icon: string) {
|
||||
return font.layout(icon).glyphs.some(it => it.isLigature);
|
||||
}
|
||||
62
scripts/gather-used-icons.ts
Normal file
62
scripts/gather-used-icons.ts
Normal file
@@ -0,0 +1,62 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import glob from 'glob';
|
||||
import {readFileSync} from 'fs';
|
||||
import {
|
||||
matchPropertyContent,
|
||||
matchTagProperties,
|
||||
} from '../src/app/util/ion-icon/icon-match';
|
||||
|
||||
const globPromise = (pattern: string) =>
|
||||
new Promise<string[]>((resolve, reject) =>
|
||||
glob(pattern, (error, files) => (error ? reject(error) : resolve(files))),
|
||||
);
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export async function getUsedIconsHtml(
|
||||
glob = 'src/**/*.html',
|
||||
): Promise<Record<string, string[]>> {
|
||||
return Object.fromEntries(
|
||||
(await globPromise(glob))
|
||||
.map(file => [
|
||||
file,
|
||||
(readFileSync(file, 'utf8')
|
||||
.match(matchTagProperties('ion-icon'))
|
||||
?.flatMap(match => {
|
||||
return match.match(matchPropertyContent(['name', 'md', 'ios']));
|
||||
})
|
||||
.filter(it => !!it) as string[]) || [],
|
||||
])
|
||||
.filter(([, values]) => values.length > 0),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export async function getUsedIconsTS(
|
||||
glob = 'src/**/*.ts',
|
||||
): Promise<Record<string, string[]>> {
|
||||
return Object.fromEntries(
|
||||
(await globPromise(glob))
|
||||
.map(file => [
|
||||
file,
|
||||
readFileSync(file, 'utf8').match(/(?<=Icon`)[\w-]+(?=`)/g) || [],
|
||||
])
|
||||
.filter(([, values]) => values.length > 0),
|
||||
);
|
||||
}
|
||||
23
scripts/icon-config.ts
Normal file
23
scripts/icon-config.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface IconConfig {
|
||||
scriptGlob?: string;
|
||||
htmlGlob?: string;
|
||||
inputPath: string;
|
||||
outputPath: string;
|
||||
additionalIcons?: {[purpose: string]: string[]};
|
||||
codePoints?: {[name: string]: string};
|
||||
}
|
||||
140
scripts/minify-icon-font.ts
Normal file
140
scripts/minify-icon-font.ts
Normal file
@@ -0,0 +1,140 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
import fontkit from 'fontkit';
|
||||
import {exec} from 'child_process';
|
||||
import config from '../icons.config';
|
||||
import {statSync} from 'fs';
|
||||
import {getUsedIconsHtml, getUsedIconsTS} from './gather-used-icons';
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function run(command: string[] | string): Promise<string> {
|
||||
const fullCommand = Array.isArray(command) ? command.join(' ') : command;
|
||||
console.log(`>> ${fullCommand}`);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
exec(fullCommand, (error, stdout, stderr) => {
|
||||
if (error) {
|
||||
reject(error);
|
||||
} else if (stderr) {
|
||||
reject(stderr);
|
||||
} else {
|
||||
resolve(stdout.trim());
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
async function minifyIconFont() {
|
||||
const icons = new Set<string>();
|
||||
|
||||
for (const iconSet of [
|
||||
...Object.values(config.additionalIcons || []),
|
||||
...Object.values(await getUsedIconsTS(config.scriptGlob)),
|
||||
...Object.values(await getUsedIconsHtml(config.htmlGlob)),
|
||||
]) {
|
||||
for (const icon of iconSet) {
|
||||
icons.add(icon);
|
||||
}
|
||||
}
|
||||
|
||||
const font = fontkit.openSync(config.inputPath);
|
||||
|
||||
const glyphs: string[] = ['5f-7a', '30-39'];
|
||||
for (const icon of icons) {
|
||||
const iconGlyphs = font.layout(icon).glyphs;
|
||||
if (iconGlyphs.length === 0) {
|
||||
console.error(`${icon} not found in font. Typo?`);
|
||||
process.exit(-1);
|
||||
}
|
||||
|
||||
const codePoints = iconGlyphs
|
||||
.flatMap(it => font.stringsForGlyph(it.id))
|
||||
.flatMap(it => [...it])
|
||||
.map(it => it.codePointAt(0)!.toString(16));
|
||||
|
||||
if (codePoints.length === 0) {
|
||||
if (config.codePoints?.[icon]) {
|
||||
glyphs.push(config.codePoints[icon]);
|
||||
} else {
|
||||
console.log();
|
||||
console.error(
|
||||
`${icon} code point could not be determined. Add it to config.codePoints.`,
|
||||
);
|
||||
process.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
glyphs.push(...codePoints);
|
||||
}
|
||||
|
||||
const pythonPath = `"${await run('npm config get python')}"`;
|
||||
console.log(`Using python from npm config ${pythonPath}`);
|
||||
console.log(await run(`${pythonPath} --version`));
|
||||
console.log(
|
||||
await run([
|
||||
pythonPath,
|
||||
'-m',
|
||||
'pip',
|
||||
'install',
|
||||
'fonttools[ufo,lxml,unicode,woff]',
|
||||
]),
|
||||
);
|
||||
|
||||
console.log(
|
||||
await run([
|
||||
pythonPath,
|
||||
'-m fontTools.subset',
|
||||
`"${config.inputPath}"`,
|
||||
`--unicodes=${glyphs.join(',')}`,
|
||||
'--no-layout-closure',
|
||||
`--output-file="${config.outputPath}"`,
|
||||
'--flavor=woff2',
|
||||
]),
|
||||
);
|
||||
|
||||
console.log(`${glyphs.length} Used Icons Total`);
|
||||
console.log(`Minified font saved to ${config.outputPath}`);
|
||||
const result = statSync(config.outputPath).size;
|
||||
const before = statSync(config.inputPath).size;
|
||||
|
||||
console.log(
|
||||
`${toByteUnit(before)} > ${toByteUnit(result)} (${(
|
||||
((before - result) / before) *
|
||||
100
|
||||
).toFixed(2)}% Reduction)`,
|
||||
);
|
||||
}
|
||||
|
||||
minifyIconFont();
|
||||
|
||||
/**
|
||||
* Bytes to respective units
|
||||
*/
|
||||
function toByteUnit(value: number): string {
|
||||
if (value < 1024) {
|
||||
return `${value}B`;
|
||||
} else if (value < 1024 * 1024) {
|
||||
return `${(value / 1024).toFixed(2)}KB`;
|
||||
} else {
|
||||
return `${(value / 1024 / 1024).toFixed(2)}MB`;
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
{
|
||||
"extends": "../node_modules/@openstapps/configuration/tsconfig.json"
|
||||
"extends": "../node_modules/@openstapps/configuration/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"lib": ["es2019"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ import {RoutingStackService} from './util/routing-stack.service';
|
||||
import {SCSettingValue} from '@openstapps/core';
|
||||
import {DefaultAuthService} from './modules/auth/default-auth.service';
|
||||
import {PAIAAuthService} from './modules/auth/paia/paia-auth.service';
|
||||
import {IonIconModule} from './util/ion-icon/ion-icon.module';
|
||||
|
||||
registerLocaleData(localeDe);
|
||||
|
||||
@@ -161,6 +162,7 @@ export function createTranslateLoader(http: HttpClient) {
|
||||
DataModule,
|
||||
HebisModule,
|
||||
IonicModule.forRoot(),
|
||||
IonIconModule,
|
||||
FavoritesModule,
|
||||
LibraryModule,
|
||||
HttpClientModule,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<!--
|
||||
~ Copyright (C) 2021 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
@@ -36,7 +36,12 @@
|
||||
<ion-card-header>
|
||||
<ion-card-title>
|
||||
{{ license.name }}
|
||||
<ion-icon class="supertext-icon" name="external-link"></ion-icon>
|
||||
<ion-icon
|
||||
size="16"
|
||||
weight="300"
|
||||
class="supertext-icon"
|
||||
name="open_in_browser"
|
||||
></ion-icon>
|
||||
</ion-card-title>
|
||||
|
||||
<ion-card-subtitle *ngIf="license.authors || license.publisher">
|
||||
@@ -45,7 +50,7 @@
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip (click)="$event.preventDefault(); viewLicense(license)">
|
||||
<ion-icon name="file"></ion-icon>
|
||||
<ion-icon name="copyright"></ion-icon>
|
||||
<ion-label>{{ license.licenses }} License</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*!
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
cdk-virtual-scroll-viewport {
|
||||
@@ -30,6 +30,5 @@ cdk-virtual-scroll-viewport {
|
||||
|
||||
.supertext-icon {
|
||||
vertical-align: text-top;
|
||||
font-size: 60%;
|
||||
padding-left: 4px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {RouterModule, Routes} from '@angular/router';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -29,6 +29,7 @@ import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {AboutLicenseModalComponent} from './about-license-modal.component';
|
||||
import {AboutChangelogComponent} from './about-changelog.component';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const settingsRoutes: Routes = [
|
||||
{path: 'about', component: AboutPageComponent},
|
||||
@@ -52,6 +53,7 @@ const settingsRoutes: Routes = [
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forChild(),
|
||||
|
||||
@@ -35,6 +35,7 @@ import {AssessmentsProvider} from './assessments.provider';
|
||||
import {AssessmentsSimpleDataListComponent} from './list/assessments-simple-data-list.component';
|
||||
import {ProtectedRoutes} from '../auth/protected.routes';
|
||||
import {AssessmentsTreeListComponent} from './list/assessments-tree-list.component';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const routes: ProtectedRoutes = [
|
||||
{
|
||||
@@ -67,6 +68,7 @@ const routes: ProtectedRoutes = [
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonIconModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
TranslateModule,
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<ion-item-divider>
|
||||
<ion-label>{{ event.title }}</ion-label>
|
||||
<ion-note slot="start" *ngIf="event.events.length > 1">
|
||||
<ion-icon name="alert-triangle"></ion-icon>
|
||||
<ion-icon name="insert_page_break"></ion-icon>
|
||||
</ion-note>
|
||||
</ion-item-divider>
|
||||
<ion-item *ngFor="let iCalEvent of event.events">
|
||||
@@ -44,7 +44,7 @@
|
||||
{{ iCalEvent.rrule.interval }}
|
||||
{{ iCalEvent.rrule.freq | sentencecase }}
|
||||
</ion-note>
|
||||
<ion-icon *ngIf="iCalEvent.rrule" name="repeat"></ion-icon>
|
||||
<ion-icon *ngIf="iCalEvent.rrule" name="event_repeat"></ion-icon>
|
||||
</ion-item>
|
||||
</ion-item-group>
|
||||
</ion-list>
|
||||
@@ -61,7 +61,7 @@
|
||||
<div class="horizontal-flex">
|
||||
<ion-button fill="clear" (click)="export()">
|
||||
{{ 'share' | translate }}
|
||||
<ion-icon slot="end" name="share"></ion-icon>
|
||||
<ion-icon slot="end" md="share" ios="ios_share"></ion-icon>
|
||||
</ion-button>
|
||||
<ion-button
|
||||
fill="outline"
|
||||
@@ -74,7 +74,7 @@
|
||||
<ng-template #exportButton>
|
||||
<ion-button fill="outline" (click)="toCalendar()">
|
||||
{{ 'schedule.toCalendar.reviewModal.EXPORT' | translate }}
|
||||
<ion-icon slot="end" name="calendar"></ion-icon>
|
||||
<ion-icon slot="end" name="event_upcoming"></ion-icon>
|
||||
</ion-button>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
@@ -25,6 +25,7 @@ import {FormsModule} from '@angular/forms';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {MomentModule} from 'ngx-moment';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
@NgModule({
|
||||
declarations: [AddEventReviewModalComponent],
|
||||
@@ -32,6 +33,7 @@ import {UtilModule} from '../../util/util.module';
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forChild(),
|
||||
ThingTranslateModule.forChild(),
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
CommonModule,
|
||||
MomentModule,
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -23,6 +23,7 @@ import {DataModule} from '../data/data.module';
|
||||
import {SettingsProvider} from '../settings/settings.provider';
|
||||
import {CatalogComponent} from './catalog.component';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const catalogRoutes: Routes = [
|
||||
{path: 'catalog', component: CatalogComponent},
|
||||
@@ -39,6 +40,7 @@ const catalogRoutes: Routes = [
|
||||
FormsModule,
|
||||
TranslateModule.forChild(),
|
||||
RouterModule.forChild(catalogRoutes),
|
||||
IonIconModule,
|
||||
CommonModule,
|
||||
MomentModule,
|
||||
DataModule,
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
<div class="schedule">
|
||||
<a [routerLink]="['/schedule/recurring']">
|
||||
<ion-icon name="layout-grid"></ion-icon>
|
||||
<ion-icon size="40" weight="300" name="grid_view"></ion-icon>
|
||||
<ion-label>{{ 'schedule.recurring' | translate }}</ion-label>
|
||||
</a>
|
||||
<a
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../../../theme/util/mixins';
|
||||
|
||||
:host ion-toolbar:last-of-type {
|
||||
@@ -111,14 +126,16 @@ ion-content {
|
||||
|
||||
ion-icon {
|
||||
margin: auto auto var(--spacing-xs);
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
}
|
||||
ion-label {
|
||||
margin: 0 auto auto;
|
||||
font-size: var(--font-size-xxs);
|
||||
font-weight: var(--font-weight-semi-bold);
|
||||
}
|
||||
|
||||
&:hover ::ng-deep stapps-icon {
|
||||
--fill: 1;
|
||||
}
|
||||
}
|
||||
|
||||
a:last-child {
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -33,6 +33,7 @@ import {MensaSectionContentComponent} from './sections/mensa-section/mensa-secti
|
||||
import {FavoritesSectionComponent} from './sections/favorites-section/favorites-section.component';
|
||||
import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const catalogRoutes: Routes = [
|
||||
{
|
||||
@@ -58,6 +59,7 @@ const catalogRoutes: Routes = [
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(),
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
TranslateModule.forChild(),
|
||||
RouterModule.forChild(catalogRoutes),
|
||||
|
||||
@@ -1,8 +1,23 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header translucent>
|
||||
<ion-toolbar mode="ios">
|
||||
<ion-title>{{ 'modal.settings' | translate }}</ion-title>
|
||||
<ion-button fill="clear" slot="end" (click)="dismissModal()">
|
||||
<ion-icon name="x"></ion-icon>
|
||||
<ion-icon name="close"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-toolbar>
|
||||
</ion-header>
|
||||
|
||||
@@ -1,10 +1,32 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-label class="section-headline"
|
||||
>{{ title }}
|
||||
<ion-icon name="edit" *ngIf="isEditable" (click)="onEditClick()"></ion-icon>
|
||||
<ion-icon
|
||||
[name]="customIcon"
|
||||
size="25"
|
||||
class="icon-margin-right"
|
||||
*ngIf="isEditable"
|
||||
(click)="onEditClick()"
|
||||
name="edit_square"
|
||||
></ion-icon>
|
||||
<ion-icon
|
||||
size="25"
|
||||
*ngIf="customIcon"
|
||||
(click)="onEditClick()"
|
||||
[name]="customIcon"
|
||||
></ion-icon>
|
||||
</ion-label>
|
||||
<ng-content></ng-content>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
@import '../../../../theme/util/mixins';
|
||||
|
||||
:host {
|
||||
@@ -20,7 +35,7 @@
|
||||
|
||||
&.is-extended {
|
||||
padding-right: 0;
|
||||
ion-icon[name='edit'] {
|
||||
.icon-margin-right {
|
||||
margin-right: var(--spacing-md);
|
||||
}
|
||||
}
|
||||
@@ -45,11 +60,14 @@
|
||||
|
||||
ion-icon {
|
||||
color: var(--ion-color-medium-shade);
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
position: relative;
|
||||
bottom: var(--spacing-sm);
|
||||
margin-block: auto;
|
||||
cursor: pointer;
|
||||
|
||||
&:hover ::ng-deep stapps-icon {
|
||||
--fill: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {MenuItemInterface} from './menu-item.interface';
|
||||
import {SCIcon} from '../../../../util/ion-icon/icon';
|
||||
|
||||
export const MenuItems: MenuItemInterface[] = [
|
||||
{
|
||||
icon: 'book',
|
||||
icon: SCIcon`book`,
|
||||
label: 'dashboard.navigation.item.catalog',
|
||||
link: '/catalog',
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
icon: 'tools-kitchen',
|
||||
icon: SCIcon`local_cafe`,
|
||||
label: 'dashboard.navigation.item.canteen',
|
||||
link: '/canteen',
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
icon: 'map',
|
||||
icon: SCIcon`map`,
|
||||
label: 'dashboard.navigation.item.map',
|
||||
link: '/map',
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
icon: 'settings',
|
||||
icon: SCIcon`settings`,
|
||||
label: 'dashboard.navigation.item.settings',
|
||||
link: '/settings',
|
||||
active: true,
|
||||
},
|
||||
{
|
||||
icon: 'search',
|
||||
icon: SCIcon`search`,
|
||||
label: 'dashboard.navigation.item.search',
|
||||
link: '/search',
|
||||
active: false,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<stapps-section
|
||||
[title]="'dashboard.navigation.title' | translate"
|
||||
[isEditable]="true"
|
||||
@@ -11,7 +26,7 @@
|
||||
>
|
||||
<ng-template swiperSlide *ngFor="let menuItem of activeMenuItems">
|
||||
<a [routerLink]="menuItem.link" class="card">
|
||||
<ion-icon [name]="menuItem.icon"></ion-icon>
|
||||
<ion-icon size="40" [name]="menuItem.icon"></ion-icon>
|
||||
<ion-label>{{ menuItem.label | translate }}</ion-label>
|
||||
</a>
|
||||
</ng-template>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.navigation-swiper.swiper {
|
||||
|
||||
.swiper-slide {
|
||||
@@ -13,8 +28,6 @@
|
||||
|
||||
ion-icon {
|
||||
display: block;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<stapps-section
|
||||
[title]="'dashboard.news.title' | translate"
|
||||
[isEditable]="false"
|
||||
[customIcon]="'news'"
|
||||
[customIcon]="'read_more'"
|
||||
class="is-editable"
|
||||
(onEdit)="onMoreNewsClicked()"
|
||||
>
|
||||
@@ -24,7 +39,7 @@
|
||||
'dashboard.news.moreNews' | translate | titlecase
|
||||
}}</ion-label>
|
||||
<ion-thumbnail class="ion-margin-end">
|
||||
<ion-icon color="dark" name="news"></ion-icon>
|
||||
<ion-icon color="dark" name="read_more" size="128"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
</a>
|
||||
</ng-template>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<stapps-section
|
||||
title="{{ 'dashboard.navigation.item.search' | translate }}"
|
||||
[isEditable]="false"
|
||||
@@ -11,6 +26,7 @@
|
||||
[(ngModel)]="searchTerm"
|
||||
></ion-input>
|
||||
<ion-icon
|
||||
size="25"
|
||||
name="search"
|
||||
(click)="onSubmitSearch()"
|
||||
class="clickable"
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
.searchbar {
|
||||
position: relative;
|
||||
max-width: 700px;
|
||||
@@ -18,7 +33,5 @@
|
||||
right: var(--spacing-md);
|
||||
transform: translateY(-50%);
|
||||
z-index: 2;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,13 +25,10 @@ import {
|
||||
chipSkeletonTransition,
|
||||
chipTransition,
|
||||
} from '../../../../animation/skeleton-transitions/chip-loading-transition';
|
||||
|
||||
enum AddEventStates {
|
||||
ADDED_ALL,
|
||||
ADDED_SOME,
|
||||
REMOVED_ALL,
|
||||
UNAVAILABLE,
|
||||
}
|
||||
import {
|
||||
AddEventStates,
|
||||
AddEventStatesMap,
|
||||
} from './add-event-action-chip.config';
|
||||
|
||||
/**
|
||||
* Shows a horizontal list of action chips
|
||||
@@ -58,6 +55,8 @@ export class AddEventActionChipComponent implements OnDestroy {
|
||||
*/
|
||||
icon: string;
|
||||
|
||||
iconFill: boolean;
|
||||
|
||||
/**
|
||||
* Label
|
||||
*/
|
||||
@@ -71,28 +70,7 @@ export class AddEventActionChipComponent implements OnDestroy {
|
||||
/**
|
||||
* States
|
||||
*/
|
||||
states = {
|
||||
[AddEventStates.ADDED_ALL]: {
|
||||
icon: 'events-all',
|
||||
label: 'data.chips.add_events.ADDED_ALL',
|
||||
disabled: false,
|
||||
},
|
||||
[AddEventStates.ADDED_SOME]: {
|
||||
icon: 'events-partial',
|
||||
label: 'data.chips.add_events.ADDED_SOME',
|
||||
disabled: false,
|
||||
},
|
||||
[AddEventStates.REMOVED_ALL]: {
|
||||
icon: 'events',
|
||||
label: 'data.chips.add_events.REMOVED_ALL',
|
||||
disabled: false,
|
||||
},
|
||||
[AddEventStates.UNAVAILABLE]: {
|
||||
icon: 'close',
|
||||
label: 'data.chips.add_events.UNAVAILABLE',
|
||||
disabled: true,
|
||||
},
|
||||
};
|
||||
states = AddEventStatesMap;
|
||||
|
||||
/**
|
||||
* UUIDs
|
||||
@@ -115,9 +93,10 @@ export class AddEventActionChipComponent implements OnDestroy {
|
||||
*/
|
||||
applyState(state: AddEventStates) {
|
||||
this.state = state;
|
||||
const {label, icon, disabled} = this.states[state];
|
||||
const {label, icon, disabled, fill} = this.states[state];
|
||||
this.label = label;
|
||||
this.icon = icon;
|
||||
this.iconFill = fill;
|
||||
this.disabled = disabled;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {SCIcon} from '../../../../util/ion-icon/icon';
|
||||
|
||||
export enum AddEventStates {
|
||||
ADDED_ALL,
|
||||
ADDED_SOME,
|
||||
REMOVED_ALL,
|
||||
UNAVAILABLE,
|
||||
}
|
||||
|
||||
export const AddEventStatesMap = {
|
||||
[AddEventStates.ADDED_ALL]: {
|
||||
icon: SCIcon`event_available`,
|
||||
fill: true,
|
||||
label: 'data.chips.add_events.ADDED_ALL',
|
||||
disabled: false,
|
||||
},
|
||||
[AddEventStates.ADDED_SOME]: {
|
||||
icon: SCIcon`event`,
|
||||
fill: true,
|
||||
label: 'data.chips.add_events.ADDED_SOME',
|
||||
disabled: false,
|
||||
},
|
||||
[AddEventStates.REMOVED_ALL]: {
|
||||
icon: SCIcon`calendar_today`,
|
||||
fill: false,
|
||||
label: 'data.chips.add_events.REMOVED_ALL',
|
||||
disabled: false,
|
||||
},
|
||||
[AddEventStates.UNAVAILABLE]: {
|
||||
icon: SCIcon`event_busy`,
|
||||
fill: false,
|
||||
label: 'data.chips.add_events.UNAVAILABLE',
|
||||
disabled: true,
|
||||
},
|
||||
};
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div class="stack-children">
|
||||
<ion-chip
|
||||
*ngIf="associatedDateSeries | async as associatedDateSeries; else loading"
|
||||
@@ -5,7 +20,7 @@
|
||||
[disabled]="disabled"
|
||||
(click)="$event.stopPropagation(); onClick($event)"
|
||||
>
|
||||
<ion-icon [name]="icon"></ion-icon>
|
||||
<ion-icon [name]="icon" [fill]="iconFill"></ion-icon>
|
||||
<ion-label>{{ label | translate }}</ion-label>
|
||||
</ion-chip>
|
||||
<ng-template #loading>
|
||||
|
||||
@@ -1,5 +1,20 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-chip class="chip-class" (click)="$event.stopPropagation(); onClick()">
|
||||
<ion-icon name="location"></ion-icon>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
<ion-label>{{ 'Locate' | translate }}</ion-label>
|
||||
<ng-template #loading>
|
||||
<ion-skeleton-text animated="true"></ion-skeleton-text>
|
||||
|
||||
@@ -1,7 +1,22 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-chip
|
||||
[attr.color]="active ? 'primary' : 'medium'"
|
||||
(click)="emitToggle(value)"
|
||||
>
|
||||
<ion-icon name="circle-check" *ngIf="active"></ion-icon>
|
||||
<ion-icon name="check_circle" *ngIf="active"></ion-icon>
|
||||
<ion-label>{{ displayValue }}</ion-label>
|
||||
</ion-chip>
|
||||
|
||||
48
src/app/modules/data/data-icon.config.ts
Normal file
48
src/app/modules/data/data-icon.config.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {SCThingType} from '@openstapps/core';
|
||||
import {SCIcon} from '../../util/ion-icon/icon';
|
||||
|
||||
export const DataIcons: Record<SCThingType, string> = {
|
||||
'academic event': SCIcon`school`,
|
||||
'assessment': SCIcon`fact_check`,
|
||||
'article': SCIcon`article`,
|
||||
'book': SCIcon`book`,
|
||||
'building': SCIcon`location_city`,
|
||||
'catalog': SCIcon`inventory_2`,
|
||||
'contact point': SCIcon`contact_page`,
|
||||
'course of study': SCIcon`school`,
|
||||
'date series': SCIcon`event`,
|
||||
'dish': SCIcon`lunch_dining`,
|
||||
'favorite': SCIcon`favorite`,
|
||||
'floor': SCIcon`foundation`,
|
||||
'message': SCIcon`newspaper`,
|
||||
'organization': SCIcon`business_center`,
|
||||
'periodical': SCIcon`feed`,
|
||||
'person': SCIcon`person`,
|
||||
'point of interest': SCIcon`pin_drop`,
|
||||
'publication event': SCIcon`campaign`,
|
||||
'room': SCIcon`meeting_room`,
|
||||
'semester': SCIcon`date_range`,
|
||||
'setting': SCIcon`settings`,
|
||||
'sport course': SCIcon`sports_soccer`,
|
||||
'study module': SCIcon`view_module`,
|
||||
'ticket': SCIcon`confirmation_number`,
|
||||
'todo': SCIcon`task`,
|
||||
'tour': SCIcon`tour`,
|
||||
'video': SCIcon`movie`,
|
||||
'diff': SCIcon`difference`,
|
||||
};
|
||||
@@ -1,19 +1,20 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {Pipe, PipeTransform} from '@angular/core';
|
||||
import {SCThingType} from '@openstapps/core';
|
||||
import {DataIcons} from './data-icon.config';
|
||||
|
||||
/**
|
||||
* Converts the data type text into the icon name
|
||||
@@ -25,40 +26,7 @@ export class DataIconPipe implements PipeTransform {
|
||||
/**
|
||||
* Mapping from data types to ionic icons to show
|
||||
*/
|
||||
typeIconMap: {[type in SCThingType]: string};
|
||||
|
||||
constructor() {
|
||||
this.typeIconMap = {
|
||||
'academic event': 'school',
|
||||
'assessment': 'file-text',
|
||||
'article': 'file',
|
||||
'book': 'book',
|
||||
'building': 'location',
|
||||
'catalog': 'folder',
|
||||
'contact point': 'phone',
|
||||
'course of study': 'school',
|
||||
'date series': 'calendar',
|
||||
'dish': 'tools-kitchen-2',
|
||||
'favorite': 'heart',
|
||||
'floor': 'arrow-up-circle',
|
||||
'message': 'news',
|
||||
'organization': 'briefcase',
|
||||
'periodical': 'news',
|
||||
'person': 'user',
|
||||
'point of interest': 'location',
|
||||
'publication event': 'speakerphone',
|
||||
'room': 'location',
|
||||
'semester': 'school',
|
||||
'setting': 'settings',
|
||||
'sport course': 'ball-football',
|
||||
'study module': 'school',
|
||||
'ticket': 'ticket',
|
||||
'todo': 'checkbox',
|
||||
'tour': 'lifebuoy',
|
||||
'video': 'video',
|
||||
'diff': 'arrows-left-right',
|
||||
};
|
||||
}
|
||||
typeIconMap = DataIcons;
|
||||
|
||||
/**
|
||||
* Provide the icon name from the data type
|
||||
|
||||
@@ -89,6 +89,7 @@ import {UtilModule} from '../../util/util.module';
|
||||
import {TreeListComponent} from './list/tree-list.component';
|
||||
import {TreeListFragmentComponent} from './list/tree-list-fragment.component';
|
||||
import {SettingsProvider} from '../settings/settings.provider';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
/**
|
||||
* Module for handling data
|
||||
@@ -160,6 +161,7 @@ import {SettingsProvider} from '../settings/settings.provider';
|
||||
LeafletModule,
|
||||
MarkdownModule.forRoot(),
|
||||
MenuModule,
|
||||
IonIconModule,
|
||||
MomentModule.forRoot({
|
||||
relativeTimeThresholdOptions: {
|
||||
m: 59,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header *ngIf="showModalHeader" translucent>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-title>{{ 'name' | thingTranslate: item }}</ion-title>
|
||||
@@ -85,7 +100,7 @@
|
||||
<ng-container *ngSwitchDefault>
|
||||
<ion-item class="ion-text-wrap" lines="inset">
|
||||
<ion-thumbnail slot="start" class="ion-margin-end">
|
||||
<ion-icon color="dark" [attr.name]="item.type | dataIcon"></ion-icon>
|
||||
<stapps-icon>{{ item.type | dataIcon }}</stapps-icon>
|
||||
</ion-thumbnail>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<div [ngSwitch]="true">
|
||||
<ng-container *ngSwitchCase="!item && (isDisconnected | async)">
|
||||
<div class="centeredMessageContainer">
|
||||
<ion-icon name="no-connection"></ion-icon>
|
||||
<ion-icon name="signal_disconnected"></ion-icon>
|
||||
<ion-label>
|
||||
{{ 'data.detail.COULD_NOT_CONNECT' | translate }}
|
||||
</ion-label>
|
||||
@@ -45,7 +45,7 @@
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="item === null">
|
||||
<div class="centeredMessageContainer">
|
||||
<ion-icon name="broken-link"></ion-icon>
|
||||
<ion-icon name="link_off"></ion-icon>
|
||||
<ion-label>
|
||||
{{ 'data.detail.NOT_FOUND' | translate }}
|
||||
</ion-label>
|
||||
|
||||
@@ -1,7 +1,23 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-button (click)="toggle($event)" color="medium" size="small" fill="clear">
|
||||
<ion-icon
|
||||
slot="icon-only"
|
||||
[name]="(isFavorite$ | async) ? 'star' : 'star-outline'"
|
||||
[ngClass]="{filled: (isFavorite$ | async)}"
|
||||
[fill]="isFavorite$ | async"
|
||||
[class.selected]="isFavorite$ | async"
|
||||
name="grade"
|
||||
></ion-icon>
|
||||
</ion-button>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
:host {
|
||||
ion-button {
|
||||
width: 50px;
|
||||
@@ -5,7 +20,13 @@
|
||||
--border-radius: 50%;
|
||||
}
|
||||
|
||||
ion-icon.filled {
|
||||
@media (hover: hover) {
|
||||
ion-button:hover ::ng-deep stapps-icon {
|
||||
--fill: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.selected {
|
||||
color: #FBC02D;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card>
|
||||
<ion-card-header>{{
|
||||
'data.detail.offers.TITLE' | translate | titlecase
|
||||
@@ -5,7 +20,7 @@
|
||||
<ion-card-content>
|
||||
<div *ngFor="let offer of offers">
|
||||
<p *ngIf="offer.inPlace">
|
||||
<ion-icon name="location"></ion-icon>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
<a [routerLink]="['/data-detail', offer.inPlace.uid]">{{
|
||||
'name' | thingTranslate: offer.inPlace
|
||||
}}</a
|
||||
@@ -17,7 +32,7 @@
|
||||
: offer.availabilityRange.gte
|
||||
"
|
||||
>
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
{{
|
||||
(offer.availabilityRange.gt
|
||||
? offer.availabilityRange.gt
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{{ price | currency: 'EUR':'symbol':undefined:'de' }}
|
||||
</h2>
|
||||
<p *ngIf="_offers[0].inPlace">
|
||||
<ion-icon name="location"></ion-icon>{{ _offers[0].inPlace.name
|
||||
<ion-icon name="pin_drop"></ion-icon>{{ _offers[0].inPlace.name
|
||||
}}<span *ngIf="_offers.length > 1">...</span>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {
|
||||
@@ -23,11 +23,12 @@ import {
|
||||
ViewChild,
|
||||
} from '@angular/core';
|
||||
import {SCThings} from '@openstapps/core';
|
||||
import {SCIcon} from '../../../util/ion-icon/icon';
|
||||
|
||||
enum AccordionButtonState {
|
||||
collapsed = 'chevron-down',
|
||||
expanded = 'chevron-up',
|
||||
}
|
||||
const AccordionButtonState = {
|
||||
collapsed: SCIcon`expand_more`,
|
||||
expanded: SCIcon`expand_less`,
|
||||
};
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-title-card',
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-item
|
||||
class="ion-text-wrap ion-margin"
|
||||
button="true"
|
||||
@@ -7,7 +22,7 @@
|
||||
>
|
||||
<div class="item-height-placeholder"></div>
|
||||
<ion-thumbnail slot="start" *ngIf="!hideThumbnail" class="ion-margin-end">
|
||||
<ion-icon color="dark" [attr.name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-icon color="dark" [name]="item.type | dataIcon" size="36"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
<ng-container *ngIf="contentTemplateRef; else defaultContent">
|
||||
<ion-label class="ion-text-wrap" [ngSwitch]="true">
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<stapps-context contentId="data-list"></stapps-context>
|
||||
<ion-header>
|
||||
<ion-toolbar color="primary" mode="ios" *ngIf="showDrawer">
|
||||
@@ -19,7 +34,7 @@
|
||||
class="filterable"
|
||||
>
|
||||
<ion-menu-button menu="context" auto-hide="false">
|
||||
<ion-icon name="adjustments"></ion-icon>
|
||||
<ion-icon name="tune"></ion-icon>
|
||||
</ion-menu-button>
|
||||
</ion-searchbar>
|
||||
</ion-toolbar>
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="item.inPlace">
|
||||
<ion-card-header>
|
||||
{{ 'inPlace' | propertyNameTranslate: item | titlecase }}
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-icon name="location"> </ion-icon>
|
||||
<ion-icon name="pin_drop"> </ion-icon>
|
||||
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{
|
||||
'name' | thingTranslate: item.inPlace
|
||||
}}</a>
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
||||
<p>
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
<span *ngIf="item.dates[0] && item.dates[item.dates.length - 1]">
|
||||
<span *ngIf="item.repeatFrequency">
|
||||
{{
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div *ngIf="!item.categories.includes('news'); else news">
|
||||
<stapps-simple-card
|
||||
[title]="'messageBody' | propertyNameTranslate: item | titlecase"
|
||||
@@ -45,7 +60,7 @@
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<a (click)="onLinkClick(item.sameAs)"
|
||||
>{{ item.name }}<ion-icon name="external-link"></ion-icon>
|
||||
>{{ item.name }}<ion-icon name="open_in_browser"></ion-icon>
|
||||
</a>
|
||||
</ion-card-content>
|
||||
</ion-card>
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="item.inPlace">
|
||||
<ion-card-header>
|
||||
{{ 'inPlace' | propertyNameTranslate: item | titlecase }}
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-icon name="location"></ion-icon>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{
|
||||
'name' | thingTranslate: item.inPlace
|
||||
}}</a>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
@@ -11,7 +26,7 @@
|
||||
</ion-col>
|
||||
<ion-col width-20 text-right *ngIf="item.inPlace">
|
||||
<span *ngIf="item.inPlace">
|
||||
<ion-icon name="location"></ion-icon>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
{{ 'name' | thingTranslate: item.inPlace }}
|
||||
</span>
|
||||
</ion-col>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<stapps-place-mensa-detail-content
|
||||
[item]="item"
|
||||
[openAsModal]="openAsModal"
|
||||
@@ -20,7 +35,7 @@
|
||||
{{ 'inPlace' | propertyNameTranslate: item | titlecase }}
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-icon name="location"></ion-icon>
|
||||
<ion-icon name="pin_drop"></ion-icon>
|
||||
<a [routerLink]="['/data-detail', item.inPlace.uid]">{{
|
||||
'name' | thingTranslate: item.inPlace
|
||||
}}</a>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
@@ -18,7 +33,7 @@
|
||||
}}
|
||||
</li>
|
||||
<li *ngIf="distance">
|
||||
<ion-icon name="walk"></ion-icon>
|
||||
<ion-icon name="directions_walk"></ion-icon>
|
||||
{{ distance | metersLocalized }}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -31,7 +46,7 @@
|
||||
{{ 'type' | thingTranslate: item }}
|
||||
</li>
|
||||
<li *ngIf="distance">
|
||||
<ion-icon name="walk"></ion-icon>
|
||||
<ion-icon name="directions_walk"></ion-icon>
|
||||
{{ distance | metersLocalized }}
|
||||
</li>
|
||||
</ul>
|
||||
@@ -45,7 +60,7 @@
|
||||
</ion-col>
|
||||
<div *ngIf="item.type !== 'building'">
|
||||
<ion-col width-20 text-right *ngIf="item.inPlace">
|
||||
<ion-icon name="location"></ion-icon
|
||||
<ion-icon name="pin_drop"></ion-icon
|
||||
>{{ 'name' | thingTranslate: item.inPlace }}
|
||||
</ion-col>
|
||||
</div>
|
||||
|
||||
@@ -1,10 +1,25 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
<ion-col>
|
||||
<div class="ion-text-wrap">
|
||||
<ion-label class="title">{{ 'name' | thingTranslate: item }}</ion-label>
|
||||
<p class="title-sub">
|
||||
<ion-icon name="calendar"></ion-icon>
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
<span
|
||||
>{{ item.startDate | dateFormat }} -
|
||||
{{ item.endDate | dateFormat }}</span
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
@@ -22,6 +22,7 @@ import {MenuModule} from '../menu/menu.module';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {DataModule} from '../data/data.module';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const favoritesRoutes: Routes = [
|
||||
{
|
||||
@@ -39,6 +40,7 @@ const favoritesRoutes: Routes = [
|
||||
MenuModule,
|
||||
TranslateModule,
|
||||
DataModule,
|
||||
IonIconModule,
|
||||
UtilModule,
|
||||
],
|
||||
declarations: [FavoritesPageComponent],
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
@@ -21,6 +21,7 @@ import {RouterModule, Routes} from '@angular/router';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {MarkdownModule} from 'ngx-markdown';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const feedbackRoutes: Routes = [
|
||||
{
|
||||
@@ -34,6 +35,7 @@ const feedbackRoutes: Routes = [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
IonIconModule,
|
||||
RouterModule.forChild(feedbackRoutes),
|
||||
TranslateModule,
|
||||
MarkdownModule,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div [ngSwitch]="item.type">
|
||||
<stapps-book-detail-content
|
||||
[item]="item"
|
||||
@@ -14,7 +29,7 @@
|
||||
<ng-container *ngSwitchDefault>
|
||||
<ion-item class="ion-text-wrap" lines="inset">
|
||||
<ion-thumbnail slot="start" class="ion-margin-end">
|
||||
<ion-icon color="dark" [attr.name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-icon color="dark" [name]="item.type | dataIcon"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
<ion-grid>
|
||||
<ion-row>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<div [ngSwitch]="true">
|
||||
<ng-container *ngSwitchCase="!item && (isDisconnected | async)">
|
||||
<div class="centeredMessageContainer">
|
||||
<ion-icon name="no-connection"></ion-icon>
|
||||
<ion-icon name="signal_disconnected"></ion-icon>
|
||||
<ion-label>
|
||||
{{ 'data.detail.COULD_NOT_CONNECT' | translate }}
|
||||
</ion-label>
|
||||
@@ -39,7 +39,7 @@
|
||||
</ng-container>
|
||||
<ng-container *ngSwitchCase="item === null">
|
||||
<div class="centeredMessageContainer">
|
||||
<ion-icon name="broken-link"></ion-icon>
|
||||
<ion-icon name="link_off"></ion-icon>
|
||||
<ion-label>
|
||||
{{ 'data.detail.NOT_FOUND' | translate }}
|
||||
</ion-label>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {CommonModule} from '@angular/common';
|
||||
@@ -43,6 +43,7 @@ import {HebisArticleContentComponent} from './types/hebis-article/hebis-article-
|
||||
import {DataListComponent} from '../data/list/data-list.component';
|
||||
import {DaiaAvailabilityComponent} from './daia-availability/daia-availability.component';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
/**
|
||||
* Module for handling data
|
||||
@@ -66,6 +67,7 @@ import {UtilModule} from '../../util/util.module';
|
||||
DataModule,
|
||||
FormsModule,
|
||||
HebisRoutingModule,
|
||||
IonIconModule,
|
||||
HttpClientModule,
|
||||
IonicModule.forRoot(),
|
||||
MarkdownModule.forRoot(),
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header>{{
|
||||
'hebisSearch.detail.title' | translate | sentencecase
|
||||
@@ -81,8 +96,8 @@
|
||||
'categories' | propertyNameTranslate: item | sentencecase
|
||||
}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip [attr.color]="'primary'">
|
||||
<ion-icon [attr.name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-chip [color]="'primary'">
|
||||
<ion-icon [name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header>{{
|
||||
'hebisSearch.detail.title' | translate | sentencecase
|
||||
@@ -82,8 +97,8 @@
|
||||
'categories' | propertyNameTranslate: item | sentencecase
|
||||
}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip [attr.color]="'primary'">
|
||||
<ion-icon [attr.name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-chip [color]="'primary'">
|
||||
<ion-icon [name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card *ngIf="item.sameAs">
|
||||
<ion-card-header>{{
|
||||
'hebisSearch.detail.title' | translate | sentencecase
|
||||
@@ -68,8 +83,8 @@
|
||||
'categories' | propertyNameTranslate: item | sentencecase
|
||||
}}</ion-card-header>
|
||||
<ion-card-content>
|
||||
<ion-chip [attr.color]="'primary'">
|
||||
<ion-icon [attr.name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-chip [color]="'primary'">
|
||||
<ion-icon [name]="item.type | dataIcon"></ion-icon>
|
||||
<ion-label>{{ 'categories' | thingTranslate: item }}</ion-label>
|
||||
</ion-chip>
|
||||
</ion-card-content>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-buttons slot="start">
|
||||
@@ -17,11 +32,11 @@
|
||||
<p><ion-skeleton-text animated style="width: 80%"></ion-skeleton-text></p>
|
||||
</ng-template>
|
||||
<ion-item [routerLink]="['profile']">
|
||||
<ion-icon name="user" slot="start"></ion-icon
|
||||
<ion-icon name="account_circle" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.profile.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
<ion-item [routerLink]="['holds-and-reservations']">
|
||||
<ion-icon name="books" slot="start"></ion-icon
|
||||
<ion-icon name="collections_bookmark" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.holds.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
<ion-item [routerLink]="['checked-out']">
|
||||
@@ -29,7 +44,7 @@
|
||||
>{{ 'library.account.pages.checked_out.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
<ion-item [routerLink]="['fines']">
|
||||
<ion-icon name="cash" slot="start"></ion-icon
|
||||
<ion-icon name="request_quote" slot="start"></ion-icon
|
||||
>{{ 'library.account.pages.fines.title' | translate | titlecase }}
|
||||
</ion-item>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
@@ -17,6 +32,7 @@ import {MomentModule} from 'ngx-moment';
|
||||
import {FeeItemComponent} from './account/elements/fee-item/fee-item.component';
|
||||
import {DataModule} from '../data/data.module';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const routes: ProtectedRoutes | Routes = [
|
||||
{
|
||||
@@ -56,6 +72,7 @@ const routes: ProtectedRoutes | Routes = [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonicModule,
|
||||
IonIconModule,
|
||||
RouterModule.forChild(routes),
|
||||
TranslateModule,
|
||||
MomentModule,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card class="compact">
|
||||
<ion-card-header>
|
||||
<stapps-data-list-item
|
||||
@@ -22,7 +37,7 @@
|
||||
class="close"
|
||||
(click)="onCloseClick()"
|
||||
>
|
||||
<ion-icon name="circle-x"></ion-icon>
|
||||
<ion-icon name="cancel" fill></ion-icon>
|
||||
</ion-button>
|
||||
</ion-card-header>
|
||||
<ion-card-content>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
@@ -34,6 +34,7 @@ import {MapSingleModalComponent} from './page/modals/map-single-modal.component'
|
||||
import {MapItemComponent} from './item/map-item.component';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
/**
|
||||
* Initializes the default area to show in advance (before components are initialized)
|
||||
@@ -72,6 +73,7 @@ const mapRoutes: Routes = [
|
||||
CommonModule,
|
||||
IonicModule.forRoot(),
|
||||
LeafletModule,
|
||||
IonIconModule,
|
||||
LeafletMarkerClusterModule,
|
||||
RouterModule.forChild(mapRoutes),
|
||||
TranslateModule.forChild(),
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {ElementRef, Injectable} from '@angular/core';
|
||||
import {
|
||||
@@ -27,6 +27,7 @@ import {DataProvider} from '../data/data.provider';
|
||||
import {MapPosition, PositionService} from './position.service';
|
||||
import {hasValidLocation} from '../data/types/place/place-types';
|
||||
import {ConfigProvider} from '../config/config.provider';
|
||||
import {SCIcon} from '../../util/ion-icon/icon';
|
||||
|
||||
/**
|
||||
* Provides methods for presenting the map
|
||||
@@ -73,10 +74,19 @@ export class MapProvider {
|
||||
className: className,
|
||||
html:
|
||||
typeof position.heading !== 'undefined'
|
||||
? `<ion-icon name="navigate-straight"
|
||||
style="transform-origin: center; transform: rotate(${position.heading}deg);">
|
||||
</ion-icon>`
|
||||
: '<ion-icon name="current-location"></ion-icon>',
|
||||
? `<span
|
||||
class="material-symbols-rounded map-location-pin"
|
||||
style="
|
||||
transform-origin: center;
|
||||
transform: rotate(${position.heading}deg);
|
||||
font-size: ${iconSize}px;
|
||||
"
|
||||
>${SCIcon`navigation`}</span>`
|
||||
: `<span
|
||||
name="${SCIcon`person_pin_circle`}"
|
||||
class="material-symbols-rounded map-location-pin"
|
||||
style="font-size: ${iconSize}px;"
|
||||
>${SCIcon`person_pin_circle`}</span>`,
|
||||
iconSize: [iconSize, iconSize],
|
||||
}),
|
||||
zIndexOffset: 1000,
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
class="filterable"
|
||||
>
|
||||
<ion-menu-button menu="context" auto-hide="false">
|
||||
<ion-icon name="adjustments"></ion-icon>
|
||||
<ion-icon name="tune"></ion-icon>
|
||||
</ion-menu-button>
|
||||
</ion-searchbar>
|
||||
</ion-toolbar>
|
||||
@@ -78,10 +78,10 @@
|
||||
>
|
||||
<ion-icon
|
||||
*ngIf="position !== null; else questionIcon"
|
||||
name="current-location"
|
||||
name="my_location"
|
||||
></ion-icon>
|
||||
<ng-template #questionIcon>
|
||||
<ion-icon name="help"></ion-icon>
|
||||
<ion-icon name="location_searching"></ion-icon>
|
||||
</ng-template>
|
||||
</ion-button>
|
||||
</div>
|
||||
@@ -114,10 +114,10 @@
|
||||
>
|
||||
<ion-icon
|
||||
*ngIf="position !== null; else questionIcon"
|
||||
name="current-location"
|
||||
name="my_location"
|
||||
></ion-icon>
|
||||
<ng-template #questionIcon>
|
||||
<ion-icon name="help"></ion-icon>
|
||||
<ion-icon name="location_searching"></ion-icon>
|
||||
</ng-template>
|
||||
</ion-button>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<div
|
||||
class="map-container"
|
||||
(leafletMapReady)="onMapReady($event)"
|
||||
@@ -12,6 +27,6 @@
|
||||
size="small"
|
||||
[routerLink]="['/map', place.uid]"
|
||||
>
|
||||
<ion-icon name="arrows-maximize"></ion-icon>
|
||||
<ion-icon name="zoom_out_map"></ion-icon>
|
||||
</ion-button>
|
||||
</div>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-menu
|
||||
type="overlay"
|
||||
menuId="context"
|
||||
@@ -16,7 +31,7 @@
|
||||
<ion-list>
|
||||
<ion-radio-group class="context-sort" *ngIf="sortOption" [value]="0">
|
||||
<ion-list-header>
|
||||
<ion-icon name="arrows-down-up"></ion-icon>
|
||||
<ion-icon name="sort"></ion-icon>
|
||||
<ion-title>{{
|
||||
'menu.context.sort.title' | translate | titlecase
|
||||
}}</ion-title>
|
||||
@@ -31,9 +46,12 @@
|
||||
<span *ngIf="sortOption.value === value.value && value.reversible">
|
||||
<ion-icon
|
||||
*ngIf="sortOption.reversed"
|
||||
name="arrow-down"
|
||||
name="arrow_downward"
|
||||
></ion-icon>
|
||||
<ion-icon
|
||||
*ngIf="!sortOption.reversed"
|
||||
name="arrow_upward"
|
||||
></ion-icon>
|
||||
<ion-icon *ngIf="!sortOption.reversed" name="arrow-up"></ion-icon>
|
||||
</span>
|
||||
</ion-label>
|
||||
<ion-radio slot="end" [value]="i"> </ion-radio>
|
||||
@@ -43,7 +61,7 @@
|
||||
<!-- Filter Context -->
|
||||
<div class="context-filter" *ngIf="filterOption">
|
||||
<ion-list-header>
|
||||
<ion-icon name="filter"></ion-icon>
|
||||
<ion-icon name="filter_list"></ion-icon>
|
||||
<ion-title>{{
|
||||
'menu.context.filter.title' | translate | titlecase
|
||||
}}</ion-title>
|
||||
@@ -53,7 +71,7 @@
|
||||
color="dark"
|
||||
(click)="resetFilter(filterOption)"
|
||||
>
|
||||
<ion-icon name="trash"></ion-icon>
|
||||
<ion-icon name="delete"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-list-header>
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2018, 2019, 2020 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -24,6 +24,7 @@ import {ContextMenuComponent} from './context/context-menu.component';
|
||||
import {ContextMenuService} from './context/context-menu.service';
|
||||
import {NavigationComponent} from './navigation/navigation.component';
|
||||
import {TabsModule} from './tabs/tabs.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
/**
|
||||
* Menu module
|
||||
@@ -33,6 +34,7 @@ import {TabsModule} from './tabs/tabs.module';
|
||||
exports: [NavigationComponent, ContextMenuComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonIconModule,
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
RouterModule,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
@@ -25,6 +40,10 @@
|
||||
&:focus,
|
||||
&.active{
|
||||
color: var(--ion-color-medium-contrast);
|
||||
|
||||
ion-icon ::ng-deep stapps-icon {
|
||||
--fill: 1;
|
||||
}
|
||||
}
|
||||
|
||||
ion-icon {
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {RouterModule} from '@angular/router';
|
||||
@@ -6,9 +21,16 @@ import {IonicModule} from '@ionic/angular';
|
||||
import {TabsComponent} from './tabs.component';
|
||||
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {IonIconModule} from '../../../util/ion-icon/ion-icon.module';
|
||||
|
||||
@NgModule({
|
||||
imports: [CommonModule, IonicModule, TranslateModule, RouterModule],
|
||||
imports: [
|
||||
CommonModule,
|
||||
IonicModule,
|
||||
IonIconModule,
|
||||
TranslateModule,
|
||||
RouterModule,
|
||||
],
|
||||
declarations: [TabsComponent],
|
||||
exports: [TabsComponent],
|
||||
})
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<a
|
||||
[routerDirection]="'root'"
|
||||
[routerLink]="['/dashboard']"
|
||||
routerLinkActive="active"
|
||||
>
|
||||
<ion-icon [name]="'smart-home'"></ion-icon>
|
||||
<ion-icon [name]="'home'"></ion-icon>
|
||||
<ion-label>{{ 'tabs.home' | translate }}</ion-label>
|
||||
</a>
|
||||
<a
|
||||
@@ -11,7 +26,7 @@
|
||||
[routerLink]="['/canteen']"
|
||||
routerLinkActive="active"
|
||||
>
|
||||
<ion-icon [name]="'tools-kitchen-2'"></ion-icon>
|
||||
<ion-icon [name]="'local_cafe'"></ion-icon>
|
||||
<ion-label>{{ 'tabs.canteens' | translate }}</ion-label>
|
||||
</a>
|
||||
<a
|
||||
@@ -23,7 +38,7 @@
|
||||
<ion-label>{{ 'tabs.schedule' | translate }}</ion-label>
|
||||
</a>
|
||||
<a [routerDirection]="'root'" [routerLink]="['/map']" routerLinkActive="active">
|
||||
<ion-icon [name]="'map-search'"></ion-icon>
|
||||
<ion-icon [name]="'map'"></ion-icon>
|
||||
<ion-label>{{ 'tabs.map' | translate }}</ion-label>
|
||||
</a>
|
||||
<a
|
||||
@@ -31,6 +46,6 @@
|
||||
[routerLink]="['/profile']"
|
||||
routerLinkActive="active"
|
||||
>
|
||||
<ion-icon [name]="'user'"></ion-icon>
|
||||
<ion-icon [name]="'account_circle'"></ion-icon>
|
||||
<ion-label>{{ 'tabs.profile' | translate }}</ion-label>
|
||||
</a>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card>
|
||||
<span>
|
||||
<a [routerLink]="['/data-detail', item.uid]">
|
||||
@@ -7,7 +22,7 @@
|
||||
(ionError)="$event.target.nextSibling.style.display = 'block'"
|
||||
alt=""
|
||||
></ion-img>
|
||||
<ion-icon name="news"></ion-icon>
|
||||
<ion-icon name="newspaper"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
</a>
|
||||
</span>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -28,6 +28,7 @@ import {ChipFilterComponent} from '../data/chips/filter/chip-filter.component';
|
||||
import {SettingsModule} from '../settings/settings.module';
|
||||
import {NewsSettingsFilterComponent} from './elements/news-filter-settings/news-settings-filter.component';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const newsRoutes: Routes = [{path: 'news', component: NewsPageComponent}];
|
||||
|
||||
@@ -47,6 +48,7 @@ const newsRoutes: Routes = [{path: 'news', component: NewsPageComponent}];
|
||||
ThingTranslateModule.forChild(),
|
||||
TranslateModule.forChild(),
|
||||
RouterModule.forChild(newsRoutes),
|
||||
IonIconModule,
|
||||
CommonModule,
|
||||
MomentModule,
|
||||
DataModule,
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-card>
|
||||
<span *ngIf="item.url; else imageNoUrl">
|
||||
<a href="{{ item.url }}">
|
||||
@@ -7,7 +22,7 @@
|
||||
(ionError)="$event.target.nextSibling.style.display = 'block'"
|
||||
alt=""
|
||||
></ion-img>
|
||||
<ion-icon name="news"></ion-icon>
|
||||
<ion-icon name="newspaper"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
</a>
|
||||
</span>
|
||||
@@ -18,7 +33,7 @@
|
||||
(ionError)="$event.target.nextSibling.style.display = 'block'"
|
||||
alt=""
|
||||
></ion-img>
|
||||
<ion-icon name="news"></ion-icon>
|
||||
<ion-icon name="newspaper"></ion-icon>
|
||||
</ion-thumbnail>
|
||||
</ng-template>
|
||||
<ion-card-header>
|
||||
@@ -30,7 +45,7 @@
|
||||
><a href="{{ item.url }}"
|
||||
><span class="text">{{ item.name }}</span
|
||||
><span class="icon"
|
||||
><ion-icon name="external-link"></ion-icon></span></a
|
||||
><ion-icon name="open_in_browser"></ion-icon></span></a
|
||||
></span>
|
||||
<ng-template #titleNoUrl>{{ item.name }}</ng-template>
|
||||
</ion-card-title>
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-buttons slot="start">
|
||||
@@ -108,7 +123,7 @@
|
||||
<ion-card class="courses-card">
|
||||
<ion-card-header (click)="toggleCourseCardState()">
|
||||
<span>{{ 'profile.courses.today' | translate | uppercase }}</span>
|
||||
<ion-icon [name]="courseCardState" fill="red"></ion-icon>
|
||||
<ion-icon [name]="courseCardState" fill="red" size="20"></ion-icon>
|
||||
</ion-card-header>
|
||||
<ion-card-content
|
||||
class="course-card"
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
:host {
|
||||
ion-content {
|
||||
--background: var(--ion-color-light);
|
||||
@@ -178,12 +193,7 @@
|
||||
}
|
||||
ion-icon {
|
||||
color: var(--ion-color-light);
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
|
||||
&::shadow svg.icon path {
|
||||
fill: var(--ion-color-light);
|
||||
}
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
@@ -26,11 +26,12 @@ import {
|
||||
import {ActivatedRoute} from '@angular/router';
|
||||
import {ScheduleProvider} from '../../calendar/schedule.provider';
|
||||
import moment from 'moment';
|
||||
import {SCIcon} from '../../../util/ion-icon/icon';
|
||||
|
||||
enum CourseCard {
|
||||
collapsed = 'caret-up-sharp',
|
||||
expanded = 'caret-down-sharp',
|
||||
}
|
||||
const CourseCard = {
|
||||
collapsed: SCIcon`expand_more`,
|
||||
expanded: SCIcon`expand_less`,
|
||||
};
|
||||
|
||||
interface MyCoursesTodayInterface {
|
||||
startTime: string;
|
||||
|
||||
@@ -22,6 +22,7 @@ import {ProfilePageComponent} from './page/profile-page.component';
|
||||
import {TranslateModule} from '@ngx-translate/core';
|
||||
import {SwiperModule} from 'swiper/angular';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
@@ -35,6 +36,7 @@ const routes: Routes = [
|
||||
imports: [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
IonIconModule,
|
||||
IonicModule,
|
||||
RouterModule.forChild(routes),
|
||||
TranslateModule,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licens for
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
@@ -18,14 +18,14 @@
|
||||
class="left-button"
|
||||
(click)="mainSwiper.pageBackwards()"
|
||||
>
|
||||
<ion-icon slot="icon-only" name="chevron-left"></ion-icon>
|
||||
<ion-icon slot="icon-only" name="navigate_before"></ion-icon>
|
||||
</ion-button>
|
||||
<ion-button
|
||||
fill="clear"
|
||||
class="right-button"
|
||||
(click)="mainSwiper.pageForward()"
|
||||
>
|
||||
<ion-icon slot="icon-only" name="chevron-right"></ion-icon>
|
||||
<ion-icon slot="icon-only" name="navigate_next"></ion-icon>
|
||||
</ion-button>
|
||||
<infinite-swiper
|
||||
class="header-swiper"
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<!--
|
||||
~ Copyright (C) 2021 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
@@ -29,20 +29,23 @@
|
||||
}}</ion-title>
|
||||
<ion-buttons slot="end">
|
||||
<ion-button (click)="onTodayClick()">
|
||||
{{ 'schedule.view.today' | translate | uppercase }}
|
||||
<ion-icon name="today" slot="icon-only"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
<ion-toolbar color="primary" mode="md" class="tabs-toolbar">
|
||||
<ion-segment #segment value="calendar" (ionChange)="onSegmentChange()">
|
||||
<ion-segment-button value="calendar">
|
||||
<ion-segment-button value="calendar" layout="icon-start">
|
||||
<ion-label>{{ 'schedule.calendar' | translate }}</ion-label>
|
||||
<ion-icon name="calendar_today"></ion-icon>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="recurring">
|
||||
<ion-segment-button value="recurring" layout="icon-start">
|
||||
<ion-label>{{ 'schedule.recurring' | translate }}</ion-label>
|
||||
<ion-icon name="event_repeat"></ion-icon>
|
||||
</ion-segment-button>
|
||||
<ion-segment-button value="single">
|
||||
<ion-segment-button value="single" layout="icon-start">
|
||||
<ion-label>{{ 'schedule.single' | translate }}</ion-label>
|
||||
<ion-icon name="event_upcoming"></ion-icon>
|
||||
</ion-segment-button>
|
||||
</ion-segment>
|
||||
</ion-toolbar>
|
||||
@@ -73,7 +76,7 @@
|
||||
(click)="onFABClick()"
|
||||
>
|
||||
<ion-fab-button>
|
||||
<ion-icon name="plus"></ion-icon>
|
||||
<ion-icon name="add"></ion-icon>
|
||||
</ion-fab-button>
|
||||
</ion-fab>
|
||||
|
||||
|
||||
@@ -23,36 +23,13 @@ ion-header {
|
||||
&.tabs-toolbar {
|
||||
--min-height: 44px;
|
||||
}
|
||||
|
||||
ion-segment.tabs {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
min-height: unset;
|
||||
margin-left: 15%;
|
||||
margin-right: 15%;
|
||||
max-width: 70%;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
|
||||
@media (max-width: 420px) {
|
||||
width: 300px;
|
||||
max-width: unset;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
ion-segment-button {
|
||||
min-height: 44px;
|
||||
|
||||
ion-label {
|
||||
line-height: unset;
|
||||
margin: var(--spacing-sm) 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ion-segment-button[aria-selected=true] ion-icon ::ng-deep stapps-icon {
|
||||
--fill: 1;
|
||||
}
|
||||
|
||||
ion-content {
|
||||
--background: var(--ion-color-light);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public Licens for
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
@@ -18,14 +18,14 @@
|
||||
class="left-button"
|
||||
(click)="mainSwiper.swiperRef.slidePrev()"
|
||||
>
|
||||
<ion-icon slot="icon-only" name="chevron-left"></ion-icon>
|
||||
<ion-icon slot="icon-only" name="navigate_before"></ion-icon>
|
||||
</ion-button>
|
||||
<ion-button
|
||||
fill="clear"
|
||||
class="right-button"
|
||||
(click)="mainSwiper.swiperRef.slideNext()"
|
||||
>
|
||||
<ion-icon slot="icon-only" name="chevron-right"></ion-icon>
|
||||
<ion-icon slot="icon-only" name="navigate_next"></ion-icon>
|
||||
</ion-button>
|
||||
<swiper
|
||||
class="header-swiper"
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -37,6 +37,7 @@ import {ThingTranslateModule} from '../../translation/thing-translate.module';
|
||||
import {InfiniteSwiperComponent} from './page/grid/infinite-swiper.component';
|
||||
import {FileOpener} from '@ionic-native/file-opener/ngx';
|
||||
import {CalendarComponent} from './page/components/calendar.component';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const settingsRoutes: Routes = [
|
||||
{path: 'schedule', redirectTo: 'schedule/calendar/now'},
|
||||
@@ -68,6 +69,7 @@ const settingsRoutes: Routes = [
|
||||
DataModule,
|
||||
FormsModule,
|
||||
IonicModule.forRoot(),
|
||||
IonIconModule,
|
||||
MomentModule,
|
||||
RouterModule.forChild(settingsRoutes),
|
||||
SwiperModule,
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
(click)="syncCalendar(true)"
|
||||
>
|
||||
<ion-label>Sync Now</ion-label>
|
||||
<ion-icon slot="end" name="refresh"></ion-icon>
|
||||
<ion-icon slot="end" name="sync"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-item>
|
||||
<ion-item *ngIf="isWeb">
|
||||
@@ -97,13 +97,13 @@
|
||||
<ion-label>{{
|
||||
'settings.calendar.export.backup' | translate
|
||||
}}</ion-label>
|
||||
<ion-icon slot="end" name="device-floppy"></ion-icon>
|
||||
<ion-icon slot="end" name="save"></ion-icon>
|
||||
</ion-button>
|
||||
<ion-button fill="clear" (click)="restoreInput.click()">
|
||||
<ion-label>{{
|
||||
'settings.calendar.export.restore' | translate
|
||||
}}</ion-label>
|
||||
<ion-icon slot="end" name="refresh"></ion-icon>
|
||||
<ion-icon slot="end" name="settings_backup_restore"></ion-icon>
|
||||
</ion-button>
|
||||
<!--suppress CheckEmptyScriptTag -->
|
||||
<input
|
||||
|
||||
@@ -1,3 +1,18 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<ion-header>
|
||||
<ion-toolbar color="primary" mode="ios">
|
||||
<ion-buttons slot="start">
|
||||
@@ -42,6 +57,6 @@
|
||||
(click)="presentResetAlert()"
|
||||
>
|
||||
{{ 'settings.resetSettings' | translate }}
|
||||
<ion-icon slot="start" name="arrow-back-up"></ion-icon>
|
||||
<ion-icon slot="start" name="device_reset"></ion-icon>
|
||||
</ion-button>
|
||||
</ion-content>
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2018, 2019, 2020 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
@@ -34,6 +34,7 @@ import {CalendarService} from '../calendar/calendar.service';
|
||||
import {CalendarModule} from '../calendar/calendar.module';
|
||||
import {BackgroundModule} from '../background/background.module';
|
||||
import {UtilModule} from '../../util/util.module';
|
||||
import {IonIconModule} from '../../util/ion-icon/ion-icon.module';
|
||||
|
||||
const settingsRoutes: Routes = [
|
||||
{path: 'settings', component: SettingsPageComponent},
|
||||
@@ -54,6 +55,7 @@ const settingsRoutes: Routes = [
|
||||
CommonModule,
|
||||
FormsModule,
|
||||
CalendarModule,
|
||||
IonIconModule,
|
||||
BackgroundModule,
|
||||
IonicModule.forRoot(),
|
||||
TranslateModule.forChild(),
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright (C) 2021 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {ModuleWithProviders, NgModule, Provider} from '@angular/core';
|
||||
@@ -38,12 +38,14 @@ import {
|
||||
TranslateSimplePipe,
|
||||
} from './thing-translate.pipe';
|
||||
import {ThingTranslateService} from './thing-translate.service';
|
||||
import {IonIconModule} from '../util/ion-icon/ion-icon.module';
|
||||
|
||||
export interface ThingTranslateModuleConfig {
|
||||
parser?: Provider;
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
imports: [IonIconModule],
|
||||
declarations: [
|
||||
ArrayJoinPipe,
|
||||
DurationLocalizedPipe,
|
||||
@@ -62,6 +64,7 @@ export interface ThingTranslateModuleConfig {
|
||||
IsNumericPipe,
|
||||
],
|
||||
exports: [
|
||||
IonIconModule,
|
||||
ArrayJoinPipe,
|
||||
DurationLocalizedPipe,
|
||||
NumberLocalizedPipe,
|
||||
|
||||
57
src/app/util/ion-icon/icon-match.spec.ts
Normal file
57
src/app/util/ion-icon/icon-match.spec.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/* eslint-disable unicorn/no-null */
|
||||
|
||||
import {matchPropertyContent, matchTagProperties} from './icon-match';
|
||||
|
||||
describe('matchTagProperties', function () {
|
||||
const regex = matchTagProperties('test');
|
||||
|
||||
it('should match html tag content', function () {
|
||||
expect('<test content></test>'.match(regex)).toEqual([' content']);
|
||||
});
|
||||
|
||||
it('should match all tags', function () {
|
||||
expect(
|
||||
'<test content1></test> <test content2></test>'.match(regex),
|
||||
).toEqual([' content1', ' content2']);
|
||||
});
|
||||
|
||||
it('should not match wrong tags', function () {
|
||||
expect('<no content></no>'.match(regex)).toEqual(null);
|
||||
});
|
||||
});
|
||||
|
||||
describe('matchPropertyContent', function () {
|
||||
const regex = matchPropertyContent(['test1', 'test2']);
|
||||
|
||||
it('should match bare literals', function () {
|
||||
expect(`test1="content" test2="content1"`.match(regex)).toEqual([
|
||||
'content',
|
||||
'content1',
|
||||
]);
|
||||
});
|
||||
|
||||
it('should match angular literals', function () {
|
||||
expect(`[test1]="'content'" [test2]="'content1'"`.match(regex)).toEqual([
|
||||
'content',
|
||||
'content1',
|
||||
]);
|
||||
});
|
||||
|
||||
it('should not match wrong literals', function () {
|
||||
expect(`no="content" [no]="'content'"`.match(regex)).toEqual(null);
|
||||
});
|
||||
});
|
||||
33
src/app/util/ion-icon/icon-match.ts
Normal file
33
src/app/util/ion-icon/icon-match.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export function matchTagProperties(tag: string) {
|
||||
return new RegExp(`(?<=<${tag})[\\s\\S]*?(?=><\\/${tag}>)`, 'g');
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export function matchPropertyContent(properties: string[]) {
|
||||
const names = properties.join('|');
|
||||
|
||||
return new RegExp(
|
||||
`((?<=(${names})=")[\\w-]+(?="))|((?<=\\[(${names})]="')[\\w-]+(?='"))`,
|
||||
'g',
|
||||
);
|
||||
}
|
||||
48
src/app/util/ion-icon/icon.component.ts
Normal file
48
src/app/util/ion-icon/icon.component.ts
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import {Component, HostBinding, Input} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'stapps-icon',
|
||||
templateUrl: 'icon.html',
|
||||
styleUrls: ['icon.scss'],
|
||||
})
|
||||
export class IconComponent {
|
||||
@HostBinding('style.--size')
|
||||
@Input()
|
||||
size?: number;
|
||||
|
||||
@HostBinding('style.--weight')
|
||||
@Input()
|
||||
weight?: number;
|
||||
|
||||
@HostBinding('style.--grade')
|
||||
@Input()
|
||||
grade?: number;
|
||||
|
||||
@Input()
|
||||
fill: boolean;
|
||||
|
||||
@HostBinding('innerHtml')
|
||||
@Input()
|
||||
name: string;
|
||||
|
||||
@HostBinding('style.--fill') get fillStyle(): number | undefined {
|
||||
return this.fill ? 1 : undefined;
|
||||
}
|
||||
|
||||
@HostBinding('class.material-symbols-rounded') hostClass = true;
|
||||
}
|
||||
15
src/app/util/ion-icon/icon.html
Normal file
15
src/app/util/ion-icon/icon.html
Normal file
@@ -0,0 +1,15 @@
|
||||
<!--
|
||||
~ Copyright (C) 2022 StApps
|
||||
~ This program is free software: you can redistribute it and/or modify it
|
||||
~ under the terms of the GNU General Public License as published by the Free
|
||||
~ Software Foundation, version 3.
|
||||
~
|
||||
~ This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
~ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
~ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
~ more details.
|
||||
~
|
||||
~ You should have received a copy of the GNU General Public License along with
|
||||
~ this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<ng-content></ng-content>
|
||||
26
src/app/util/ion-icon/icon.scss
Normal file
26
src/app/util/ion-icon/icon.scss
Normal file
@@ -0,0 +1,26 @@
|
||||
/*!
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
:host {
|
||||
font-variation-settings: 'wght' var(--weight), 'GRAD' var(--grade), 'FILL' var(--fill);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: inherit;
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
24
src/app/util/ion-icon/icon.ts
Normal file
24
src/app/util/ion-icon/icon.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright (C) 2022 StApps
|
||||
* This program is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, version 3.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A noop function to aid parsing icon names
|
||||
*/
|
||||
export function SCIcon(
|
||||
strings: TemplateStringsArray,
|
||||
..._keys: string[]
|
||||
): string {
|
||||
return strings.join('');
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user