Merge branch 'master' into daisyUI

* master:
  hide netlify on github
  format netlify
  hide netlify on github
  Fix clock
  Fix clock
  Update mermaid
  Fix test
  Fix test
  Fix test
  Fix test
  remove eslint ignors
  Fix test
  Add powered by netlify
This commit is contained in:
Sidharth Vinod
2021-09-07 00:29:11 +05:30
6 changed files with 53 additions and 1615 deletions
-2
View File
@@ -1,9 +1,7 @@
describe('Check actions', () => {
// eslint-disable-next-line mocha/no-hooks-for-single-case
beforeEach(() => {
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Actions').click();
});
it('should update markdown code', () => {
cy.get('#markdown')
+4 -1
View File
@@ -1,8 +1,12 @@
describe('Save History', () => {
beforeEach(() => {
cy.clock();
cy.clearLocalStorage();
cy.visit('/edit');
cy.contains('Actions').click();
cy.contains('History').click();
});
it('should save when clicked', () => {
cy.get('#historyList').find('li').should('have.length', 0);
cy.get('#historyList').contains('No items in History');
@@ -43,7 +47,6 @@ describe('Save History', () => {
});
it('should auto save history', () => {
cy.clock();
cy.get('#editor').type(' C --> HistoryTest');
cy.tick(70000);
cy.contains('Timeline').click();
+2
View File
@@ -34,6 +34,7 @@ describe('Site Loads', () => {
it('should load diagram from gist', () => {
cy.visit(`/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a`);
cy.contains('History').click();
cy.contains('Go shopping!!');
cy.contains('Revisions');
cy.contains('sidharthv96 v8f8f1e2');
@@ -45,6 +46,7 @@ describe('Site Loads', () => {
cy.visit(
'/edit?gist=https://gist.github.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/ec9b4ab0e41e4ff6287326cd3cb47affd7851e19'
);
cy.contains('History').click();
cy.contains('Party');
cy.contains('Revisions');
cy.contains('sidharthv96 v7851e19');
+1 -1
View File
@@ -52,7 +52,7 @@
"daisyui": "^1.12.1",
"analytics": "^0.7.14",
"js-base64": "^3.6.1",
"mermaid": "^8.11.4",
"mermaid": "^8.12.1",
"moment": "^2.29.1",
"monaco-editor": "^0.27.0",
"random-word-slugs": "^0.0.5"
+13 -3
View File
@@ -1,4 +1,6 @@
<script lang="ts">
import { browser } from '$app/env';
import Card from '$lib/components/card/card.svelte';
import type { State } from '$lib/types';
import { codeStore } from '$lib/util/state';
@@ -131,6 +133,10 @@
let imagemodeselected = 'auto';
let userimagesize = 1080;
let isNetlify = false;
if (browser && ['mermaid.live', 'netlify'].some((path) => window.location.host.includes(path))) {
isNetlify = true;
}
codeStore.subscribe((state: State) => {
const stateCopy = JSON.parse(JSON.stringify(state));
if (typeof stateCopy.mermaid === 'string') {
@@ -208,8 +214,12 @@
<button class="btn btn-primary btn-md flex-auto" on:click={loadGist}> Load Gist </button>
</label>
</div>
<div class="w-full flex items-center">
<a class="link" href="https://netlify.com">This site is powered by Netlify</a>
</div>
{#if isNetlify}
<div class="w-full flex items-center justify-center">
<a class="link underline text-gray-500 text-sm" href="https://netlify.com">
This site is powered by Netlify
</a>
</div>
{/if}
</div>
</Card>
+33 -1608
View File
File diff suppressed because it is too large Load Diff